Borrar filtros
Borrar filtros

Filling specific holes in an image without changing edges

2 visualizaciones (últimos 30 días)
AAS
AAS el 24 de Jul. de 2022
Editada: Matt J el 24 de Jul. de 2022
I tried doing a pixel wise hole filling operation that is if its surrounded by pixels whose sum exceeds a certain number, fill it. However, this seems to thicken edges as expected. Is there any way I can fill these small holes in the image without changing edge dimensions?
Thanks
  1 comentario
Catalytic
Catalytic el 24 de Jul. de 2022
Editada: Catalytic el 24 de Jul. de 2022
However, this seems to thicken edges as expected.
No idea what you're talking about. Where is the demonstration of this?

Iniciar sesión para comentar.

Respuestas (1)

Matt J
Matt J el 24 de Jul. de 2022
Editada: Matt J el 24 de Jul. de 2022
k=[1 1 1; 1 0 1; 1 1 1];
mask=conv2(YourImage,k,'same')>threshold;
YourImage=regionfill(YourImage,mask);

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by