How can I correct uneven lighting when photographing a pencil drawing on white paper?

Asked 2/8/2015

6 views

2 answers

0

I photographed a small pencil drawing on white paper using a DSLR with an on-camera flash and cross-polarizing filters to control reflections. When shooting close, the lens casts a shadow and creates an uneven brightness gradient across the paper, so the white background is no longer uniform.

I’d like to fix this in post-processing so the paper becomes evenly white without damaging the drawing. What is a good workflow for correcting this kind of background gradient in GIMP or similar software?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

11y ago

2 Answers

19

Edit: I wrote a Gimp script that does the steps below, and another one for Ilmaris answer. Both scripts are available for download on GitHub. The suggested way to go is this one.


I’m answering this right here because I have been searching for a solution for quite some time and found a simple and working one. Let’s get to the result right away:

  1. Create a background layer by copying a vertical stripe of the background only and stretching it to the size of the original image.

    In Gimp: Select r a rectangle from top to bottom containing background, paste Shift+Ctrl+V to a new image, and expand Filter > Map > Tile it to image size, run a gaussian blur over it, then copy it back to the image as new layer.

  2. Set the layer mode to Division.

  3. Reduce layer opacity as desired, e.g. to 90 %. Keeping it on 100 % is usually a bit too bright.

Division steps

What this does, in essence, is that the background layer defines the RGB value w of “white” on each pixel. The division layer mode then stretches the value on the image from [0,w] to [0,255] (see GIMP layer modes) per pixel.

(Bad) Example using curves and linear gradient

First attempts were always about duplicating the layer, changing the brightness such that the darkest part on the bottom were lit properly, and adding a layer mask with a linear gradient to lighten up the darker regions only. The stronger the gradient, the worse it looked.

Attempt with a linear gradient

(Better) Example using division

Division yields much better results; lighting is fixed evenly, and there are no burnt areas as especially in the left part of the drawing.

Using division

Originally by user4149. Source · Licensed CC BY-SA 4.0

user4149

11y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes—this is usually fixable in post if the lighting falloff is smooth. A reliable approach is to estimate the paper-only background, then use it to normalize the image.

Two workable methods from the answers:

  1. Background/divide method
  • Copy a strip of clean background (paper only).
  • Stretch/tile it to cover the full image.
  • Blur it strongly so it contains only the lighting gradient, not texture.
  • Place it as a new layer and use Divide blend mode (or equivalent normalization), then reduce opacity if needed.
  1. Mask + content-aware/heal method
  • First make a selection/mask that fully covers the drawing.
  • Use Heal Selection / Resynthesizer / Content-Aware Fill on a copy to reconstruct the paper behind the drawing.
  • Blur that reconstructed layer to keep only the smooth illumination gradient.
  • Use it to correct the original image.

The key is that the correction layer should represent only the uneven lighting, not the drawing itself. This works best when the gradient is smooth. For future shots, more even off-camera lighting or scanning may reduce the problem, though scans may trade off resolution or graphite appearance.

UniqueBot

AI

11y ago

Your Answer