Home | News
Gallery
Forums
Wiki
Lesson Materials
Course Information
Resources
Fall 2007 Archive
 
Photojournalism
Return to current website

Assignment, Week 13: Restoring Dynamic Range

Theme: No theme this week

One of the biggest problems with cameras is their lack of dynamic range capability - while we are able to perceive a large dynamic range with our own eyes, our cameras are simply incapable of capturing the same range of brightness. The resulting out-of-camera images, however, are not the upper limit of a camera's dynamic range capability - employing a number of post-processing techniques, details can be recovered from the shadow and highlight regions of the image, effectively expanding the visible dynamic range in the images.

As an example, we'll take this grossly underexposed image:

This is an image that is mostly dominated by the "crushed shadows" mentioned last week - the dark pixels are so dark that they are visually indistinguishable and thus there is no semblance of detail at all - we can't make out any distinct features whatsoever in the bottom portion of the image, for example. However, even though the pixels are apparently indistinguishable, in reality they are very different and retain an incredible amount of detail. This is the same image with exposure compensation applied to it:

Even though the pixels all looked the same (indistinguishably dark) in the original image, brightening the image (in effect multiplying the differences between each pixel) reveals that the pixels are in fact distinguishable from one another, and possess a large amount of detail - we can see that the bottom half of the image retained detail that differentiates the subjects legs from the floor, and the floor from shards of glass on the right side, even though these differences were not visible in the original image. In fact, as long as the pixels are not clipped to pure black (0,0,0 for RGB values), detail still exists and can therefore be recovered.

The same is true for the highlight region. Take for example this image - portions like the sky at the top or the subject's shirt exhibit "blown highlights" - areas that are so bright that no detail can be distinguished:

However, applying an exposure adjustment downward, we get this image, which reveals that in fact plenty of detail still exists in the sky and and the subject's shirt.

Now that we've established that detail exists in the shadow and highlight regions of images, how do we go about actually restoring this detail? The first method is simple exposure adjustment - if the image is too dark or bright, simply brighten or darken the entire image, respectively. There are several tools for exposure adjustment, the most common ones being:

Exposure adjustment tools are useful for correcting incorrect exposures - images that are simply too bright or dark, like the two examples above. See this writeup for an introduction on using the Curves tool. The weakness of overall exposure adjustment is that they act over the entire image. Thus, they don't work well for images with a large dynamic range. If I have a bright sky and a dark land in an image, for example, I couldn't use exposure adjustment to brighten the shadows without also brightening the highlights, which would destroy the detail in the highlights, and the same is true for trying to darken the highlight without darkening the ground. Curves has some control over what area of the image is affected, but to get the most out of shadow and highlight detail, true selective adjustment tools, like Photoshop's Shadows and Highlights or HDR blending, are needed.

As an example, we'll take this large dynamic range image - there are both very bright elements and very dark elements in the image.

Under normal exposure adjustment, we really wouldn't have much leeway in bringing out details in the shadow region without destroying all the detail in the highlight region, since overall exposure adjustments work on the entire image. By using a tool like Photoshop's Shadows and Highlights (Image->Adjustments->Shadows and Highlights, in Photoshop CS,CS2,CS3), however, we can selectively brighten only the dark pixels, leaving the bright pixels alone and preserving the detail in the highlight region.

And this is the result (mouseover to see the change):

Notice that the shadow region is brightened, but the area in the highlights remains unchanged. This is what makes the Shadows and Highlights tool so powerful - you can make strong adjustments to lift detail out of the shadow or highlight regions, without affecting the brightness/detail in other region of the image.

The Shadows and Highlights tool isn't perfect, however. Notice that, although we were able to extract a lot of detail from the image, it does look slightly dull and unnatural. The main subject in the shadows-adjusted image doesn't look anywhere as good as the subject in an image adjusted with regular exposure adjustment:

Of course, what we lose with overall exposure adjustment is all the detail in the highlights (the windows are now completely white). So images look better processed with overall exposure adjustment, but they destroy detail on one end or the other. Shadows and Highlights can make adjustments without destroying detail, but the images can only be pushed so far before they start looking really dull and desaturated. Is there any way to get the best of both worlds? There is, and it's called High Dynamic Range (HDR) blending.

With HDR blending, we process multiple photos where we only concern ourselves with a certain brightness range in the image. For our example image, I'll process two images - one is the original with full detail in the highlight area without regard to how the shadow area looks, and the other is an exposure-brightened version with full detail in the shadow area, without regard to how the highlight area looks:

Original, correct exposure for highlight area

Edited, correct exposure for shadow area

We combine the two images in a process called HDR blending. A manual, old-fashioned way to do HDR blending is to simply stack one image on top of the other, and use a layer mask to show the highlight areas from the image correctly exposed for the highlights, and show the shadow areas from the image correctly exposed for the shadows. You can download this .psd Photoshop file (96MB!) showing how this is done. However, the manual method is tedious and requires a lot of fine-tuning, and today there are quite a few automated HDR blending program. In any case, here is the resulting image, which you can see, retains the most detail from the highlights and the shadows, and doesn't look nearly as dull as the version processed with Shadows and Highlights.

HDR blended image

There are other ways to restore dynamic range as well. One tip is to shoot in RAW mode - RAW stores a lot more tonal information than a simple JPEG file does, and therefore there is more shadow and especially highlight headroom where detail can be recovered. Using your camera's flash in daylight situations, in a technique called "fill flash", also serves to lessen dynamic range in the scene, thus allowing your camera to capture the detail from the entire range of brightness. See the slides on the Week 13 powerpoint file for examples of this.

This week's assignment is to find ways to render as much of the dynamic range as possible from an image of a large dynamic range scene. Submit an original shot, and then show the "after" shot of the results of trying to expand the dynamic range captured, either by post-processing, shooting in RAW, or using fill flash.

Suggested programs:

GNU Image Manipulation Program (GIMP): Verstatile, free, open source image editing application. Not as powerful as Photoshop, and not as intuitive/easy to learn, but far more capable than most other free image editors
Windows download: http://gimp-win.sourceforge.net/stable.html
Mac download: http://darwingimp.sourceforge.net/download.html

Access curves by Colors->Curves

Adobe Photoshop
Access curves by Image->Adjustments->Curves
Access Shadows and Highlights by Image->Adjustments->Shadows and Highlights
Access HDR blending by opening files, File->Automate->Merge to HDR

Photomatix: Easy to use HDR blending program.
Windows/Mac download: http://www.hdrsoft.com/download.html

Assignment Summary: