Learn how to create stunning HDR photos from a single RAW file.
The rapid progression of camera technology and new options in Photomatix require an update to this tutorial.
Cameras are now 14-bit
When I wrote this tutorial over 1.5 years ago, most cameras were using 12-bit sensors. Camera makers have switched to higher dynamic range sensors now. I am currently using a consumer level Canon Rebel XSi which already exceeds the performance of many professional cameras of just a few years ago.
Ideally, 14-bit RAW files contain 4 times more information than 12-bit RAW files in the shadows. Realistically the gain may be limited somewhat by noise, but the noise levels also improved, leaving us with more bits to use. This much dynamic range just begs being made visible.
The picture above was taken in Central Park. The picture on the left side was processed via this HDR method. You can see a larger version here.
In the processed image you can see people outside and the fountain, while those are clipped in the unprocessed version. The histogram of the uncompensated picture, a picture processed for highlights and a picture processed for shadows is shown on the left side. The HDR is a combination of 5 images between EV-2 to EV+2.
The most recent version of Photomatix has also seen a dramatic improvement since my first draft. The generation of the HDR image is actually not as important as the process of tone mapping. For our purposes we can use the default options without the necessity of aligning the source images, since they were generated from a single RAW file.
Tone mapping (the process of mapping a 32-bit floating point image into a bitmap for display) is a bit technical, but the guys at HDR soft have done an awesome job at making things easy. The goal is not to go overboard with the settings. I even prefer to tune them down somewhat, so that the picture looks more natural and less processed.
The image of false kiva has an enormous dynamic range, with the sun peaking through behind the clouds and the cave being partly in the shade. After forcing all these levels into a range I can display and print, the picture still looks natural and not over processed.
Tone Mapping Settings
now offers two different Tone mapping approaches, the traditional Details Enhancer and the Tone Compressor. In 90% of the time I am using the Details enhancer since I can control the results much better. Although the preview of the Tone Compressor has more saturated colors, I find it harder to control shadows and highlights, keep noise in check and most importantly get a result that does not look artificial. In the picture above I am showing some useful settings to get you started with either algorithm. Although the preview of the Detail Enhancer shows less color and looks more flat, it seems to be an issue with the ProPhotoRGB color space I use.
I usually decrease the overall strength slightly, to get a natural result. The luminosity slider adjusts the global brightness of the picture. If you pull a lot of detail from the shades, the pictures will look too bright. In most cases I have a slightly negative value here.
I usually don’t adjust microcontrast much. Micro contrast enhancement is similar to sharpening in Photoshop. I play with this slider in extreme cases, when I get halos or too much noise, but otherwise I do not adjust it much.
The White Point, Black Point and Gamma are the most important sliders for realism effects. Increase Gamma to make the images look more real.
Most HDR processed Images I see only look somewhat flat, because we mapped so much dynamic range into a smaller space getting a luminosity response curve that is too linear. Gamma is a nonlinear transformation of brightness levels that is more pleasing and realistic to our eyes.
The white and black points determine where clipping will occur. Some value different from 0 gives a more natural look.
---end update, original article below
Every travel photographer knows the scenario. While most photographers advise not to shoot during the harsh light of the day, we often have little choice. Often I find myself at a place and I know I will have to move on, either because I have a travel schedule or because I am on a weekend trip and have to get back to my daily routine. Believe me, if I could afford it, I would follow the good advice and spent a lot of time on each location waiting for perfect conditions to make my photos shine.
In situations such as this, the best would be to put your camera on a tripod and bracket your exposure. You can then combine the pictures on your computer. However you cannot take your tripod everywhere (it may not be allowed) and it is very cumbersome.
In the past I have often written about RAW processing and I have stated that you can make good use of the dynamic range captured by your camera. Almost every Digital SLR camera and many of the better Point and Shoot models alow you to record RAW files. A RAW file is the data captured by your Camera's sensor that is not processed yet. It does not contain color information (yet), which is very useful to adjust white balance at the computer and apply sharpening and other enhancements the way you like it (check my other Worklfow Tutorials for more information). A 12-bit file contains 16 times more levels then a 8-bit JPG file. This is the main reason why I only shoot RAW.
While Photoshop offers tools to generate HDR (high dynamic range) images and blend multiple exposures, I find neither of them adequate for my needs. The tone mapping is very limited and not very useful. Photoshop also detects the exposure of an image and initially refuses to merge multiple files that were created from a single RAW file (they all contain the same EXIF data, so Photoshop sees no difference in Exposure). While there are ways around this (delete exif information), I have also evaluated Photomatix and found it extremely useful for the task at hand.
Photomatix automates the process of creating HDR images or stacking images and makes the entire process very easy.
Skip the next paragraph if you don't care.
An HDR image contains 32-bit of brightness information with virtually no limitation on how many levels you can represent (floating point numbers).
Tone Mapping describes the process of mapping such an image back into either 8-bit (or 16-bit color) space for display and/or printing.
Why should you care?
As always, nature cannot be copied in all its perfection. Your eyes are the ultimate image sensors. They have a nonlinear response curve enabling you to see very bright areas in the presence of dark shades. Your camera does not have that capability. It has a very limited response curve, leaving you either with blown out highlights, too dark shadows or both. Worse than that, when the image is processed, even more information is lost (8-bit JPG).
You might wonder why I would want to convert a 12-bit image to 32-bit just to output it as a 16-bit TIF. Well here is how I think it works.
Both, the 16-bit and the 8-bit image have the same minimum and maximum brightness levels. The only difference being that the 16-bit image offers a higher resolution on the levels. The RAW file however contains information beyond the levels of the bitmap images, and those are the ones we are trying to recover. So we shift the bitmap scale left and right, create multiple files and combine them accordingly.
Ok, what now
For extremely high dynamic range scenes (e.g. a dark cathedral with bright windows) you are probably better of taking multiple photographs with different exposures (use aperture priority or you will mess up your Depth of Field and sharpness), but I find that I can get away with some processing on a single RAW file. In fact I can easily push my RAW files to +/- 2 f-stops in post processing (that would be equivalent to taking 5 images each one stop apart).
Open up your RAW file in your favorite RAW converter (I use Adobe Camera RAW. The arrow points to the exposure setting). Don't touch any of the settings except the Exposure slider (you can also fine tune white balance, sharpness, ... but thats covered elsewhere).
Play around with the exposure slider. Move it to the left and see the image become darker. Watch your highlights and see how much information we can recover. Find out how low you need to go (but don't go much beyond 2 f-stops).
It will depend on your camera how far you can push this.
Remember the number (e.g. -2).
Then move your slider to the right and see how much you can pull out of the shadows (without seing too much noise).
Remember that number (e.g. 2).
Subract the two numbers (2 - (-2) = 4).
In our example we are going to cover a 4 f-stop range (thats about as far as this works on RAW files for most Canon Cameras I guess (I hear the new line has 14-bit analog to digital converters, so it may go further).
Now divide those into n equal steps, not much larger then about 1 f-stop.
In the example above this results in 5 images:
(-2, -1, 0, 1, 2)
Min = -1.6
Max = 0.8
Result = (-1.6, -0.8, 0, 0.8)
Enter these numbers into the Exposure compensation box and convert one image for each (5 images in the first example). I usually save them as TIF files so I don't lose information to compression (until the very end when I save everything as JPG).
Processing with Photomatix
Photomatix is the perfect tool for combining these images into a single HDR image and then use Tone mapping to output them.
The software offers far too many options to cover them all at length. I encourage you to play around with it a bit.
We can either generate a HDR image from the 5 tiff images or we can simply combine them and let Photomatix figure out the shadows and highlights.
The HDR options offers far more control and more dramatic results.
H&S - Auto
Lets start with the simpe technique. Sometimes I like this better since HDR images take some getting used to. Although they probably resemble what we see, we are not used to this kind of presentation.
I usually use the batch processing mode. In this mode, you can automatically process all images in a folder. For this test, I have put all 5 files into a folder and pointed the batch processing window to this folder (LOCATION).
Then I told Photomatix that I had 5 images (if you process more then one image, make sure they have the same number of source files).
Since we generated all of those images from a single source file, we do not have to select Align bracketed images. This option is very usefull if you composed multiple images (exposure bracketing).
Then I selected Highlight and Shadow - Auto (telling Photomatix to figure out the best settings).
Thats it. Photomatix will put the results file in the same folder (see above or below for a comparison image).
This option is a bit more involved, but Photomatix makes it as easy as it can get.
Simply go to HDR -> Generate and select your images. In the next dialog photomatix will ask you for the exposure values (still remember the settings from your RAW converter?).
Press OK and Photomatix will generate an HDR image for you.
HDR files contain far more information then your monitor possibly can display, so don't worry if the image doesn't look good (yet). This is where the Tone Mapping comes in. The Tone Mapping is the real strength of Photomatix. It can be bought as a Photoshop Plug in (I bought the bundle, but I use the standalone program most of the time).
On the left you can see the HDR file (linear light levels). On the right you can see the Tone Mapping Window. It applies a linear curve to the image mapping all brightness levels into the bitmap image space.
The Window is very intuitive. You can simply hover with your mouse over any of the sliders to get a short explanation.
Play around with it for a while and save settings you like. Load the default or older settings and compare the results.
When you are ready, simply press the OK button. Photomatix will output a TIFF file of chosen output depth (I went with 16-bit in this example).
Don't worry about what you pick here. You can always save the HDR (.hdr) and come back to this step again and again until you are completely happy. I have not modified the standard settings much for this example, however the results are already very impressive:
The picture on the left uses my standard Photoshop settings for processing images (they are already better then in camera JPG settings, since they tend to recover some of the Highlights and Shadows).
The picture in the middle was generated with the Automatic Highlight and Shadow settings. If you look closely, you will find that some of the shadows of the roof have been brought to live and that the building (outside in the bright sun) now looks better (not over exposed).
With the HDR image, we were able to pull the structure of the wood out of the shadows (the roof looks way better) and even the distant building has regained a lot of its texture.
The Original Image in this example already has some detail pulled out of the shadows and highlights.
Always shoot RAW images. As a best case scenario, you can just batch process them in Photoshop and still get better results then your camera would give you with very little effort.
If you come across a difficult image, you can use the proper tools to restore it accordingly.
Photomatix is an excellent software. To use its full potential, pick a difficult scene and shoot a lot of exposures.
I use it primarily for recovering highlights and shadows (either with H/S or HDR) from my photographs. It is the best tool for the job.
Download an evaluation version of Photomatix and start playing: Photomatix Download
Bookmark/Search this post with: