I am using openCV python bindings. I am trying to show the output image using the following listing:
cv.NamedWindow('display')
cv.MoveWindow('display', 10, 10)
cv.ShowImage('display', cvImage)
But I do not see any window.
My platform is Linux (openSuse 11.4), python-opencv version 2.1 and python 2.7.
You need to call the WaitKey function to process the events. Check out the documentation: http://opencv.willowgarage.com/documentation/python/highgui_user_interface.html#waitkey
This function is the only method in HighGUI that can fetch and handle events, so it needs to be called periodically for normal event processing, unless HighGUI is used within some environment that takes care of event processing.
Just add a WaitKey(0) at the end of your code and it should work just fine.
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