How to draw bounding boxes around the ROI obtained by thresholding.
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to highlight the region of interest using rectangular bounding box on the original image.
Can anyone here help me with this?
0 Commenti
Risposte (1)
Image Analyst
il 4 Apr 2018
props = regionprops(binaryImage, 'BoundingBox');
for k = 1 : length(props)
thisBB = props(k).BoundingBox;
hold on;
rectangle('Position', thisBB);
end
2 Commenti
Image Analyst
il 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().
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!