Ask Your Question
0

cv2.imshow() not functioning properly on Mac

asked 2014-11-08 15:32:55 -0600

kmsquire gravatar image

I'm having an issue with cv2.imshow() on a Mac from python. When I run the command, a window opens in the background, and a python rocket icon appears on my dock, bouncing. However the window does not come to the foreground, and is not focusable (and the icon continues to bounce). If I move my mouse cursor over the window, it shows the spinning beach-ball of death.

What's strange is that if I simply "import matplotlib.pyplot", everything starts working. This suggests something isn't being initialized by opencv.

This is occurring with both opencv 2.4.9 and 3.0.0alpha, and occurs with either the QT backend or the normal Mac backend, so it's obviously a problem with my installation. However, I've completely uninstalled and reinstalled everything, and still have the problem. :-(

Not quite sure how to proceed, so any pointers would be very welcome.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-04-10 18:05:07 -0600

Vitaly S. gravatar image

After cv.imgshow() add cv2.waitKey(0) call and a desired screen will appear

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-11-08 15:32:55 -0600

Seen: 5,670 times

Last updated: Nov 08 '14