how to determine different individual object for set of objects

조회 수: 2 (최근 30일)
Jialin Men
Jialin Men 2023년 3월 24일
답변: Image Analyst 2023년 3월 24일
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

채택된 답변

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by