Ask Your Question
0

cannot show image on mac

asked 2017-11-16 08:11:25 -0600

updated 2017-11-16 08:12:37 -0600

berak gravatar image

I followed the python-openCV tutorial in terminal and found cannot open image ,who can tell me why

description

edit retag flag offensive close merge delete

Comments

i removed your screenshot. please edit your question, and give us a TEXT version of your code, and the errors, it produced

berak gravatar imageberak ( 2017-11-16 08:13:21 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-11-16 08:19:49 -0600

In order to display windows, you need to add a delay. This is achieved by adding cv2.waitKey() right after your imshow. This will leave the window open until a key press is detected. Right after this, you'd want to destroy the window(s) using cv2.destroyAllWindows()

Next time, please use the official OpenCV Python tutorials. This issue is addressed right from the first code sample.

edit flag offensive delete link more

Comments

yes, as u said ,I succeed, but why it takes so much memory that my Mac always shut down

fuzheng gravatar imagefuzheng ( 2017-11-16 20:33:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-11-16 08:11:25 -0600

Seen: 937 times

Last updated: Nov 16 '17