How to find the area of each bounding box of an image?
1 次查看(过去 30 天)
显示 更早的评论
How do you calculate area of bounding box?
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!