how to draw a bounding box around an edge detected image?

13 vues (au cours des 30 derniers jours)
Shuvam Routray
Shuvam Routray le 28 Août 2017
Modifié(e) : Shuvam Routray le 29 Août 2017
I have performed edge detection on an image but I have unsuccessful in drawing a single bounding box around the resulting edge detected image using regionprops & BoundingBox() of MATLAB. Also I have tried creating box around blobs having a minimum area (say 50) but that also doesn't work. Help appreciated and thanks in advance

Réponse acceptée

Image Analyst
Image Analyst le 28 Août 2017
Call bwconvhull()
mask = bwconvhull(mask);
props = regionprops(mask, 'BoundingBox');
  1 commentaire
Shuvam Routray
Shuvam Routray le 29 Août 2017
Modifié(e) : Shuvam Routray le 29 Août 2017
I tried mask=bwconvhull(mask,'objects',8) it gave better results than before but still there were some edge detected objects across which it was unable to draw a bounding box
Is there any function which can take a binary image as input and return an image with boundaries across the object unlike bwboundaries() which plot the boundary in the 'figure' only. I was thinking if i would have an image with boundaries then 'regionprops' can perform better in that case in identifying the objects.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by