Bounding Box set by parameters
显示 更早的评论
Hi, how i can set bounding box if i need that recantagle be then width are biger then height. Sorry for my english. Also add image too easy understand my question.

回答(1 个)
Image Analyst
2016-4-5
Call regionprops():
measurements = regionprops(logical(binaryImage), 'BoundingBox');
bBox = measurements.BoundingBox;
hold on;
rectangle('Position', bBox, 'EdgeColor', 'r');
类别
在 帮助中心 和 File Exchange 中查找有关 Region and Image Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!