Earthbound Light - Nature Photography from the Pacific Northwest and beyond by Bob Johnson
Online Ordering
Recent Updates

Photo Tip of the Week

Improving Local Contrast with Unsharp Mask

In spite of having a name that is somewhat counterintuitive, the Unsharp Mask filter makes an image appear sharper rather than less sharp. The effect is created by exaggerating contrast between whatever is on opposite sides of each edge in the image. But with just a slight twist, this contrast enhancement can be used for so much more.

First though, let's consider the idea of contrast. We perceive the difference between one thing and two in an image based in large part on contrast. Too little contrast and two adjacent objects will appear to merge into one, particularly if they have a similar color. Sufficient contrast and we can clearly see where one thing ends and another begins. The very word "contrast" means difference, or the juxtuposition of difference.

But total contrast in an image is limited. In 8-bit mode, we only have values between zero and 255 to work with. We can stretch what we have to work with to fill this entire range by adjusting the black point and white point via Levels, but we can't go beyond this. Working in 16-bit mode gives us more precision, but not really more usable range since we are ultimately bound by the limits of current monitor and printer technologies.

The usual method of rearranging contrast within an image is by means of Curves. We can steal contrast from one portion of the tonal range and move it to where we need it in am image with curves. A basic S-curve does just this, flattening contrast in the shadows and highlights to give us more in the midrange where the important visual content of an image is generally located. Curves with more complex shapes can be similarly used to accentuate the one-quarter and three-quarter tones perhaps, or whatever is needed. But once the black point and white point are set as far apart as possible, adding contrast via Curves to one portion of the tonal spectrum means we must accept that we will lose it from somewhere else. In terms of overall contrast, there are no free lunches.

Or are there? The eye can be fooled all too easily by introducing something known as "local contrast." Rather than adjusting everything in an image that has a particular brightness, we can subtly adjust it only along existing edges, blending the change into the surrounding area. Which, as you might have guessed, is where Unsharp Mask comes in.

Unsharp Mask (USM) dialog settings for local contrast adjustmentUnsharp Mask makes use of three variables: amount, threshold, and radius. If we use a small radius and a moderate to high amount, we'll get the impression of adding sharpness since the contrast adjustment will be limited to the pixels directly adjacent to detected edges. The threshold defines how much pixels within that radius need to differ by in order to be considered part of an edge. If instead we set the threshold to zero and use a very large radius and a relatively low amount, the adjustment will be much less intense but will subtly affect a much larger area. We'll get only minimal sharpening, but we will get a quite useful contrast effect that would be hard to duplicate with Curves. The effect can be described as adding local contrast since it depends on the content of each part of the image. Contrast is added based on what is next to something, not simply on where it sits in the tonal spectrum of the image as a whole.

To give it a try, first set the threshold to zero as mentioned. To set the amount, pick something between about 10 and 25, depending on how pronounced you want the effect to be. Then adjust the radius, starting at around 50 and going up from there until you get what you are after. These values are approximate and based on working with an image sized for printing. If you are working on a smaller jpeg intended for web use, use appropriately lower values. If you have the Preview checkbox set in the Unsharp Mask dialog, you see the effect on the main image as you work. It's not as important that the image be set at 100% actual size for this technique as it is for regular unsharp masking.

Low contrast can have any number of causes including haze or smoke, low lighting levels, lens flare and just plain cheap glass. Do what you can in the field to get what you are after, but this technique can often do the trick when you need some help after the fact. Try it on your own images, even those you don't think necessarily need it. You'll probably be surprised at how often images can benefit from even a modest amount of local contrast enhancement.

Mt. Rushmore shortly before sunrise
Mt. Rushmore shortly before sunrise - the lighting was low and so was the contrast
After adjusting blackpoint and whitepoint with Levels
After adjusting blackpoint and whitepoint with Levels - better, but still looks a bit flat
Contrast adjusted with Curves
Contrast adjusted with Curves - better, but it's hard to avoid burning out the highlights on the side of Washington's face and the sky got brightened since it happened to be the same brightness as the area we were targetting
Contrast adjusted with Unsharp Mask
Contrast adjusted with Unsharp Mask - the face and the sky look better

Date posted: August 13, 2006


Copyright © 2006 Bob Johnson, Earthbound Light - all rights reserved.
Permanent link for this article

Previous tip: The Fine Art of Carrying a Tripod Return to archives menu Next tip: Speeding up Photoshop CS2

Related articles:
More Than a Bit of a Difference: 8-bit Versus 16-bit
The 1-2-3 of Photoshop Levels
Photoshop Curves: Stepping Up From Levels
Stealing Contrast with Photoshop Curves
Behind the Unsharp Mask: The Secret World of Sharpening
Clarifying the Clarity Slider

Tweet this page       Bookmark and Share       Subscribe on Facebook via NetworkedBlogs       Printer Friendly Version

Machine translation:   Español   |   Deutsch   |   Français   |   Italiano   |   Português

A new photo tip is posted each Sunday, so please check back regularly.

Support Earthbound Light by buying from B&H Photo
  Buy a good book
Click here for book recommendations
Support Earthbound Light
  Or say thanks the easy way with PayPal if you prefer

Home  |  About  |  Portfolio  |  WebStore  |  PhotoTips  |  Contact  |  Comments  |  Updates  |  Support
Nature Photography from the Pacific Northwest and beyond by Bob Johnson

View Cart  |  Store Policies  |  Terms of Use  |  Your Privacy