Mobile app version of vmapp.org
Login or Join
Radia289

: How to remove background in a scan of an old drawing 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

@Radia289

Posted in: #BackgroundRemoval #Gimp

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:


The image is in colour and I would like to keep the colour and just set the paper colour to white.
The colours in the drawings are sometimes very close to the colours of the background.
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.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Radia289

2 Comments

Sorted by latest first Latest Oldest Best

 

@Angie364

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:



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:



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.



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.



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.

10% popularity Vote Up Vote Down


 

@Murray976

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme