Forum Login

Understanding Contrast Masking

About three years ago I wrote a tutorial on contrast masking. It was published before I had started to use digital cameras, and was intended for use with files from scanned film. Below is an updated tutorial designed for users of digital cameras.


Too Hot is Not Cool

A digital file is much like a film positive (transparency) in that the worst sin is to blow out the highlights. In fact it's even worse with digital than with film. Highlights on film tend to trail off gradually on the shoulder of the curve, while with digital it's more like hitting a brick wall. Overexpose — expose too far to the right of the histogram — and you end up with nothing, nada — empty white pixels with no data whatsoever.

So the strategy for digital photographers is to expose as far to the right side of the histogram as possible. (Please see my article Expose to the Right for additional reasons why this is the correct approach to digital exposure, and If you are unfamiliar with how to read and use the histogram, read my tutorial Understanding Histograms).

Given that digital cameras have a dynamic range of 5-7 stops (about the same or slightly greater than transparency film), one often finds that the shadow areas of a frame are rendered darker than one would wish. What to do?

There are three solutions. The first is the traditional approach taken by photographers for the past several decades — the use of split neutral density filters. (This is covered in detail in a tutorial in Issue #6 of The Video Journal). I used these for many years, but they are slow to use well and not appropriate for anything other than landscape work.

The second approach, and a viable alternative to the use of split NDs, is digital blending. But, it isn't always possible to shoot more than one frame of a given scene.


Photographers Have Been Using Contrast Masks for Almost 100 Years

The solution is to use what is called a contrast mask. This is now done digitally, but it is nothing new. It's been around since the early years of the 20th Century. This used to involve the production of a B&W negative copy of the original which was then placed in superimposition with the positive while a print was made. This caused a flattening of the contrast as shadows received extra exposure while highlights were held back.

Here's how we do it today in Photoshop.

Figure 1

In Figure 1 above we see a frame taken just after dawn at Moraine Lake in Banff National Park. I exposed so that the sky wouldn't burn out, but which caused the dimly lit foreground to become quite dark. To the unaided eye the scene didn't appear this dark, and so it's desirable to try and reproduce what they eye wants to see, rather than what the camera actually recorded.

Here are the simple steps needed to create a contrast mask, and open up the shadow areas of this image.

        1. Create a Duplicate Layer ( Layer / Duplicate Layer) and name it Mask
        2. Desaturate the Mask Layer. (Image / Adjustments / Desaturate)
        3. Invert the Mask layer (Image / Adjustments / Invert)
        4. Click on the Mask layer thumbnail and select Overlay then Blending Mode
        5. Enlarge the image to 100% and look at the horizon line or other high contrast area. This is important for the next step.
        6. Use Gaussian Blur to reduce resolution degradation of the image by the mask, yet at the same time avoid halos on sharp contrast boundaries such as skylines. (Filter / Blur / Gaussian Blur). Low amounts are usually best.
        7. Adjust Opacity as desired. (Click on the Mask Layer thumbnail and use the Opacity slider).

Figure 2

Figure 2 shows the intermediate result after executing steps 1 — 7 above. The shadows have been opened up while the bright areas have not been compromised.

The next steps are to "season to taste" using the usual tools, such as Levels and Curves. Figure 3 below shows what the frame looks like after a few quick adjustments. A larger version can be seen by clicking on it.

Figure 3


Other Approaches

Every time I publish an article like this one I am inundated with e-mails detailing various alternative approaches. There are indeed many other ways of doing this. For example, one alternative is to use a mask created from one of the colour channels. Here is another approach that allows individual adjustments for both highlights and shadows.

Yet another alternative is a new Photoshop plug-in called SR Pro from Fred Miranda. Selling for $19.95 this is a well designed product for both PCs and Macs that automates the entire masking process and which also adds some unique customization features.

Filed Under:  

show page metadata

Concepts: Digital single-lens reflex camera, Digital photography, Photography, Digital camera, Banff National Park, The Shadow, Camera, Digital cameras

Entities: Banff National Park, Moraine Lake, Michael Reichmann, Fred Miranda, The Video Journal, Photoshop, Macs

Tags: mask, mask layer, digital, contrast mask, digital cameras, mask layer thumbnail, Gaussian Blur, Duplicate Layer, shadow areas, histograms, image, tutorial, sharp contrast boundaries, high contrast area, split neutral density, B&W negative copy, tutorial understanding histograms, Use Gaussian Blur, contrast masking, Banff National Park, entire masking process, unique customization features, various alternative approaches, new photoshop plug-in, digital file, digital photographers, digital exposure, quick adjustments, worst sin, lit foreground, individual adjustments, digital blending, split nds, white pixels, correct approach, brick wall, 20th century, unaided eye, additional reasons, landscape work