Is there a way to change the position of the window that pops up when cv::imshow
is called?
For me, the window seems to appear partially off-screen, so I have to drag it around before I can see entire image. It's very annoying to have to do this every single time.
I had a look at the reference manual -- it seems you have control over what goes into the title of the window, but I can't see anything relating to window position.
Oh, and the behavior is the same if I use the old C interface (cvShowImage
).
Any ideas?
Then if you hit q on your keyboard while imshow window is active it will close.
OpenCV-Python is a library of Python bindings designed to solve computer vision problems. cv2. imshow() method is used to display an image in a window. The window automatically fits to the image size. Syntax: cv2.imshow(window_name, image)
Do you want to display images and videos using a simplified interface through an OpenCV code? Then, you must check out the OpenCV startWindowsThread() function, which lets you use the high GUI windows, i.e., a simplified interface for displaying images and videos from OpenCV code.
As of OpenCV 2.1 this is possible also in C++ API using the moveWindow function:
cv::moveWindow(std::string winName, int x, int y)
For example:
cv::namedWindow("WindowName"); cv::moveWindow("WindowName", 10, 50);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With