OpenCV not working on Ubuntu

asked 2018-03-15 10:24:35 -0500

updated 2018-03-15 10:30:04 -0500

berak gravatar image

Hi all,

I'm using Spyder (trough anaconda) on Ubuntu 16.04, I installed OpenCV, but when I'm trying to visualize the content of my webcam with the imshow function, it's not working. Here is the error message:

"error: /tmp/build/80754af9/opencv_1512687413662/work/modules/highgui/src/window.cpp:331: error: (-215) size.width>0 && size.height>0 in function imshow"

Thank you for your help!


edit retag flag offensive close merge delete


please do not post screenshots of your ide here, they're entirely useless.

(if noone can try your code, noone will answer)

please edit again, and add your code as TEXT

berak gravatar imageberak ( 2018-03-15 10:31:13 -0500 )edit

and even without that, i bet the answer is the same as always: your image was invalid, the capture did not open and you never checked anything (python users NEVER do, they don't seem to get murphy's law)

(and the title of your question better be "my code is not working" ...)

berak gravatar imageberak ( 2018-03-15 10:34:47 -0500 )edit