Identify objects based on their centroid
조회 수: 13 (최근 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!