HDR and tone mapping

High Dynamic Range (HDR) and Dynamic Range Increase (DRI) Photography have become quite popular among digital photographers. Both techniques are used for recording contrast ranges that are beyond the maximum contrast range of a state-of-art camera sensor [Howard2008][Bloch2007].

Photographic scenes — especially those in full sunlight—can have a dynamic range of 16 to 25 Light Values (LV) or f-stops. Even the human eye cannot capture such extreme contrast (it is limited to approximately 14 LV) but must adapt itself when looking at dark or bright areas. The eye can do this because it scans only a narrow area of a scene. The signals produced by the eye are then processed by the brain, which composes them into a whole scene again.

The camera does not have this ability. It must record an entire scene in one step and therefore should be able to capture all the contrast in a scene. That, of course, is not yet possible. Modern camera sensors can record a dynamic range of 11-13 LV, a theoretical value that is lowered by noise and other imperfections. In real-world applications, a camera sensor can capture a contrast range of 8-10 LV with good quality. When showing an image on an LCD screen, a dynamic range of 5-7 LV can be reproduced, and when printing an image on photo quality paper, 6 LV is a reasonable assumption.

Because of this situation, you have to decide on the brightness subrange that you wish to record — meaning that you must choose the correct exposure. Brightness values outside that range will record as totally black shadows and totally white highlights with no detail.

The contrast in the recorded image, which by now is 8-10 LV, must still be compressed in order to reproduce all details in the image on a print or on a screen. Typically, this is done in a photo editor such as Photoshop or Paintshop Pro by modifying the brightness curve. With the CHDK, however, it can also be done in-camera by using Custom Curves (section 4.3.8). This tone mapping requires a bit of skill from the photographer; a brightness curve that is too steep will result in contrasty images with blown-out highlights and dead shadows. A brightness curve that is too flat will result in a flat picture, and vice versa.

Enter the HDR method. The higher dynamic range is simply achieved by making several images of the same subject: an image with the correct exposure, an image two f-stops overexposed, and an image two f-stops underexposed. You can go even further and make additional images: +4 f-stops, -4 f-stops, +6 f-stops, and -6 f-stops. Given a camera sensor contrast range of 8 LV (which should be a reasonable value for a compact camera), we can capture a scene brightness range of 12, 16, or 20 LV with this method.

There are a few rules to follow when creating such a bracketing series:

  • Zoom value, focus, aperture, white balance, and (if possible) sensor speed must not be changed because such changes cause image changes. All bracketing should be done by changing the shutter speed.
  • The sensor speed should be set to a low value, such as ISO 50 or ISO 100, to avoid sensor noise.
  • There should be no moving objects in the scene. Some HDR composers are able to remove moving objects (ghosts) from an image, but not always with good success. So beware of cars, moving people and animals, and wind (leaves and branches move). At night, even the stars and the moon can cause problems.
  • The illumination of the scene should not change during a bracketing series. Otherwise, it will be difficult for the HDR composer to put the images together correctly.
  • It is certainly an advantage to put the camera on a tripod, but modern HDR composers are able to register the single images with each other even if they are taken hand-held.

If all these conditions are met, you can set up your camera to shoot a bracketing series:

  • Typically you would use a TV Bracketing Value of 2 and the Bracketing Type “+/-”.
  • If you want the best quality, shoot RAW images. If you do, make sure that the options ALT > MENU > RAW Parameters > Only First RAW in Series and ALT > MENU > RAW Parameters > Exceptions > Disable Raw@Burst are disabled.
  • You now have the choice of setting the camera to Continuous mode, or of setting up the Custom Timer with 0 seconds delay and 3, 5, or even 7 shots. If you use Continuous mode, you need to count the pictures yourself. The advantage of this mode is that you can pause the series when somebody or someone moves into the scene. Just half-release the shutter button and press it fully when you want to continue. The Custom Timer, in contrast, does all counting for you—you just have to press the shutter button.

After you have taken the individual images, the image series must be post-processed and combined into one single image. If you produced RAW images, you should develop them with a RAW developer (section 4.5.4). Even if your HDR image composer is able to accept RAW files, a RAW developer will give you superior results because of the corrections that can be applied to lens and sensor imperfections. You should at least reduce the chromatic aberration and the noise and apply a first sharpening to the images. Start with the first image in the series—the “correctly” exposed image—and then apply exactly the same development parameters to all of the images in the series. Most RAW developers allow you to copy the development parameters from one image and apply them to others. Of course, your target file format would be TIFF and not JPEG because TIFF is lossless.

Next comes the step of composition. HDR and DRI composers know two techniques for composing HDR series:

  • Weighted average. The pixel values of all images are added, but a weight is applied to each pixel value. Pixel values of a dark pixel in an overexposed image get a higher weight, as do pixel values of a bright pixel in an underexposed image.
  • Area oriented. The picture is segmented into different brightness areas. Each area is treated differently and may get its pixels from a different source image. With this method, there is almost no blending of images. Therefore, it is well suited for images with moving objects in the scene. Ghosts are hardly possible because most pixels come from only one source image.

After composition, DRI and HDR go separate ways. DRI immediately applies tone mapping to reduce the tonal range of the image to a viewable and printable size. It therefore can use standard file formats such as TIFF or JPEG for the output.

HDR, in contrast, preserves the original dynamic range of the scene. Therefore, it must use specialized file formats such as OpenEXR, Radiance HDR, or 32-Bit-TIFF. Traditional file formats with 8 or 16 bits per pixel and channel cannot capture the high dynamic range of an HDR image. Once you save the composed image into an HDR-specific file format, you can open the file later and decide how to map the dynamic range of the image onto a smaller printable or viewable dynamic range.

This brings up the technique of tone mapping: reducing the huge dynamic range of the composite image into something smaller. Again, there are different methods to achieve this:

  • Global tone mapping applies the same formula (in most cases, a logarithmic formula) onto each pixel. This is fast but can easily result in flat images. This technique is suitable for images with low or medium contrast.
  • Local tone mapping takes the neighboring pixels into account. Brightness differences between neighboring pixels are weighted higher than brightness differences between distant pixels. This technique results in good local contrast and is well suited for images with high contrast. The images usually look crisper than the ones created with global tone mapping because local structures are emphasized. When overdone, however, artifacts such as halos can become visible.

Most of the established image editors such as Photoshop, Paintshop Pro, and Picture Window support the creation of HDR and DRI images. For serious HDR work, however, we recommend a specialized HDR composer such as the free Picturenaut (Windows), or HDR PhotoStudio, Hydra (Mac only), Photomatix Pro, FDRTools Advanced, or Dynamic Photo HDR. For an example:

Breuburg Castle, Germany. Even after some heavy cropping, the image still has a horizontal angle of 88° (98° in the diagonal).

Subscribe

Subscribe to our e-mail newsletter to receive updates.

No comments yet.

Leave a Reply