How can I perform connected component analysis on an image ?

4 views (last 30 days)
After color to gray and gray to binary conversion of image I want to do connected component analysis on the same image.

Answers (2)

Walter Roberson
Walter Roberson on 25 Sep 2015

Image Analyst
Image Analyst on 25 Sep 2015
Basically it's
[labeledImage, numberOfBlobs] = bwlabel(binaryImage);
or
cc = bwconncomp(binaryImage);
See my Image Segmentation Tutorial for a tutorial on how to use it.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!