필터 지우기
필터 지우기

How to calculate area of bounding box?

조회 수: 8 (최근 30일)
mounika siripurapu
mounika siripurapu 2016년 3월 8일
댓글: Image Analyst 2016년 3월 8일
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
mounika siripurapu 2016년 3월 8일
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.
  댓글 수: 3
Chuck Saunders
Chuck Saunders 2016년 3월 8일
area = width*height;
% or
area = height*width;
mounika siripurapu
mounika siripurapu 2016년 3월 8일
what is the units for value returned by area? Is it sq.pixels or sq.mm?

댓글을 달려면 로그인하십시오.

카테고리

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