clear connected pixel touching a non square border
Mostrar comentarios más antiguos
hi, i am trying to remove the border objects from an image of an octogonal sample. plese see the image
i would like to know if there is a way to create a mask that is octogonal and then perhaps apply imclearborder.
other suggestions are very welcome.
thank, S
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 17 de Feb. de 2012
1 voto
Threshold to get the dark outer octagon. You might need to dilate this a layer or two. Then threshold to get the bright particles. Then AND those two together. This gets you a combined binary image that has both the dark surround and the bright inner particles. Then call imclearborder() and subtract from your original combined binary image to get a binary image of just the dark surround and the particles that touch it. Then use that to mask out (zero out, erase) the bright particles that touch the border from your original image.
Your flickr web site says "The owner has disabled downloading of their photos" so I can't get a copy unless you want me to.
1 comentario
Sharif
el 21 de Feb. de 2012
Categorías
Más información sobre Convert Image Type en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!