How to return the height of a bounding box
2 ビュー (過去 30 日間)
古いコメントを表示
How can I return the height of a bounding box of an object to the work space from an object detection algorithm like Gaussian Mixture Model in matlab
0 件のコメント
採用された回答
Sean de Wolski
2013 年 2 月 27 日
Use regionprops, with the 'BoundingBox' option. The height is the the "width" of the first dimension (rows).
doc regionprops
2 件のコメント
Sean de Wolski
2013 年 3 月 5 日
That's what you want:
x = imread('coins.png')>100;
bb = regionprops(x,'BoundingBox')
bbMatrix = vertcat(bb(:).BoundingBox)
Now the third column is the height and the fourth is the width:
bbMatrix(:,3);%height
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!