Reputation: 1936
Let's say I have the following image.
I want to consider these two blobs as two separate blobs; however, finding connected components labels them as a single component because they are touching.
I tried img = bwmorph(img, 'branchpoints');
and that does segment and erode these two blobs but that also erases blobs other blobs. For instance, in the following image, the upper left structure has been erased, but that structure should not be erased and moreover, I would like to segment that structure as two blobs that can be evidently seen.
The unfilled blob on the left has disappeared. How to get around this problem?
Upvotes: 0
Views: 76
Reputation: 26069
here's an idea, use imfill
to fill holes in your blobs:
bw=imfill(im,'holes');
then do bw-im
and get this:
you can take it from there...
Upvotes: 2