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 Kommentare

Anand
Anand am 11 Okt. 2013
Can you post the image...
John
John am 11 Okt. 2013

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Jeff E
Jeff E am 11 Okt. 2013

0 Stimmen

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.

Weitere Antworten (0)

Gefragt:

am 11 Okt. 2013

Kommentiert:

am 11 Okt. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by