How to calculate area of bounding box?

8 次查看(过去 30 天)
What are the possible ways to calculate area of bounding box if we know the width and height of bounding box.

回答(2 个)

Image Analyst
Image Analyst 2016-3-8
boundingBoxArea = boundingBox(3) * boundingBox(4);
or
boundingBoxArea = prod(boundingBox(3:4));
  4 个评论
mounika siripurapu
I used area=width*height. But it gave me wrong answer. Actually I made a mistake and now I rectified it. I got the right answer.
Image Analyst
Image Analyst 2016-3-8
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
Chuck Saunders 2016-3-8
Width times height or height times width.

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by