Filter löschen
Filter löschen

How to calculate area of bounding box?

8 Ansichten (letzte 30 Tage)
mounika siripurapu
mounika siripurapu am 8 Mär. 2016
Kommentiert: Image Analyst am 8 Mär. 2016
What are the possible ways to calculate area of bounding box if we know the width and height of bounding box.

Antworten (2)

Image Analyst
Image Analyst am 8 Mär. 2016
boundingBoxArea = boundingBox(3) * boundingBox(4);
or
boundingBoxArea = prod(boundingBox(3:4));
  4 Kommentare
mounika siripurapu
mounika siripurapu am 8 Mär. 2016
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 am 8 Mär. 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.

Melden Sie sich an, um zu kommentieren.


Chuck Saunders
Chuck Saunders am 8 Mär. 2016
Width times height or height times width.
  3 Kommentare
Chuck Saunders
Chuck Saunders am 8 Mär. 2016
area = width*height;
% or
area = height*width;
mounika siripurapu
mounika siripurapu am 8 Mär. 2016
what is the units for value returned by area? Is it sq.pixels or sq.mm?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by