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개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by