Alex Wilson Photography > Blog

Using local contrast in Photoshop

The human brain is quite adept at seeing contrast within small details, but it is unable to detect small (and sometimes sizable) changes in contrast on a larger scale. Great painters have known this known this for centuries and been able to produce works that appear to have great contrast by exploiting these limitations.

Photographers have been able to adjust local contrast as well when producing their images. Whether a neutral density gradient filter on the lens when taking the image, or dodge and burning a print, the camera can produce works that are able capture a wider range of detail than the medium would normally allow.

The idea is simple: A dark area (dark, compared to its surrounding area) can be lightened up to expose details and increase contrast. Our perception system can see the increase in the local contrast, but it doesn’t do a good job of detecting that the contrast is actually exaggerated compared to the rest of the image. Light areas can be darkened in exactly the same way with the same effect.

This is the basis for both the Unsharp Mask and Shadow/Highlight tools. The Unsharp Mask sharpens an image by increasing the contrast of details on the small scale. The Shadow/Highlight tool looks at larger areas of the image to boost the regional luminance and contrast in order to bring out details and give the image the feeling it contains a much greater contrast range.

Computationally, this can be reduced to a little algorithm: Compare the image to a blurred copy of the image. In the areas the image is darker than the blurred copy, lighten it up a bit. In the areas the image is lighter than the blurred copy, darken it down a bit.

If you are feeling industrious, you can do those computations, step by step, within Photoshop. You may think that a pointless exercise, but by doing the steps ourselves, we can end up with more control then just using the built-in tools. Photoshop’s built-in contrast tools just change the image or layer, with these steps we can create separate layers with the contrast adjustments, which gives us a lot more control. The steps are a little convoluted, so I won’t go into them here, but at the bottom of the post I provided a saved .atn file with some actions that are ready to run.

Let me show you some examples to give you an idea of what you can do. All these images start with the original, if you move the mouse over it you will see the edited version.

Local contrast - soft light
This first image shows the same type of effect you can get using an Unsharp Mask using a large radius and low percentage. In this case, we are just blurring the image by 10 pixels and producing layers with a blending mode of soft light. The actions will produce two layers, one to darken, one to lighten. Each layer has its own mask — the darkening layer masks out the darkest areas of the image so that it doesn’t darken anything already very dark, and the lightening layer masks out the highlights.

Local contrast - screenshot

If a smaller radius was used for the blur, like 1 or 2 pixels, we would have a general sharpening option.

 

Local contrast - soft light blur
This image also uses the same idea (and action) as the first, but there’s a little trick to it: Copy the image to a new layer, and add a bit of blur (in this case, 10 pixels). Now run the action, and when it wants to create a blurred image, go a bit bigger (I did 25 pixels). After the action finishes, delete the blurred image we initially made. We’ve now got layers that are doing some subtle dodging and burning based on the differences between the small and the large blurs.

 

Local contrast - overlay
This is the same as the first image, but the lightening and darkening layers are now using a blending mode of overlay. This will skew the colour images, but for monochrome images it will boost the contrast a lot more.

 

Local contrast - shadow highlight
This action is a little different (it’s called “Unsharp+ grey w/ masks” in the action set). Instead of comparing the original image to a blurred image, it compares a blurred image to solid 50% grey image. The result is like the Shadow/Highlight tool, but again, we end up with two soft light layers.

 

The separate layers will give you a lot of power — you can adjust the opacity or change the mask of just the lightening or darkening layers individually. You can boost the contrast further by duplicating the layer one or several times.

Download Alex’s contrast Photoshop action set. (Zip, 1.4kb)

These actions are just starting points, you can customize them to your heart’s desire!

For more information about local contrast, check these links:
http://www.luminous-landscape.com/tutorials/contrast-enhancement.shtml
http://www.cambridgeincolour.com/tutorials/local-contrast-enhancement.htm

Posted in: Photography



4 Comments

rssComments RSS transmitTrackBack Identifier URI


An excellently explained technique Alex, wish I could write as well as you and explain it so well.
Thank you for sharing it with us,
Chris

Comment by chris broadhurst on 2007-12-13 4:57 am


Good guide Alex, thanks for taking the time to write. Very well explained the basics behind the algorithms too – I’ve used the Unsharp mask filter many times, not really knowing the specifics of what it does.

Keep up the good work and good luck with your business

Comment by henrik on 2008-12-10 7:51 am


Wow. I just couldn’t quite get the concepts of local concept having read several articles on it. But now I really feel like a ‘sharp’ guy!

Comment by Granger on 2009-01-11 4:05 pm


Nice technique Alex. Thanks for taking the time to make this post. I am interested also on web design and i find this post really useful. Thanks for sharing this to us.

Comment by samarah on 2009-08-18 1:50 am

addLeave a comment