How to fill holes having area less than some maximum threshold value?
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
peyush
el 18 de Jul. de 2015
Comentada: peyush
el 18 de Jul. de 2015
I have a binary image, I want to fill only those holes having area less than say 20, and holes having area more than that remains unfilled...how can I do this...any sort of help is appreciated
0 comentarios
Respuesta aceptada
Image Analyst
el 18 de Jul. de 2015
Invert the image so that the holes are now foreground blobs, then call bwareaopen, and invert again
binaryImage = ~bwareaopen(~binaryImage, 20);
Más respuestas (0)
Ver también
Categorías
Más información sobre Recognition, Object Detection, and Semantic Segmentation en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!