Ask Your Question
3

Does OpenCV provide Connected Component labeling method for binary image?

asked 2012-08-27 01:41:59 -0600

AsanWolf gravatar image

updated 2020-11-06 05:52:54 -0600

Does OpenCV provide Connected Component labeling method for binary image? Who can help me?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
4

answered 2012-08-27 01:52:30 -0600

sammy gravatar image

In OpenCV you can use the cv::FindContours(). It offers a similar result (the contours of the connected component blobs).

It's not an indentical replacement, but you can extract all the needed information from here.

You may also want to know about cv::Moments, which calculates statistics about your blobs, and cv::contourArea() - for area, and cv::arcLength() for perimeter

edit flag offensive delete link more

Comments

thanks,but I need to collect all the piexls into a vecter if they are the same connected component blobs respectively.

AsanWolf gravatar imageAsanWolf ( 2012-08-27 02:16:26 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-08-27 01:41:59 -0600

Seen: 6,163 times

Last updated: Aug 27 '12