draw bounding box around a character

조회 수: 4 (최근 30일)
Elysi Cochin
Elysi Cochin . 2020년 5월 24일
댓글: Elysi Cochin . 2020년 5월 25일
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

채택된 답변

Image Analyst
Image Analyst 2020년 5월 24일
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');
end
  댓글 수: 3
Elysi Cochin
Elysi Cochin 2020년 5월 25일
Thank you Sir. The last comment worked. Its working in both methods

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by