Filling gaps in binary images

3 ビュー (過去 30 日間)
John
John 2013 年 10 月 11 日
コメント済み: John 2013 年 10 月 11 日
I have a binary images of tree clusters, when I imshow(BW), some single trees are separated from the main cluster by 1 pixel. Is there a way to make single trees to be part of the nearest cluster. I've tried bwfill, didn't work.
  2 件のコメント
Anand
Anand 2013 年 10 月 11 日
Can you post the image...
John
John 2013 年 10 月 11 日

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

採用された回答

Jeff E
Jeff E 2013 年 10 月 11 日
If it really is just one pixel, then try this:
BW2 = bwmorph(BW, 'bridge');
If it is more than one pixel, then take a look at IMCLOSE. This will affect the entire binary boundary in the image, however.
  1 件のコメント
John
John 2013 年 10 月 11 日
This seems to work. Thanks

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by