Identify objects based on their centroid
14 次查看(过去 30 天)
显示 更早的评论
I want to identify objects from a binary image based on their centroid and highlight them. How can I do that?

0 个评论
回答(1 个)
Image Analyst
2022-6-18
To get the centroids for your binary image, which I'll call mask
props = regionprops(mask, 'Centroid');
xyCentroids = vertcat(props.Centroid)
Now, explain why you mean by highlighting them based on their centroid, because I don't know what that means.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!