How to remove unwanted object?
Afficher commentaires plus anciens
I want to remove the pointed object in my attached image. The boundary between these two objects has been split using marker-controlled watershed. I've tried to remove this object using imclearborder with connectivity 4. But, it also removes the region of interest. I also tried to label the image(bwlabel). The number of object returned is 1. I think it should be 2.
How can I remove this unnecessary object?

Réponses (1)
Image Analyst
le 2 Jan 2018
If the remaining connection gugu pointed out is touching by just a corner, rather than a full side of a pixel, then you can change the connectedness of the process from the default 8 to 4:
binaryImage = imclearborder(binaryImage, 4);
4 commentaires
gugu
le 2 Jan 2018
Image Analyst
le 2 Jan 2018
But what you've just said and provided gets us no closer to helping you. Attach the actual, non-annotated binary image.
gugu
le 3 Jan 2018
Modifié(e) : Image Analyst
le 3 Jan 2018
Image Analyst
le 3 Jan 2018
Yeah, it might work but it's description is SO vague, "For grayscale images, imclearborder tends to reduce the overall intensity level in addition to suppressing border structures" that who knows what it is really doing? I sure don't.
Catégories
En savoir plus sur Axis Labels 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!