How to draw bounding boxes around the ROI obtained by thresholding.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to highlight the region of interest using rectangular bounding box on the original image.
Can anyone here help me with this?
0 commentaires
Réponses (1)
Image Analyst
le 4 Avr 2018
props = regionprops(binaryImage, 'BoundingBox');
for k = 1 : length(props)
thisBB = props(k).BoundingBox;
hold on;
rectangle('Position', thisBB);
end
2 commentaires
Image Analyst
le 6 Avr 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().
Voir également
Catégories
En savoir plus sur Image Data Workflows dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!