Problem using connectedComponents() in opencv 3 using Visual Studio 2012 [closed]

asked 2016-06-16 05:44:37 -0600

Akash Garg gravatar image

Every time I try to use connectedComponents() function of opencv in my program, the execution of the program gets Aborted with error code R6010. This is what i get on the terminal OpenCV Error: Assertion failed (L.channels() == 1 && I.channels() == 1) in connectedComponents_sub1, file /source/opencv-3.0.0/modules/imgproc/src/connectedcomponents.cpp, line 341

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2016-06-16 12:00:48.080840

Comments

similar to findContours(), you need a binary 1 channel image as input

berak gravatar imageberak ( 2016-06-16 05:59:34 -0600 )edit

It worked berak. Thanks alot!!!

Akash Garg gravatar imageAkash Garg ( 2016-06-16 11:46:34 -0600 )edit