First time here? Check out the FAQ!
answered 2018-08-21 05:48:48 -0600
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:
imread()
cap.read()
im = cv2.imread("some.png") if im is None: # load fail break