How can i find the both endpoints coordinates for a particular label number ?

1 回表示 (過去 30 日間)
sufian ahmed
sufian ahmed 2017 年 9 月 18 日
コメント済み: sufian ahmed 2017 年 9 月 18 日
First I label the image. so if i want to find the endpoints coordinates for a specific label then what i need to do ?

回答 (1 件)

Guillaume
Guillaume 2017 年 9 月 18 日
See the 'BoundingBox' property returned by regionprops that you can call directly on your labeled image.
stats - regionprops(yourlabeledimage);
desiredboundingbox = stats(desiredlabel).BoundingBox

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by