This is a somewhat detailed discussion of image vignetting, specifically characterizing it and correcting it.  Flat field images are used to quantify vignette characteristics, objectively compare several methods for vignette correction, and develop correction frames for the most accurate results.

Here’s our table of contents:

flat field vignetting

A flat-field image was shot with a Lumix 20mm lens at f/2 on a Panasonic GH4 camera. Vignetting is obvious.

Flat Fields

Flat fields are images of flat, featureless, evenly-illuminated subjects that isolate the light falloff characteristics independent of subject or lighting.  Vignetting characteristics of a system become readily apparent in a flat field.

Opal glass used for shooting flat frames

An optical opal glass plate is about to be placed directly over a lens in preparation for shooting a flat field image.

Shooting a good quality flat field image is a little harder than you may think.  Any details sneaking in or uneven illumination corrupt the usefulness of the frame.  I generally shoot flat fields using optical opal glass which is a very efficient diffuser, much more so than ground glass for example.

  1. Point the camera at an evenly lit featureless subject such as a blank wall or overcast sky.
  2. Using manual or aperture-preferred mode, set the f-stop to the desired setting.
  3. Place the opal glass directly over the lens or lens/filter combination that you are calibrating.
  4. Focus on infinity and make an exposure within a stop or so of middle tonality.
  5. Process the raw image into a 16-bit uncompressed TIFF file using the same default settings you would use for any other image.

With flat field images made for the camera, lens, filter, and f-stop combinations of interest, we can take a closer look at the characteristics to plan strategies for correcting the vignetting.

Graphing Diagonals

Looking at a flat field image, imagine a line running from the center (brightest part of the vignetted image) to a corner (darkest tones due to fall-off).  If we graph the pixel values along this line, and do it similarly for each of the four corners of the image, we get a better grasp of how the light falls off from the center.

graph of light fall-off for Lumix 20mm lens at f/2

Pixel values from center to corners of an image are graphed to show fall-off for Lumix 20mm lens at f/2

For the Lumix 20mm f/2 example we’re using, we notice a couple of things.  First, each of the diagonals running from center to the 4 corners all have nearly identical fall-off characteristics—it’s radially symmetrical about the center.  (This is not always the case as we’ll see later.)  Also the fall-off is not linear:  it starts gradually and then falls off more quickly as you get closer to the corners.

Next we’ll similarly graph several f-stops for this lens for comparison.

A Lumix 20mm lens has light fall-off characteristics graphed for several different apertures.

A Lumix 20mm lens has light fall-off characteristics graphed for several different apertures.

Notice  the lesser amount of fall-off in the corners of the image at smaller apertures (higher f-stop numbers).  For this lens, the fall-off characteristics for all f-stops beyond f/4 are the same as the f/4 case.  (The curves are identical.) There is always vignetting with the lens regardless of f-stop.  But, for the larger apertures the fall-off is greater and the curves have slightly different shapes.

Histograms

histogram for 20mm f/2 flat field image

The histogram for the Lumix 20mm lens at f/2 shows the brighter central region on the right and the light falloff values toward the left.

The histogram for a flat field image showing vignetting is what you might expect.  The width of the tonal values indicates how extensive the light fall-off is.  For the most common forms of vignetting, the central region is the largest and brightest area, therefore showing the spike in tonal values toward the right side of the range.

Statistical Data

Statistical summaries of the pixel value numbers for an image give some useful insight, particularly when we’re looking for indications of the extent of vignetting and the success (or lack of it) in removing it. Photoshop shows some basic statistical summary data on the Histogram window.  For our purposes here, we’re going to use ImageMagick‘s identify command to display a very detailed list of information about the image:

identify -verbose image_file_name

For our Lumix 20mm f/2 flat field image we find the range of values to be 37.89 to 66.04 percent of maximum value (255 for 8 bit images, 65535 for 16-bit images).  So the range of values spans 28.15% of the full range of possible pixel values.  The standard deviation is 5.90.  When dealing with our flat field images, the standard deviation can give a simple single indicator of how successful we are in correcting vignetting.

The Perfect Flat Field

Having looked at the reality of our example flat field in several different ways, we can now look from the same perspective at what the ideal perfect flat field image would look like.

artificial perfect flat frame

A perfect flat field has no vignetting, and no variation in tonal values. This one is artificially created using 50% gray fill.

A perfect flat field (which practical reasons and physical laws prohibit the existence of) is perfectly uniform in tonal value from edge-to-edge and corner-to-corner.

When we apply various vignette correction techniques to our real-world flat field images, this is the ideal result.

Statistically speaking, the perfect flat field has a range of zero.  There is no variation, just the single tonal value throughout.  The standard deviation is also 0.

The histogram for a perfect flat field image would look like this:

Histogram for a perfect flat frame

A perfect flat field has a single pixel value throughout and so  the histogram has a single pixel-width column indicating that value.

All pixels are stacked in that one lonesome value with nothing else contributing any shape to the histogram.

Finally, a graph of the pixel value diagonals in the mythical perfect flat field is equally uninteresting.  Our flat field is flat-lined.

 

 

perfect flat frame diagonals graph

Pixel values from center to corners of a perfect flat field are uniform throughout and graph as a perfect flat line.

Next Up: Correcting Vignetting

Now that we have a better understanding of vignetting and a few different ways to quantify and characterize it, we can explore some ways to correct it.  That is, we want to turn our vignetted flat field image, that we shot with a specific camera, lens, f-stop, and filter combination, into the perfect pristine tonally-uniform theoretical flat field.  If we can do that, removing vignetting from our usual photographs should be straight-forward and effective.

We’ll take a look at several ways to do that and, armed with our visualization tools we’ve just described, assess how well the techniques do their jobs.