How to draw bounding boxes around the ROI obtained by thresholding.
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to highlight the region of interest using rectangular bounding box on the original image.
Can anyone here help me with this?
0 Kommentare
Antworten (1)
Image Analyst
am 4 Apr. 2018
props = regionprops(binaryImage, 'BoundingBox');
for k = 1 : length(props)
thisBB = props(k).BoundingBox;
hold on;
rectangle('Position', thisBB);
end
2 Kommentare
Image Analyst
am 6 Apr. 2018
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().
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!