I want to remove small spots from a greyscale image without affecting the rest of the image
Ältere Kommentare anzeigen
See the attached image for reference. I want to remove the white spot encircled in the image without affecting much the rest of the image. I dont mind losing the dot smaller than the one in the circle but nothing bigger.
I tried bwareaopen but it converts my image to binary which I do not want! I want to keep it in grayscale but remove the dots. thanks for any help!
2 Kommentare
Julian Hapke
am 15 Jun. 2017
I'd suggest you use a binary array of that image as a mask. look for areas in the binary image that are connected and determine the size of those connected regions. if the region in below a threshold, remove it. use
imbinarize
Julian Hapke
am 15 Jun. 2017
Bearbeitet: Julian Hapke
am 15 Jun. 2017
had to read about bwareaopen, seems exactly what you need. you can then use the cleaned binary image as an index to set the pixels of your original image to black or whatever grey you want there.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Red finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!