Clear Filters
Clear Filters

how to determine different individual object for set of objects

1 view (last 30 days)
Hallo everyone,
From this image you could see three set of objetcs.
I have already know how to determin the number of this set of objects
Now I would like to know how to determine the number and size of invidual object for each set of objects, for example, the left objects are formed by three single object, middel is 5, the last is 2. Total number of single objesct is 11, I also would like to number of each objects.
thanks in advance

Accepted Answer

Image Analyst
Image Analyst on 24 Mar 2023
What I'd do is to try to threshold for that thin dark ring around the objects. Then call imclearborder() to get rid of the background and leave just the objects, which hopefully will not be touching. Then use regionprops to measure things about them.
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
If that doesn't work, then you might have to threshold for the blue objects and then call imerode to separate them. But then they will be a layer smaller than before so you'll have to use bwlabel and ismember to extract the blobs one at a time, then use imdilate to grow them back out to the original size and then call regionprops.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!