0

I often receive scanned documents that has dots and grains in them. I often use the paintbrush in gimp to manually remove them, but it occurs to me that all the dots share so many similarities that a simple algorithm should be able to "white" them out automatically.

Take this example: enter image description here

If blacks surrounded by whites in a given area is detected then select that said area for further processing:

enter image description here

Does anybody know of any scripting-way or plugin that can do such a thing?

2
2

There's a filter in the G'MIC plugin that could be used to get rid of the majority of the dots, although some larger ones may be left behind. It's located under Filters > G'MIC > Repair > Descpeckle

Before and After

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.