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 at 17:51
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

Sign in to comment.

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

  2 Comments

Samuel Nelson
Samuel Nelson on 14 Jul 2020 at 17:14
Ok, I think I over complicated my question. The basic problem is trying to count the rings, but when we were using bwconncomp, rings that were merged were counted as one object instead of two. So that is when we switched to trying to count the holes instead. Will regionprops() be able to assist in that scenario?
Image Analyst
Image Analyst on 14 Jul 2020 at 17:51
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.