how can remove circle from an image?
Afficher commentaires plus anciens
hi I have this image

how can I remove the circles that are not fill?? when I use imfiil the images merge but I want to obtain this image as result:

Réponse acceptée
Plus de réponses (1)
If thickness of circle boundary is exactly 1 pixel, then its easy.
Loop over each point. For any point, (i,j) there are four pairs of surrounding points:
left (i, j-1) right (i, j+1)
top (i-1, j) bottom (i+1, j)
top-left (i-1, j-1) bottom-right (i+1, j+1)
top-right (i-1, j+1) bottom-left (i+1, j-1)
If there is at least one pair with both points black AND at least one pair with both points white, then make the point black.
Maybe you can extend the idea to circles whose boundary has > 1 thickness.
Catégories
En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
