MATLAB: How to measure the horizontal and vertical axis length of an object

Image Processing Toolboxregionprops

I want to measure the horizontal and vertical axis length of the object in the attached image. How can I do that?

Best Answer

props = regionprops(binaryImage, 'BoundingBox');
horizontalWidth = props.BoundingBox(3);
verticalHeight = props.BoundingBox(4);
Related Question