- Vignetting 1: Overview
- Vignetting 2: Parametric Correction (this post)
- Vignetting 3: Correction Images
- Vignetting 4: Photoshop Divide Layer
- Vignetting 5: A Pathological Example
- Vignetting 6: Other Options and Summary
In the introductory vignetting post, we showed some graphs that make it easy to see the fall-off in pixel values along a diagonal running from the center to a corner. We can use the same technique to get some insights into how parametric vignetting correction works in various software tools. Adobe Camera Raw, Photoshop, and Lightroom all have the parametric sliders to change vignetting characteristics. They use two controls in tandem: the Amount slider and the Midpoint slider.
We can run some experiments by creating an artificial perfect flat field image and trying some different control settings to see the effect. Start with a flat field filled with uniform 50% gray.
When removing vignetting from an image, we move the Amount slider to the right in the plus (+) direction to lighten the periphery of the image. We’ll try several different settings for the Amount, keeping the Midpoint at its default 50 setting.
From this we see that when Midpoint is 50, the Amount curves only start having an effect on the pixel values starting at around 40% of the distance from the center to a corner. The Amount effect tops out at setting 100 where it has increased the corner pixel values by about 40% of the range of possible values.
Next we try keeping the Amount fixed (at +60) and vary the Midpoint to see how it affects the curves.
Regardless of the varying Midpoint, the effect of the Amount setting is the same at the extremes: no affect on center pixel values, and identical increases in pixel values at the very corners of the image. The Midpoint slider changes the shape of the curve, that is it affects how the brightness adjustment gets from the center value to the corner values.
Lightroom Vignette Correction
The previous 2 graphs of how the Amount and Midpoint parametric adjustments affect the pixel levels in the flat images suggest a straight-forward strategy to correct our vignetted flat field images. Conceptually, we want to find the two parametric settings that perform an inverse function of the vignetted image’s fall-off. Put another way, we want to find the mirror image curve that most closely resembles the vignette curve so that the two cancel each other out.
Using Adobe Lightroom’s controls, proceed as follows (understanding that the same approach can be used in Photoshop, Camera Raw, and other similar parametric control types of corrections):
- Open the vignetted flat field image we want to correct in the Develop Module. Open the Lens Corrections section so we have easy access to the vignette sliders.
- Mouse over the center of the image and note the green channel pixel value percentage displayed in the Histogram Pane. (The green channel is usually the cleanest of the three channels; it’s an arbitrary choice otherwise.)
- Mouse over a far corner of the image and note the green channel pixel value there. Go to the vignette Amount control and move it to the right. The goal is to get the corner green channel value the same as the center green value we noted earlier. Go back and forth, adjusting the Amount slider until you get the corner value matching the center value as close as you can.
- With the Amount setting now fixed, we mouse over a location of the image roughly two-thirds of the way from the center to the corner. As before, we now iterate moving the Midpoint slider until we get the intermediate location’s value the same as the center value. We should now be done finding the ideal Amount and Midpoint settings that most closely correct our vignetted flat field.
I find an alternate way to do that last step may be a bit easier: adjust the Midpoint slider keeping a close watch on the histogram as you make changes. The goal is to get the histogram as narrow, tall, and symmetrical as possible. We’re striving for that vertical line histogram we see in a perfect flat field.
Using this method, I found that the ideal settings for the Lumix 20mm at f/2 vignette correction are Amount +58 and Midpoint 10. Judging by the diagonal values graph, these settings create a result with a good approximation of the ideal straight horizontal line graph we would like.
Statistically we get a nice improvement as well:
Finally, the histogram shows a big improvement as well, getting closer to the ideal single-pixel-wide tower we would like to see:
Applying Our Results
If all we could do after this is to correct vignetted flat field images, we’ve been wasting a lot of time. Fortunately we can directly use our results in conventional photographs. Any time I shoot using the Panasonic GH4 camera with Lumix 20mm lens at f/2 and no filters, I can confidently apply our discovered vignette correction settings (Amount +58, Midpoint 10) and effectively rid the image of vignetting. A crib sheet keeping a record of the flat field parametric corrections comes in handy for quick parametric corrections of images shot with the same configuration and settings.
Let’s look at an obviously vignetted image and compare the before-and-after versions.
After vignetting removal, the sky looks more natural and the bottom foreground tonality really opens up. In general, the image is less claustrophobic with vignetting removed.