Ask Your Question
-1

I am using rpi3 for face detection but error it is giving

asked 2018-08-21 05:24:22 -0600

Mohsin gravatar image

OpenCV error : error: (-215) scn == 3 || scn == 4 in function cvtColor (fixed - need confirmation)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-08-21 05:48:48 -0600

berak gravatar image

your image is empty or invalid. you have to check the output of imread() or cap.read(). (no idea, why python users never get this) so:

im = cv2.imread("some.png")
if im is None: # load fail 
     break
edit flag offensive delete link more

Comments

My image is valid and not empty.EVen though .can't figure out the issue.

Mohsin gravatar imageMohsin ( 2018-08-21 07:49:25 -0600 )edit

@Mohsin, look at your question again. without ANY information, we have to guess, what the problem is.

berak gravatar imageberak ( 2018-08-21 07:57:57 -0600 )edit

Thanks berak .I solved my error.

Mohsin gravatar imageMohsin ( 2018-08-29 05:40:06 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-21 05:24:22 -0600

Seen: 173 times

Last updated: Aug 21 '18