Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

your image is empty or invalid. you have to check the output of imread() or cap.read(). (no idea, why python users never get this) so:

im = cv2.imread("some.png")
if im is None: # load fail 
     break