After segmentation how to save number of subobejcts for each objects
13 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Matt J
2024-11-18,15:37
编辑:Matt J
2024-11-18,15:38
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
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!