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
2 | No.2 Revision |
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 :)