Ask Your Question
-3

connectedComponents() not working

asked 2016-08-17 05:58:24 -0600

Quzal gravatar image

I have problem using connectedComponents() .Error shows at line 341

edit retag flag offensive close merge delete

Comments

1

aaannd the error is ?

please also show, how you try to call it !

berak gravatar imageberak ( 2016-08-17 06:06:46 -0600 )edit

connectedComponents(image, labels, connectivity=8, type=CV_32S) ,show error at this line of connectedcomponents.cpp ( CV_Assert(L.channels() == 1 && I.channels() == 1);)

Quzal gravatar imageQuzal ( 2016-08-17 15:48:40 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-08-17 07:09:52 -0600

My magic crystal balls tells me that the type of your matrix is wrong. Do you pass an image with multiple channels (e.g. CV_8UC3). How do you create or load your image?

edit flag offensive delete link more

Comments

connectedComponents(image, labels, connectivity=8, type=CV_32S) ,show error at this line of connectedcomponents.cpp ( CV_Assert(L.channels() == 1 && I.channels() == 1);)

Quzal gravatar imageQuzal ( 2016-08-17 15:38:56 -0600 )edit

"How do you create or load your image?"

FooBar gravatar imageFooBar ( 2016-08-19 02:57:39 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-17 05:58:24 -0600

Seen: 606 times

Last updated: Aug 17 '16