Removing unwanted components in a binary image?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Heloo... am working on pothole images. Below is the binary image of pothole attached and i wanted to remove the unwanted components sorrounding the pothole and i want only the pothole image as the output without any unwanted areas, could anyone help me?
thanks in advance...:)
2 commentaires
Réponses (2)
KALYAN ACHARJYA
le 16 Fév 2020
Modifié(e) : KALYAN ACHARJYA
le 16 Fév 2020
BW=bwareafilt(bw_im,1);
result=bw_im-BW;
imshow(result);
If you are more interested to control the small area objects use this function
2 commentaires
KALYAN ACHARJYA
le 17 Fév 2020
Apply imclose on the resultant binary image with proper structuring element objects
Image Analyst
le 16 Fév 2020
You need to define what you want. For example, do you want just the largest blob with bwareafilt(bw, 1)? Or blobs larger than a certain area with bwareaopen(bw, someArea)? Do you want to fill holes with imfill(bw, 'holes')? Also you should make sure your initial segmentation gives the pothole(s) as white, not black, since binary operations are done on true/white/1 valued pixels, not false/black/0 valued objects.
0 commentaires
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!