In the previous post we discussed converting a flat field image into a correction image which we then apply, using a divide operation, to remove vignetting.  The technique used several ImageMagick commands.  We can accomplish the same thing in Photoshop: it’s a simple sequence of steps which, under the covers, does the same thing we did with the ImageMagick approach.

For this description we’re using Photoshop CC 2015.  Other versions may have some differences.  We’re going to do the same two things we did in the ImageMagick procedure, except using Photoshop layers rather than command-line options:

  1. Create a correction image by dividing each pixel value by a factor that scales the brightest pixels up to a value of 1 and all other pixels scaled up proportionally. (We’ll use a Levels adjustment to do this.)
  2. Use the correction image to divide into the subject image to correct the brightness levels to remove vignetting. (We’ll use a Divide blending mode layer for this.)

Create A Correction Image

We’re going to create a correction image from our flat-field image that we can then use to remove vignetting on any image shot with the same camera/lens/filter/aperture combination.

  1. Open the flat field image in Photoshop.
  2. Add a Levels Adjustment Layer.
  3. In the Levels control, hold down the alt key and move the highlight (white) triangle slider left toward the histogram mass of the flat field image.  Keep an eye on the image and stop just when the totally black image starts showing some brightness levels.  The slider will be just touching the right edge of the histogram’s non-zero values.Photoshop Levels adjustment
  4. Flatten the image and save it as an uncompressed TIFF file.  This is your new correction image which you’ll use to correct vignetting in other images.

Add a Correction Layer

Correcting vignetting in a subject image is simple with a properly-prepared correction image available.  We’re just going to add the correction image as a layer above the subject (Background) image and change the blend mode.

  1. Open the subject image in Photoshop.
  2. Click File, then Place Embedded… and select the correction image you prepared previously.  Click Enter to accept the placed image. This adds the correction image as a layer above the subject Background image.
  3. Change the layer blending mode of the correction image layer to Divide.  You’re done.  Save the image.
A Photoshop correction image layer uses the Divide blend mode to remove vignetting from the subject image.

A Photoshop correction image layer uses the Divide blending mode to remove vignetting from the subject image.

The Results

Applying the correction Divide layer to our vignetted flat field test case yields excellent results, as expected after what we experienced doing the same thing with ImageMagick previously.

Using a Divide layer correction in Photoshop removes vignetting from the test flat field image.

Using a Divide layer correction in Photoshop removes vignetting from the test flat field image.

Statistically, the results are nearly perfect.

Photoshop Divde-layer corrected Lumix 20mm f/2 flat frame
Attribute Before After
Mean 57.69 65.89
Min 37.89 65.89
Max 66.04 66.04
Range 28.15 0.93
Standard Deviation 5.90 0.00001
vignette correction histogram for Photoshop layer method

After applying a Divide-layer correction to the flat field image, the histogram shows a perfect correction.

The histogram for the corrected flat field image looks perfect as well.

 

 

 

 

 

 

 

 

Example

An image of a brace and bit on a concrete floor is plain enough that vignetting, and its correction are readily apparent.

The Multiply Alternative

The process described above corrects vignetting by lightening the parts of the image that suffered fall-off, reversing the darkening that becomes more prominent farther from the center of the image.   Another way to address the problem is to darken the center portion to bring the levels down proportional to the corner levels.  This is usually not the preferred choice but there may be circumstances where this alternative is preferable.  For example, raising levels toward the corners may blow out important highlights that you wish to preserve so the darkening approach may be called for.

Briefly, here is how to darken lighter portions rather than lighten darker portions to correct vignetting.  First, you will want to create your correction flat differently than the original approach.  Invert the flat field image first, then add a Levels correction layer, click Alt, and move the white slider left until you start to see non-black regions in the image showing.  (This time it will be the corners rather than the center because you inverted the image.)  Save the correction image as an uncompressed TIFF file.

To apply the correction using this inverted correction flat, load the subject image, then load the correction image as a layer above it.  Change the blending mode of the correction layer to Multiply.  That will cause the lighter central region to darken in line with the corner regions, removing the vignetting.  This darkens the overall appearance of the image so another adjustment may be required to bring the levels back up to where you want them.

Here’s a comparison of the Divide blending mode correction (raising darker tones) and the Multiply blending mode correction (lowering lighter tones):

Although equally effective at removing vignetting, clearly the Divide blending mode layer technique yields a better overall tonal result, as it will in most cases.