How to return the height of a bounding box
조회 수: 1 (최근 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!