8

I have the following image which I would like to clean using GIMP. Usually, with B&W images one of the following methods works, see here or here. However, I have 3 additional problems in this case which make the mentioned methods unusable:

  1. The image is in colour and I would like to keep the colour and just set the paper colour to white.

  2. The colours in the drawings are sometimes very close to the colours of the background.

  3. I believe the paper was stored folded and hence there are ghost images in it, especially in noticeable in the rightmost drawing.

Could you tell me how to clean such images using GIMP (or any other free tool)? Many thanks in advance.

Image with yellowish background

2
  • As a start, increase the brightness of the image to try to reduce the sepia tone of the paper - it looks like tobacco damage to me. Commented May 11, 2016 at 11:52
  • 1
    I don't know of an easy way to do this with gimp. I would suggest using the free select to trace around the edges. See this tutorial and this tutorial. Although depending on the publication intent, it might be neat to leave the old tymey sepia look. The image is actually interesting as is in my opinion. Commented Jun 11, 2016 at 0:24

3 Answers 3

16

There are different ways to do this, but the way I would do it in GIMP is roughly:

  • Color erase tool to remove the bulk of the sepia color.
  • Manual erasing of dark spots which are darker than light "image" areas, as these can't be done using levels.
  • Levels to tidy up.
  • Final color adjustments based on the image properties

In your case, the blue areas might need to be re-saturated or otherwise boosted afterwards to restore intent, as it's pretty faint, even in the original.

Set up

Let's start with opening the file in GIMP. Then, add a white layer under the image to act as a backdrop when we start erasing things. Without that, you'd get a the checkerboard grid, which will drown out image details.

Now, re-select the original image layer (should be the top layer). Add an alpha channel to it (Layer > Transparency > Add Alpha Channel). This is needed for Color Erase to work. As we erase the color we don't like, the white backdrop will shine through.

Color erase

Using the dropper tool, select a "representative" sample of the sepia background. We will erase this color from the image.

Now, select the Paintbrush Tool, and in the options, put it into Color erase mode. Choose a large size, and paint over the entire image. You should see the bulk of the sepia color fall away, leaving you with a fairly pale background and the image:

First background erasure

We now have a lot more contrast between background and image. There's still some color left in the background, which is because the color we erased isn't exactly the background color of the whole image. \

The top layer is now a gauzy mess of quite intense color with a low alpha. if you try to use the dropper tool on the background now, you'll see the color is much more intense than it looks. At this point, I remove the top layer alpha channel (Layers > Transparency > Remove Alpha Channel), then add it back, to "reset" it. Then you can select a new background color and erase it again, repeating a few times if needed:

A few more rounds of Color Erase

Tidying up

From here, it starts to get more fiddly. Most of the junk left now is actually darker than than the light areas of the image, which means that you can't just hit it with the eraser or levels and hope for the best.

The first thing to do is to use the normal Eraser tool to wipe out major noisy features, for example the shadowed images and dark spots. You don't need to worry about anything significantly lighter than the lightest detail of the image, but it doesn't hurt to hit anything if you're in an area.

If you have defects in an image area, you might need to fix it manually, for example with the Clone tool. There's not a lot that can be done about that automatically, as the image data and defects are very similar.

Manually removed worst noise

I'm not going to do the text here, as that's just more fiddling, but the concept is the same. It might need a bit more color erase too, as the top of the image has a different background tint.

For the second panel, that's going to need some similar care to remove the stains, but with the added complication of the background detail. The Clone tool might help here.

Levels

Now we have all the background essentially wiped out, leaving just very pale noise. We will remove this with the Levels tool.

In the Colours > Levels... dialog, bring the white input level down a bit. Perhaps to around 247. This has the effect of "blowing" any color lighter than than that into pure white, and stretching out the rest of the scale to fit.

At this point you might also consider moving the black input level as well to deepen any "almost black" color to pure black. Adjusting the grey point can also help the image. In this case, moving the grey point down brings the blue of the sections out well, but you'd probably want to do that just for the right areas, as the second panel doesn't respond so well.

Color adjustments

The last step I'd do is to manually adjust the color according to what we know of the image. The line drawings are all greyscale, so we'll desaturate them to remove any left-over color casts. If the image was pure greyscale, we could do the whole image using Colour > Desaturate..., but it's not, so we'll use the Paintbrush Tool in Saturation mode.

After level adjustment and desaturation

And that's as far as I'll take it. The main remaining defect is the vertical "stripe" in the second panel. Fixing that isn't really a background-remove task. Just lightening and adjusting the color with Dodge and Color modes of the Paintbrush, maybe with a bit of Clone Tool might be enough.

Some areas, especially the blue ones, might need some artistic license to reconstruct the original intent. With more time and care in each step than I took here, you'll get a much better result: this is just a proof of concept.

Comparison of before and after

1
  • 1
    Excellent answer, +1! Welcome to GD.se—I hope you stick around to provide more of this type of high-quality answers. Commented Jul 31, 2017 at 23:38
0

In Photoshop, I'd use the magic wand tool to quickly select the obvious sepia colours of the background. I'd convert this to a mask. I'd then go into quickmask mode - press 'q' - and using the pen, trace around the edge of the mask and fill it.

This will then make the masked area transparent, so I'd add a white background layer below the layer with the image set to the background colour that I wanted.

This is relatively easy for the image you have.

In the case of the coloured image, I'd certainly work on either applying filters to bring out the coloured areas (maybe duplicate the layer, and apply a multiply overlay effect), or, trace around the coloured parts and then ctrl+shift+u to adjust the colours.

0

There's an app called turbo scan that does this all for you automatically from a picture with your smartphone. God this could have saved me so much time if I had realized that I just needed to adjust the settings a little bit to get rid of the background noise

2
  • 2
    Sample picture of your results? Also, it i is very difficult to have a truly accurate reproduction with a smartphone (the OP is asking about a scan), the slightest misalignment causes perspective distortion.
    – xenoid
    Commented Jan 10, 2019 at 13:15
  • Well the software has a feature for correcting that and most people ending up on this page want a quick fix rather than becoming a digital artist
    – HaHe
    Commented Jan 11, 2019 at 14:16

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