Saturday, March 1, 2008

Save my son: The miracle of selective image adjustments

One of my regular haunts for photographic hints, tips and information is Digital Photography School (aka DPS). Recently in their forums, one of the members asked for us to Save my son. He had a photo of his son with a common problem: a bright, overexposed background and a dark, underexposed foreground. In this article, I'll show one technique for dealing with this problem. The screen shots and textual descriptions are based on Corel's Paint Shop Pro (referred to later as PSP), but the basic workflow should work with any image editor software that supports multiple layers.

In general, what I'm going to introduce here is the idea of selective adjustments. This is a powerful technique that can be used to produce many effects. (My friend Ann Torrence is a master at using selective adjustments to get very creative images as can be seen here, here , here and here.) In this case we won't get as creative as Ann does, but rather use selective adjustments to get an image where the main subject is better balanced with the background.

First, here's the original image. (Click on any image to see a larger view.)
1 Original

The first thing I do with any image is to make sure the histogram is adjusted correctly.[1] For the most part, I like the histogram to stretch from the left to the right. As can be seen below, this image has a small empty spot on the right side, so I've adjusted the white slider down. When this is applied, the brightness values in the image will be expanded such that what is now between the dark and light sliders will take up the entire histogram instead of part of it. Since only the light slider is moved down, the brightness values for the entire image will be shifted towards the right, making the entire image a bit brighter.
2 Histogram adjustment

Here's what the image looks like after this adjustment.
3 After histogram

There's only a subtle change but it makes the image use the entire dynamic range of the color space rather than just part. This is a better starting point for the rest of the edits.

The next step is to make the foreground lighter. In the case of this image, the goal is to improve the exposure of the boy. For now, I'm going to ignore the background. In the process of making the boy brighter, the background will be blown out even more than it is. I'll deal with improving this in subsequent steps.

To accomplish this lightening, my choice is to use a curve adjustment layer. It could be done with a brightness adjustment layer, but that would adjust everything equally. Using curves provides greater control, allowing some parts of the image to be brightened more than others.

In PSP, this is done by right clicking the layers window and selecting New adjustment layer and then Curves. This pops up a dialog box where the curve can be specified. I set the value like this:
4 Foreground curves

The curve above results in this image:
5 After curve adjustments

We can now see the boy's face and expression. The problem is the background is mostly blown out and is over-powering the boy. While we can see him, the image is still out of balance. This is because the adjustment was on the entire image. What is needed is for the background to be adjusted independently of the boy. This is where the selective adjustment comes in.

If you look at the adjustment layer in the layers window, there is a white block. This is the mask for this layer. Whatever is white has the adjustment applied completely. Whatever is black has no adjustment done. Various levels of grey can be used to partially apply the adjustment if desired.

The masking is done by first making sure the adjustment layer is selected and then using the paintbrush tool to paint in black on the image where the mask should not be applied.[2] I used a fairly large brush with a really soft edge to paint on the background. Then I made the brush smaller to paint around the details. Usually I use a pretty soft brush so there's a gradual transition from where the effect is applied to where it isn't. The harder the brush, the faster the transition. Fast transitions tend to be more obvious to the eye and less natural.

Here's what the mask looked like when I was done:
6 Curve masking

And here's what the image looked like:
7 After curve masking

The boy still has the same exposure as before, but now the background is the same as after the adjusted histogram. This is better than the original, but I think the background is still too intense.

To adjust just the background, right click on the adjustment layer in the layers menu and select Duplicate. This causes the same adjustments to be applied again, making the image way too bright. This is just temporary. Next, making sure the new adjustment layer is selected, on the Selections menu select Select all (or press Ctrl-A). Now on the Image menu select Negative image. This causes everything that was black on our mask to become white and everything that was white to become black. In essence selecting just the background.

Now the curves need to be edited so instead of brightening they darken. This is done by right clicking on the new layer and selecting Properties from the pop-up menu. This will cause the curves dialog we saw earlier be displayed.

Before the image was brightened by adjusting the curve up and to the left. Now it'll be darkened by adjusting the curve down and to the right as shown here.
8 Background curves

As expected the background got darker. Some halos showed up at the transition between the two masks. This was fixed with a bit of touch-up using the paintbrush tool, resulting in this final image:
9 Final

This technique can be used on just about any effect to selectively change parts of an image. If your photo editing tool supports layers but not adjustment layers, the same technique can be used by duplicating the image layer, applying the effect to it and then using the erasure tool to eliminate the areas which should not have the effect.

Here are a couple of my own images that I've recently used similar techniques on to improve them over the originals (click on them for a larger view):
80k volt electron microscopeCoffee shop venueFarmington Bay


1. The histogram is a chart showing the various brightness levels of an image. The horizontal axis along the bottom is read left to right and represents the various brightness values possible. The very left side represents black and the very right side represents white with all the levels of grey in between. Bars exist at each location along the horizontal axis and their height indicates how much of the image is at that brightness level.

2. If the adjustment layer should only be applied to a small area of the image, the bucket tool can be used to paint a black mask and then the paintbrush tool can be used to paint in white only on those parts that should be adjusted.
Post a Comment