How to return the height of a bounding box
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 27 Feb. 2013
Use regionprops, with the 'BoundingBox' option. The height is the the "width" of the first dimension (rows).
doc regionprops
2 Kommentare
Sean de Wolski
am 5 Mär. 2013
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Segmentation and Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!