Switch to full style
Ask all general Gimp related questions here
Post a reply

Remove Stain from Image

Tue Apr 06, 2021 7:07 pm

GIMP Version: 2.8.14
Operating System: Windows
OS Version: 10
GIMP Experience: New User



I have an image of a map that has a stain on it in multiple places. I am trying to get rid of the stain. I have tried Colors/Map/Color Exchange... and Colors/Map/Rotate Colors... without success. I think I am missing a step from the Color Exchange because it never does anything even though it appears to be working. There are two primary background colors. One where the stain is over water and one where it is over land. Both are quite close in color though. I could use masking or something else for these areas, but I can't do that for all the words and lines. What is the best approach to fixing this?


Thanks for any suggestions.

Here is a small part of the map.

map.PNG
map.PNG (649.74 KiB) Viewed 19920 times

Re: Remove Stain from Image

Tue Apr 06, 2021 8:07 pm

A quick try.
Removing the stains and using masks to restore the original colors was my attempt, but the process would require attention to detail and some time availability.

There must be a technique that is faster and more efficient, perhaps some G'MIC filter.

Re: Remove Stain from Image

Tue Apr 06, 2021 8:14 pm

Image

I found there was an inner discoloration and an outer discoloration.
I duplicated the layer and only worked on the top layer.
G'MIC > details > freaky details (because you lose print clarity with next operations)
Free-selected with fuzzy select the inner portion of stain. I used colors > curves to lighten it and then did the same with the outer stain. May have to do the text details again with freaky details.
Then adjust opacity and lower layer to original.

Re: Remove Stain from Image

Wed Apr 07, 2021 3:04 am

Use the Wavelet decompose, after decomposing, two different techniques:

1) Use Filter>Blur>Pixellize to completely blur (replace by its own average) the Residual layer (and possibly the layer immediately above):

BlurredResidual.png
BlurredResidual.png (628.54 KiB) Viewed 19865 times


2) Copy the Residual filter to the top (above the decomposition group) and set it to "divide" mode:

DivideResidual.png
DivideResidual.png (362.24 KiB) Viewed 19865 times

Re: Remove Stain from Image

Wed Apr 07, 2021 1:56 pm

Thanks for these tips. I will try them after work today and tomorrow.

Re: Remove Stain from Image

Wed Apr 07, 2021 10:30 pm

Using the Clean text filter (under repair) in GMIC would also give you something to overlay to get your text back
Image
Post a reply