Filling gaps in binary images

4 visualizaciones (últimos 30 días)
John
John el 11 de Oct. de 2013
Comentada: John el 11 de Oct. de 2013
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 comentarios
Anand
Anand el 11 de Oct. de 2013
Can you post the image...
John
John el 11 de Oct. de 2013

Iniciar sesión para comentar.

Respuesta aceptada

Jeff E
Jeff E el 11 de Oct. de 2013
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 comentario
John
John el 11 de Oct. de 2013
This seems to work. Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by