How do I remove the unwanted white part of the grayscale image?
Afficher commentaires plus anciens
I used the camera to collect a series of images from a line laser hitting a small rotating metal ball and processed them accordingly. Now I only want to keep the images that belong to the outline of the blob, I want to remove the other invalid white parts, how can I achieve this? The parts circled by the red pen are the ones I want to remove.
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 7 Jan 2023
Déplacé(e) : Walter Roberson
le 7 Jan 2023
0 votes
dilate the image to join close groups. bwareafilt to keep the largest only. regionprops to find the edge trace. Use that to extract from the un-dilated image. (I was going to suggest bounding box instead of edge trace but bounding box can have problems with accidentally including additional sections from another branch that happen to curve through the same rectangle.)
1 commentaire
Sterne_17
le 8 Jan 2023
Catégories
En savoir plus sur Image Preview and Device Configuration 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!
