insertshape auto find the coordinate of the object
1 回表示 (過去 30 日間)
古いコメントを表示
MUHAMMAD NAZMI ZAINAL AZALI
2019 年 11 月 10 日
コメント済み: Image Analyst
2019 年 11 月 10 日
Hi, may i know how to insertshape auto find the coordinate of the object that in black pixel in the image?
0 件のコメント
採用された回答
Walter Roberson
2019 年 11 月 10 日
編集済み: Walter Roberson
2019 年 11 月 10 日
info = regionprops(~TheImage, 'Centroid');
coords = vertcat(info.Centroid);
x_coords = coords(:,1);
y_coords = coords(:,2);
but remember that x corresponds to columns and y corresponds to rows.
2 件のコメント
Image Analyst
2019 年 11 月 10 日
isertShape does not "find" regions in an image. Finding regions is what regionprops() does.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Tracking and Motion Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!