Wednesday, August 12, 2009

High Dynamic Range Photography

Yesterday I visited the Bulskampveld provincial domain. It is a forest area with a 19th century chateau that currently acts as nature museum and clinic for injured birds. I took a series of regular photos which are over in my Picasa gallery.

More interesting is playing with my camera's automatic exposure bracketing to create high dynamic range (HDR) photos. Cameras cannot capture accurate information from the brightest to the darkest areas in a single exposure. That is why either shadow areas are fully black or highlights are blown out as completely white. Either a short exposure can provide detail in the bright areas or a long exposure gives detail in the shadows. Now with HDR you can get overall detail from shadows to highlights.

Multiple exposures:

HDR image:

The process:
1. Mount the camera on a tripod or place it on an immobile surface.
2. Take multiple photos at the same ISO and aperture but vary the shutter speed.
3. Merge the photos using HDRI editing software.
4. Tone-map the HDR image into an 8-bit JPEG that can be viewed on screen or printed.

Automatically taking multiple exposures can be done using the camera's auto bracketing feature. Place the camera in aperture priority mode ("Av" on Canon models). Look in the settings menu for automatic exposure bracketing (AEB). This is a screenshot of a Canon 450D and it will be different on other models. Taking the exposures manually allows more control over the range and also lets you combine more than three shots.

Ensure that the camera remains in the same position between exposures. If there is movement of the subject you may also see a ghosting effect when the images are merged.

Store the photos in RAW format. This prevents information loss due to the camera's automatic post processing and JPEG compression.

Several software tools exist to merge and tone-map HDR images. Tone mapping is the process of converting the highly precise image to a lower precision image. This is necessary because monitors cannot handle more than 24 bit pixels: 8 bits each for red, green and blue. Our HDR image contains much more accurate pixel values. In this case 3 exposures of 3 times 14 bits per colour would give 126 bits per pixel. Tone mapping takes a subset of the contained information and renders a simple 24 bit RGB image. There are many different techniques ("algorithms") for determining this subset, each producing a different effect from neutral or realistic to highly stylised.

I tried Photoshop CS2 (File > Automate > Merge to HDR) which is fairly limited. The free and open source Qtpfsgui, despite its tongue twisting name, is much more powerful. It features many different tone-mapping algorithms and precise control over their settings. Keep in mind that this is a highly geeky app. It's a bit of a pain to get it working, the user interface is cryptic and intimidating, and crashes happen randomly.

Example exposures:

Result using Photoshop CS2:

Result using Qtpfsgui with the Mantiuk algorithm: