Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv2.VideoCapture(1) is causing errors. Please help me fix this.

this is the error: OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3737 Traceback (most recent call last): File "face_recognizer.py", line 157, in <module> gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) cv2.error: /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp:3737: error: (-215) scn == 3 || scn == 4 in function cvtColor

Also how do I know what to enter in the device id in videocapture().?

Thanks.