First time here? Check out the FAQ!

Ask Your Question
0

I get this error - when trying to convert image using COLOR_BGR2GRAY

asked Dec 31 '14

OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cv::cvtColor, file ........\opencv\modules\imgproc\src\color.cpp,

Preview: (hide)

1 answer

Sort by » oldest newest most voted
3

answered Dec 31 '14

updated Dec 31 '14

This assert tells you that your source image contains neither 3(BGR) nor 4(BGRA) channels. Check it before.

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Dec 31 '14

Seen: 421 times

Last updated: Dec 31 '14