Bounding Box set by parameters
Show older comments
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.

Answers (1)
Image Analyst
on 5 Apr 2016
Call regionprops():
measurements = regionprops(logical(binaryImage), 'BoundingBox');
bBox = measurements.BoundingBox;
hold on;
rectangle('Position', bBox, 'EdgeColor', 'r');
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!