MATLAB Answers

Counting Conjoined and Incomplete Objects

7 views (last 30 days)
Samuel Nelson
Samuel Nelson on 9 Jul 2020
Commented: Image Analyst on 14 Jul 2020
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?

Answers (1)

Image Analyst
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".
Image Analyst
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

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!