필터 지우기
필터 지우기

How to find the area of each bounding box of an image?

조회 수: 3 (최근 30일)
Shikhar Ghimire
Shikhar Ghimire 2019년 4월 17일
편집: Shikhar Ghimire 2019년 4월 17일
How do you calculate area of bounding box?

채택된 답변

Walter Roberson
Walter Roberson 2019년 4월 17일
BB = vertcat(compBinaryFeat.BoundingBox);
BBarea = BB(:,3).*BB(:,4);
Caution: the bounding box of the center object includes the bounding boxes of two smaller objects. You should think about whether you really want the area of the bounding boxes, or if instead you want the areas of the objects -- which you can get by requesting the Area property.
Also I suggest you look at bwareafilt() unless you are using an older MATLAB.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by