1 | initial version |
your VideoCapture either did not open, or you reached the end of the movie
please:
check cap.isOpened()
and the ret value in: ret,frame = cap.read()
if any of it returns False, you have to handle that condition. (i.e. break out of the loop)
2 | No.2 Revision |
your VideoCapture either did not open, or you reached the end of the moviemovie. anyway, your image is invalid
please:
check cap.isOpened()
and the ret value in: ret,frame = cap.read()
if any of it returns False, you have to handle that condition. (i.e. break out of the loop)