jeudi 13 août 2015

Face detection errors in cv2

Lately I've been trying to write a simple program that can detect a face. I've never done this before so it was more of a warm up for me to get the hang of it. But I keep getting errors with every different sample I try. I've even copied samples straight off of the OpenCV website and I still got nothing but errors that don't make sense to me.

I copied my code exactly from this website http://ift.tt/1DOaMkl

and I'm getting this error

OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/buildd/opencv-2.4.9+dfsg/modules/imgproc/src/color.cpp, line 3737 Traceback (most recent call last): File "test.py", line 8, in gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) cv2.error: /build/buildd/opencv-2.4.9+dfsg/modules/imgproc/src/color.cpp:3737: error: (-215) scn == 3 || scn == 4 in function cvtColor



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire