I am working on face recognition.My codes worked fine and now the same codes are giving these errors.

asked 2017-07-01 23:30:41 -0500

updated 2017-07-01 23:50:37 -0500

berak gravatar image

I am working on face recognition.My codes worked fine and now the same codes are giving these errors. PLEASE HELP ME !! THANK YOU

OpenCV => 2.4.

Operating System / Platform => ubuntu 16.04

Compiler => python 2.7

OpenCV Error: Assertion failed ((scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F)) in cvtColor, file /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3959 Traceback (most recent call last): File "imgprocess_colorfilter.py", line 9, in <module> hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) cv2.error: /build/opencv-SviWsf/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp:3959: error: (-215) (scn == 3 || scn == 4) && (depth == CV_8U || depth == CV_32F) in function cvtColor

edit retag flag offensive close merge delete

Comments

your input image is empty / was never read. check.

berak gravatar imageberak ( 2017-07-01 23:45:36 -0500 )edit