Monday, February 20, 2012

HDR - How to Expand the Dynamic Range of your DSLR



You've seen it on your smartphone, maybe you've seen it on your point and shoot camera - HDR. You may have even used it without knowing what it is or how it works. Hopefully this will help you gain a better understanding of HDR and it will open up some possibilities for seriously better pictures in certain situations.

In simple terms, HDR - or High Dynamic Range - is a way to capture a range of brightnesses that is beyond the cameras capacity to record in a single exposure.

In this first image you can see that the camera's exposure recommendation results in pasty-looking clouds lacking any tonality or detail, and image seems darker than it should be for a sunny day. The shadow areas lack yjr detail and "punch" that was present in the original scene. This is quite typical as the camera's metering system tries to cope with the super-bright sky elements - it tends to not want to overexpose the sky too badly so it gives precendence to the darker areas since you can always recover shadow information - sorta.


This is the middle image in the HDR sequence.



The next shot shows what happens when you underexpose the scene by 2 stops. The clouds look pretty good, but everything else has gone to pot.



This shot shows all the shadow areas with rich detail and nicely exposed, but everything else is washed out.




While I might be able to work with the image that is underexposed by only one stop, and possibly the one that is completely dark,  I would need to take heroic steps to introduce fill light and highlight recovery and dial in large amounts of brightness. But the result will be noisy in the shadows, and it will lack the overall vibrance of the original scene. This scene probably had a brightness range of 13-14 fstops.

In practice, the very best professional digital cameras can faithfully record up to 10 fstops of dynamic range. What this means is that if you were to use a light meter to read the light coming from the darkest area of a scene in which you want to show some detail, then you read the light from the brightest area with detail, there would be no more than 10 fstops difference between the two readings.

Most of you won't have a light meter, but most cameras will give you a spot metering mode that will allow you  narrowly and precisely select tiny areas for exposure evaluation. As the name implies, it measures light from just a small spot in the center of the image, rather than the entire screen. For the most part this is fairly accurate, and if you are familar with Zone System metering, it can help you nail the exposure - but this is a topic for a future post.

Another way to think about this is to look at your camera's histogram. If the histogram is all stretched and making full contact with both the left and right sides - there is a good likelihood that you are going to lose detail and texture in both the highlights and the shadows. To a small degree shadows can be "lifted" or lightened in Adobe Camera Raw or any reasonable raw converter using commands named "Fill" or" Shadow Recovery." To a lesser degree ACR can rebuild highlight detail information from highlights that are not severely blown. It does this by looking at each component of RGB (the red, green and blu channels) and copying the detail in the least blown out channel to add to the other two. But shadows will have noise and the highlights will look fairly pasty.

If you have one of those situations where you have to get both extremes, HDR will allow you to combine multiple exposures at different exposure settings, blending them into a single ultra-wide contrast 32 bit image. A typical HDR image will consist of two or more images - one or more that are underexposed to preserve the highlights and one or more that are overexposed to preserve the shadows.

There are some technical hurdles to be overcome, however. The resulting ultra-wide contrast image is a very large, 32 bit file, which can not be displayed on a conventional monitor or printed. Rather than going into a technical description here, an excellent description of bit depth, 32 bit files and how they relate to HDR photography can be found at http://www.cambridgeincolour.com/tutorials/bit-depth.htm

So lets get on to the nitty gritty of HDR photography - from planning a shot to finished image.

If you think a scene is a candidate for HDR, take a test shot at the camera's recommended exposure settings and look at the histogram and the image in preview. If the image looks normal and the histogram does not touch the left and right sides, HDR is not going to make a difference. There are other software packages that can give you the HDR "Look" by manipulating local contrast and shifting and boosting colors to enhance detail and shadow rendition such has Lucis Art and Topaz Adjust.

The HDR candidate has a histogram that looks like this:


Clearly, a single image will not be able to capture all the data at either extreme of the tonal range.  You can see how the camera tends to underexpose - most of the image's information is concentrated on the left side.

It's best to shoot your scene on a tripod, although I take many HDR scenes hand-held. I use RAW file format to ensure I record all that the camera can see. I set the camera to aperture priority, manual focus, and if your lens/camera has image stabilization or vibration reduction, I'd turn it off. This way the camera will not re-acquire focus or adjust the aperture or anything else that might affect image backgrounds by changing the depth of field.


The easiest way to take multiple exposures with most DSLRs is to use automatic bracketing. Many Nikons have the ability to bracket up to 9 exposures, up to one Fstop apart, in a rapid sequence by holding in the shutter for the entire series.


Most entry-level pro cameras allow you to do this with a single shutter press, automating the process. In a Nikon D200 there is a single button on the back that controls bracketing. The D300 requires you to assign the function to one of the assignable buttons. If you have a remote shutter release (wireless or tethered) use it, along with mirror lock up - this will minimize any human-based vibrations especially on night exposures.

Either camera will allow you to use an intervalometer, so that you can automatically record the exposure sequence in a "hands off" fashion. For those not familiar with this function, an intervalometer is a built-in function that allows you to record images on a predetermined schedule within either a given time frane or number of pictures taken. If youre camera does not offer the automation describe above, you can always take a shot and adjust the shutter speed manually.

If you are careful not to move, you can shoot a 3-5 shot HDR scene without using a tripod. I have even done HDR scenes at night, using 1 second exposures, braced against a solid surface, and breathing normally.

But planning and shooting the image is only half the fun. You get to "play" with it and turn it into something special and uniquely yours in the next part - the post processing.

There are several paths you can use to process your HDR images -

·         Photoshop CS3 and above (Merge to HDR command, Tone Mapping command)
·         Photomatix Pro (standalone and Photoshop plugin)
·         Nik HDR Efex (Photoshop plugin)
·         Enfuse (Lightroom plugin)
·         Artizen HDR (standalone)
·         DynamicPhoto HDR (standalone)
·         EasyHDR (standalone, easy interface, entry level)
·         Essential HDR (standalone, entry level)
·         HDR Darkroom (standalone, easy interface)
·         HDR Photo Studio (standalone)
·         Luminance HDR (standalone, free, dfficult interface)
·         HDR Pro
·         Picturenaut (free, entry level, no frills) - and I am sure there are others.  
The interpretation of an HDR image is very personal - each artist's eye is different, and most software packages give you a very broad set of adjustments to do just about anything you want.

Personally I use Photomatix Pro - it provides enough adjustments to render images that are realistically natural, yet enough adjustability to get really creative. I have tried Photoshop's merge to HDR and tone mapping - but I found that I am spoiled by the flexibility of Photomatix. Here is a workfow that I often use.

This is a set of 5 that I took for the bridge scene above.


In Photomatix, I browse for them - Photomatix will allow you do select multiple images.



After press OK, you will get a dialogue box that allows you to make some adjustments and determine how you want things like image ghosts (things that moved during the exposure sequence), noise reduction, alignment, color space, etc.



Pressing OK will merge the images into a single, 32 bit image and display it in the Image Editor.


It looks pretty awful - most displays cannot show an image with such color depth and range of brightness. Tone mapping will take all the information and do a decent job of assigning colors and values that are displayable/printable. I next save this intermediate image, in full 32 bit - as .HDR image. Next I select ToneMapping / Fusion to open up the Tone Mapping Editor.



You can see the image now looks a lot better. The histogram is looking pretty good too. Here you get to have fun - play with all of the  adjustment sliders to familiarize yourself with what they do.



I usually start by adjusting the black, white, gamma, saturation and smoothing.


There is a small option panel called Lighting Adjustments that will take you through a series of 5 presets that I sometimes use.


You can also select from a set of presets by clicking on the strip of images at the bottom of the screen.



Next I scroll down the settings menu to display the Advanced Options and adjust the sliders to get things looking exactly the way I want them to.




When done, I save the image as a 16 bit TIFF file so I can edit and adjust things a bit more in Photoshop.


Photomatix will provide a default file name that is a combination of all the names of the component files.

I use the Open As option to open the image as a RAW file in ACR. I usually adjust perspective, brightness, sometimes tone down (reduce the saturation) the colors in both ACR and after opening it in Photoshop, then I peform final sharpening. At this point I either save as a 16 bit TIFF, or as a JPG, which is a lot smaller and can usually be sent as an email attachment or uploaded to a website.

Tip: You can create a pseudo HDR by saving three versions of a RAW image in ACR - each with a different exposure compensation value - -1, 0 and +1. Then you process normally in Photomatix. Also, you can open a single image in Photomatix and apply tonemapping adjustments. The results will not be as dramatic, but it can produce some pretty fine images.



No comments:

Post a Comment