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

13 ビュー (過去 30 日間)
Shuvam Routray
Shuvam Routray 2017 年 8 月 28 日
編集済み: Shuvam Routray 2017 年 8 月 29 日
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

採用された回答

Image Analyst
Image Analyst 2017 年 8 月 28 日
Call bwconvhull()
mask = bwconvhull(mask);
props = regionprops(mask, 'BoundingBox');
  1 件のコメント
Shuvam Routray
Shuvam Routray 2017 年 8 月 29 日
編集済み: Shuvam Routray 2017 年 8 月 29 日
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.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by