How to draw bounding boxes around the ROI obtained by thresholding.
조회 수: 3 (최근 30일)
이전 댓글 표시
I want to highlight the region of interest using rectangular bounding box on the original image.
Can anyone here help me with this?
댓글 수: 0
답변 (1개)
Image Analyst
2018년 4월 4일
props = regionprops(binaryImage, 'BoundingBox');
for k = 1 : length(props)
thisBB = props(k).BoundingBox;
hold on;
rectangle('Position', thisBB);
end
댓글 수: 2
Image Analyst
2018년 4월 6일
You have to switch the current axes to the one you want to put the boxes onto. For example call subplot() or axes() before you call rectangle().
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!