Seperate out multiple objects considered as single in image - bwlabel
1 view (last 30 days)
Show older comments
Vishnu Shanker Balasundaram Ravishanker
on 18 Aug 2017
Commented: Image Analyst
on 19 Aug 2017
I have a greyscale image and bwlabel() considered intersecting objects as one single region instead of two. I have attached a colour coded output image file. In the attached file on the top left corner, 2 intersecting objects are considered as one, and so on. I was wondering if there was any way to separate them out? I just need to count the number of objects in image. I was thinking of counting the number of endpoints in that particular object to determine the count. eg: if there were 4 corners/endpoints then the count of it is 2.

0 Comments
Accepted Answer
Image Analyst
on 18 Aug 2017
Edited: Image Analyst
on 18 Aug 2017
Try skeletonizing the objects and get the area (number of pixels) of each. If the area is bigger than expected, either throw it out or assume it's 2 intersecting. You can find branchpoints with bwmorph() to split it apart, or if there is no branchpoint, just split it in the middle. For the X you'd have to reconnect one line and throw out the other line.
You can also skeletonize and then count endpoints, both with bwmorph(), as you said. However there might be an occasional object that has 5 endpoints - depends on the shape of the blob.
6 Comments
Image Analyst
on 19 Aug 2017
Call regionprops(). That will make measurements of each labeled blob separately.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!