draw bounding box around a character

7 views (last 30 days)
The code i used is
Ch = bw(boundrow(1):boundrow(end),boundcol(1):boundcol(end));
i'll get the character into the variable Ch
how can i draw a bounding box in the image

Accepted Answer

Image Analyst
Image Analyst on 24 May 2020
Presumably you used regionprops()
props = regionprops(binaryImage, 'BoundingBox');
% Plot all the bounding boxes.
hold on;
for k = 1 : length(props)
rectangle('Position', props(k).BoundingBox, 'EdgeColor', 'y');
Elysi Cochin
Elysi Cochin on 25 May 2020
Thank you Sir. The last comment worked. Its working in both methods

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!