After segmentation how to save number of subobejcts for each objects
Show older comments
Hallo everyone,
I have some objects which is formed by small circles, I use imfindcircles to find how many circles to form each object, example is as below,

Now I want to save number of circles for each object, in this image there are 9 objects, and circles for each object is 3,4,1,2,2,2,1,1,2. how to save save these data individually? and I also want to save this images after image processing.
Thanks and best regards
Answers (1)
If you mean you want to extract the sub-images forming the bounding box of each circle, then perhaps something like the following?
subImages=cell(1,numCircles);
for i=1:numCircles
mask=drawcircle(Radius=r(i),Center=c(i,:)).createMask;
subImages{i} = regionprops(mask,yourImage,'Image').Image;
end
Categories
Find more on National Instruments Frame Grabbers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!