camera
Close
Contrast Masking
By Rinze van Huizen (3DGuy)

Introduction

Under exposed images, or rather under exposed subjects, can happen to anyone of us. Especially when photographing subjects against a bright background. If the camera is set to a metering mode that takes into accound the entire picture, your subject may end up under exposed. There are several ways to prevent this, but that isn't the aim of this tutorial.

Concider the following example:

Original picture
As you can see the parrot is horrible onderexposed. But we can save this image with a few tricks. Note: the sky is a bit yellowish because it was late in the afternoon and the sun was already low.

Creating a contrast mask

Step 1:

Select the entire picture by pressing CTRL+A or by selecting Select->All from the main menu, folowed by CTRL+C or Edit->Copy from the menu

Step 2:

Goto the channels tab and create a new channel Now paste the image you just copied into this channel by pressing CTRL-V or choosing Edit->Paste from the menu. You will see that you now have a black and white version of your image in this new channel.

Step 3:

Invert the channel by pressing CTRL+I or choosing Image->Adjustments->Invert. This will produce a negative of your image, in other words, area's that were dark are now light and bright area's are now dark.

Your channels panel will look something like this:

channels step3

Adding layers

The purpose of this all this was to create a mask. So, CTRL+CLICK on newly created channel or press the circular icon on the bottom of the layers panel. You will notice the selection mask now outlines the bright parts of your image.

Now go back to the layers panel and add a new levels layer. Thanks to the selection you've just made The levels can be adjusted for the brightparts. Below you can see how I moved the sliders to correct the image:

histogram

Those are settings that worked for this particular image. You'll have to play around with the settings so that they work for your photo. Your layers stack will look something like this:

layers

Here you can see how it cleared up my photo:

levels

After that I applied a contrast level with the same selection because I found the contrast a bit lacking. You'll have to re-aquire the selection because it gets cleared once you apply the levels layer. The quickest way to do that is CTRL+CLICK on the levels layer in the layers panel. Alternatively you can switch back to the channels panel and make the selection as before.:
contrast applied

After this my layers panel looked like this:
layers 2

This technique can be applied to tone down highlights as well. Using the same steps, only without inverting the channel in Step 3 in the creation of the contrast mask. Using that selection I can reduce the brightness of the sky in the background a bit like so:
layers3

So here you see the starting point and the result side by side:
originalresult

In conclusion

All in all it takes more time to read all this than to apply it all once you know the steps. You can finetune the mask by painting out parts you don't want affected after step 3 in the mask creation. Parts you don't want affected you paint over with black. You could also try the threshhold option (Image->Adjustments->Threshold). However, this could lead to some funky results:

funky results

Notice the weirdness round the branches. Here adjusted the inverted mask with a default threshold. With a little time and effort you can save some images you might have deleted otherwise.

A final note

This technique has it's limits though. There has to be detail left in the underexposed parts of the picture. When it's all black (or nearly black) you won't be able to recover something worthwile.

Rinze van Huizen (3DGuy)