Can't Play video from file
I'm using playingvideofromfile line for line, but using the full path of the file.
still get the following error: OpenCV(3.4.1) C:\bld\opencv_1520732670222\work\opencv-3.4.1\modules\imgproc\src\color.cpp:11147: error: (-215) scn == 3 || scn == 4 in function cv::cvtColor
can you replace capr.read() with
Same error, it keeps pointing to gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
add print (frame.shape) after cap.read()
python users NEVER do checks, like `
cap.isOpened()
orret==True
when playing a video file , the last frame will return False there.
this worked adding these conditions. I guess the program didn't know what to do when the video finished.
the program is dumb.
the programmer did not know, what to do ;)