opencv_error_code-215_channels

asked 2016-07-21 03:31:47 -0500

harfbuzz gravatar image

Hi, Does anyone know why I'm getting the error message below : Thanks,

OpenCV Error: Assertion failed (channels() == CV_MAT_CN(dtype)) in copyTo, file /home/.../opencv/opencv-3.1.0/modules/core/src/copy.cpp, line 257 terminate called after throwing an instance of 'cv::Exception' what(): /home/.../opencv-3.1.0/modules/core/src/copy.cpp:257: error: (-215) channels() == CV_MAT_CN(dtype) in function copyTo

edit retag flag offensive close merge delete

Comments

1

The channels of your two images do not match. So you are trying to copy a bgr image to a grayscale image or something like that. Check the types of your images.

Missing gravatar imageMissing ( 2016-07-21 04:22:05 -0500 )edit