Counting Conjoined and Incomplete Objects
2 views (last 30 days)
Show older comments
I am working on a program that counts axons in a regenerating nerve. As you can see from the image below, we have a segmentation to black and white we are comfortable with, the challenge is counting. We have filtered by size and circularity, and then using bwconncomp to count objects. However, as in the image below, some objects(rings) are conjoined, which leads to an inaccurate count. To counter this, we tried filling the rings using fillholes and then erosion and dilation to create particles that were seperate, but this generally failed to close the more opening rings. Is there a better way to count rings or circles?
0 Comments
Answers (1)
Image Analyst
on 9 Jul 2020
Not exactly sure what you're asking, but you can find regions with holes by asking regionprops() for the "EulerNumber".
2 Comments
Image Analyst
on 14 Jul 2020
If you want to count holes, invert the mask and call imclearborder(). Then call bwlabel():
holeMask = imclearborder(~ringMask);
[~, numBlobs] = bwlabel(holeMask)
Also see watershed for how to split apart blobs
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!