clear connected pixel touching a non square border
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Image Analyst
il 17 Feb 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 Commento
Sharif
il 21 Feb 2012
Categorie
Scopri di più su Convert Image Type in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!