In MATLAB I have the following code:
props = regionprops(bw,'BoundingBox');
v = cat(1, props.BoundingBox);
and v returns this: [194.5000, 156.5000, 378.0000, 154.0000; 325.5000, 342.5000, 160.0000, 160.0000]
In Python:
label_img = label(bw, connectivity = bw.ndim)
regions = regionprops(label_img)
v = np.array([p.bbox for p in regions]).reshape(2,4)
and this time v returns: array([[156, 194, 310, 572], [342, 325, 502, 485]])
Some numbers are similar but I don't know what they really mean. ¿Does anyone knows how can I get the same result in MATLAB?