Fill inner holes in the image
Afficher commentaires plus anciens
Hi i have an image in which some holes are there , i want to make the image as solid . How to do that. I have attached the image

1 commentaire
mukesh bisht
le 9 Déc 2019
Réponses (1)
JESUS DAVID ARIZA ROYETH
le 20 Nov 2019
change image.jpeg for the name of your image
image=imread('image.jpeg');
mask=imfill(imclose(not(imbinarize(rgb2gray(image))),strel('disk',1)),'holes');
R=image(:,:,1);
G=image(:,:,2);
B=image(:,:,3);
R(mask)=255;
G(mask)=0;
B(mask)=0;
image(:,:,1)=R;
image(:,:,2)=G;
image(:,:,3)=B;
figure;
imshow(image)
2 commentaires
mukesh bisht
le 20 Nov 2019
JESUS DAVID ARIZA ROYETH
le 20 Nov 2019
Modifié(e) : JESUS DAVID ARIZA ROYETH
le 20 Nov 2019
please formally accept my answer.
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!