MATLAB: What are the properties in a BoundingBox from regionprops

boundingboxImage Processing Toolboxregion

I'm trying to figure out what coordinates are being stored from a BoundingBox. For instance
L=logical(bw);
box=regionprops(L,'Area', 'BoundingBox');
box(2)
And the output
ans =
Area: 127
BoundingBox: [10.5000 11.5000 10 19]
What are those 4 values? Is it the [top left, top right, bottom left, bottom right] coordinates?

Best Answer

It's [left, top, width, height]. Just be aware that the left and top are 0.5 pixels to the left and above, respectively, than the actual first column and first row of the binary image. It's because the Bounding box is defined such that it "contains" the blob, and if it ran right through the center of the top-most and left-most pixel, then that definition becomes somewhat ambiguous.