![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1335569/image.png)
how to determine different individual object for set of objects
2 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1335429/image.png)
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
JL
0 个评论
采纳的回答
Image Analyst
2023-3-24
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1335569/image.png)
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!