How to calculate area of bounding box?
Show older comments
What are the possible ways to calculate area of bounding box if we know the width and height of bounding box.
Answers (2)
Image Analyst
on 8 Mar 2016
boundingBoxArea = boundingBox(3) * boundingBox(4);
or
boundingBoxArea = prod(boundingBox(3:4));
4 Comments
mounika siripurapu
on 8 Mar 2016
Guillaume
on 8 Mar 2016
Seriously? what is the difficulty in calculating the area of a rectangle?
mounika siripurapu
on 8 Mar 2016
Image Analyst
on 8 Mar 2016
Units are the square of whatever units your width and height are, unless it's in pixels because we usually talk about pixels regardless if it's a distance or an area (i.e. we usually don't say the area is in pixels squared).
To get the answer in some real world units, such as cm or m or whatever, see my attached demo.
Chuck Saunders
on 8 Mar 2016
0 votes
Width times height or height times width.
3 Comments
mounika siripurapu
on 8 Mar 2016
Chuck Saunders
on 8 Mar 2016
area = width*height;
% or
area = height*width;
mounika siripurapu
on 8 Mar 2016
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!