Reputation: 59
I have got the output of bounding box using regionprops
.
For an image I got the output for regionprops('BoundingBox')
as below:
52.5000 70.5000 287 165
Are these 4 coordiantes like leftmost x-coord and y-co-ordinate?
How to calculate bounding box area using the above output.
Please help.
Thanks.
Upvotes: 0
Views: 1339
Reputation: 5148
The first two are the left most x and y coordinates respectively. The next two values are the lengths in the x and y direction respectively (starting from the x and y coordinates). So for area you need to multiply the last two values (e.g., 287*165). For more information see the documentation for regionprops('BoundingBox')
.
Upvotes: 2