Can someone help me filling holes in the image attached and make it a perfect binary image with all holes filled?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Shreyansh Dubey
am 12 Sep. 2018
Beantwortet: Image Analyst
am 12 Sep. 2018
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/195650/image.jpeg)
I want that inside the boundary of the humanoid it should be white, ie all the black holes inside white boundary should be filled in white be it small or big. Please if any one can help me and teach me how to do this kind of filling automatically through a script that works for all other images of this kind. If in case complete hole filling in the below image is not possible, then please tell me how can I fill holes in the next smaller image which is just the cropped (1/4)th of the bigger image.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/195652/image.jpeg)
0 Kommentare
Akzeptierte Antwort
Steven Beumer
am 12 Sep. 2018
You might want to have a look at binary morphological operators like opening and closing: https://www.cs.auckland.ac.nz/courses/compsci773s1c/lectures/ImageProcessing-html/topic4.htm https://nl.mathworks.com/help/images/ref/imclose.html
they should do the trick for this kind of problems
0 Kommentare
Weitere Antworten (1)
Image Analyst
am 12 Sep. 2018
There is a function made specifically for this operation. Simply call imfill():
filledImage = imfill(binaryImage, 'holes');
0 Kommentare
Siehe auch
Kategorien
Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!