Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

please make it a habit to check, if resources load properly, you should test:

if not cap.isOpened() # did we get a connection at all ?

and also, in your loop:

if ret == False  # the connection broke, or the stream came to an end

please make it a habit to check, if resources load properly, you should test:

if not cap.isOpened() # did we get a connection at all ?

and also, in your loop:

if ret == False  # the connection broke, or the stream came to an end

(in your case, you received an empty frame, and imshow() hates you :)