DSLR Photography Forum

Full Version: HDR Howto
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
There were some requests about how to make HDR pictures, here is a little Howto. I'll try to do this in my own words, so bear with me. Smile


HDR (High Dynamic Range) pictures try to overcome the limitations of digital cameras with the recording of high contrasts. We all know pictures with some limited detail in the shadows but a blown out sky, or a barely acceptable sky with black silhouettes as a foreground. Most sunsets follow this pattern. Night shots too are hard to get right when you have street lights in the picture. HDR really helps to improve these types of pictures. What HDR technically does is making a composition from a set of identical pictures with different exposures, where each color value (RGB) is not an integer, but a decimal number. For example, you might have a pixel with 25.78R, 150.32G and 266.30B. The actual HDR image can't be viewed properly with regular devices like screen and printer, but you can create a conventional image from the HDR by tone mapping. Both the HDR creation and the tone mapping can be done in PS CS2, although I prefer Photomatix. In the following tutorial I will show the process with Photomatix.

Taking pictures

For an HDR image you need to take identical pictures with different exposures. That means there is no way around a tripod. You can do it just with two exposures (as I will show you in this tutorial) but you can use 7 or 8 exposures as well, and the experts say the results are better. I mostly use the bracketing of my camera, it allows me to bracket from -2 to +2 f-stops with 3 exposures. It's best to vary only the shutter speed, so I've heard. Varying the aperture would result in a different DOF of the exposures.

When you take the pictures, be aware that the exposures will be combined. You should avoid moving elements if possible, otherwise you are in for a long cloning session later. The best subjects are landscapes, city scapes and stilllifes. Be careful to handle your camera without even the slightest movement, otherwise the exposures have to be aligned - with the finer details it might not be possible at all. If you have a heavy tripod, use it. If you have mirror lockup, use it. If you have a remote or cable control, use it.

Check the histogram when you take the pictures. Make sure that nothing is blown out in the darkest (shortest) exposure of the series. You need at least one picture where absolutely nothing is blown out. In the darkest exposure you want to see detail in the lightest parts of the picture. From the darkest exposure you go up with shorter exposure times until the picture shows detail in the darkest areas. Nevermind that the brighter parts of the longer exposures are blown out. HDR will repair that.

Here are the two pictures I took for the "Moelln Evening" picture:

[Image: st-tut-01.jpg]

Post Processing

The post processing is quite simple, actually. In Photomatix, you can load your images first and then generate the HDR, or you can load them from the disk and generate the HDR in one go. You will have to tell Photomatix the relative exposure of each picture, for example: -2, 0, +2. The program will then combine the pictures and create an HDR image. With PS it's similar, the function can be found in File - Automate - Merge To HDR.

Now you have an HDR image, and it looks rather ugly. Don't worry! This is because your monitor can't show HDR images.

[Image: st-tut-02.jpg]

The next step is tone mapping. In Photomatix it looks like this:

[Image: st-tut-03.jpg]

You have to play with the controls to find settings you like. In PS, the tone mapping dialog pops up when you convert the image from 32 to 16 or 8 bit. The tone mapping in PS is not as tweakable as it is in Photomatix, but basically it does the same thing. Well, we're nearly finished! Convert the image to 8 or 16bit TIF and you're done.

I found that the tone mapping does not always yield optimal results. Snow in the picture tends to become rather grayish, so it's sometimes a good idea to play with the image in PS a little more. With snow, I usually blend in some areas of a properly exposed image of the original series.

Well that's it! I hope you have a lot of fun with this technique. I certainly do! Cool


Photomatix Home
Irma's HDR Showcase
Great stuff G!

Thanks for the tutorial - I have been doing this with RAW in PhotoShop - but it looks like PhotoMatix might be a great interface for streamlining and improving the process.

One additional idea:

I think that you do not technically need multiple shots from a tripod for HDR processing. If you shoot in RAW, you should be able to take a single image and save it multiple times with different exposure compensations (you should be able to safely get about 4 stops exposure latitude that way). The various saved images can then be imported as separate photos into PhotoMatix as per your tutorial.

It may be a bit more labor intensive than combining multiple shots from a tripod - but it allows you to do this technique with a fast moving target as you only need one original shot to make it work.

Thanks again for the tutorial.
Great Tutorial G. Thank You.
thanks for the tutorial G, i am really impressed with the program and the results you have shown. I down loaded the photomatrix basic (its free Big Grin) but no tone mapping Sad and you kinda need that Big Grin
Russ, generate your 32bit image in Photomatix and save it as it is...

Open it in PS change it into a 8bits/channel image and you will have a window, choose as method local adaptation you can work with curves in your tone mapping... then you will have your HDR image... Smile

Also in this thread I explain how to work just with one JPG switching it into a 32bit image and switching it back to 8bit image... all in PS...

Hope it helps... Smile

Also I would like very much to invite you all to post here some other links that might give us more information... or links of galleries...
Toad, you're right, you can use the technique with one raw file, but only in the Photomatix program. PS will tell you that there is "not enough dynamic range to create an HDR". I don't know where PS takes this information from, maybe if one tweaks the EXIF data, PS might be tricked into believing they are different exposures.

The purists say that HDR from one raw isn't real HDR because all the dynamic range you can use is already in the raw file. So it's basically just a matter of brightening or darkening parts of the picture.

But it definitely is an easy way to locally adapt the brightness, easier than using masks and "Shadow/Highlights" in PS, for example. The drawback is that if you brighten up very dark parts of the original you introduce a lot of noise, and the darkening of very bright areas gives you a grayish color.

I sometimes do this anyway, with varying mileage. I think that when there are only slight adjustments to make, it works well. The more detail you want to get out of light/dark areas, the worse it gets. For action shots there is no way to get multiple exposures anyway.

Although we have to wait what the digital industry comes up with next. This would be a sensible next step to digital - HDR images directly from the sensor. I don't know enough of sensor technic, but I can imagine it should be possible one day. Or maybe a camera with, let's say, three sensors? The incoming light could be directed to different sensors by partially transparent mirrors, maybe. This way, you could bracket the exposure with just one shot...
Quote:Russ, generate your 32bit image in Photomatix and save it as it is...
Irma thanks but the problem is that it saves it as an HDR file(no other option) and my PS 7 wont recognize it. Anyway I downloaded the pro trial version I will play around with it for a while and see how I go. I hope to post some results soon.........Big Grin

It's great that I finally know what to call the photos I spend the most time working on in PhotoShop.
Those of us who can only shoot jpgs yet want so much more exposure latitude from certain shots have a chance to even the playing field vs RAW shooters, yet I am screwed by the fact that PS 7.0 doesn't support HDR in any way.
So I have been limited to doing manual HDR processing on bracketed photos that have simple lines between subject and sky, and those which allow clean selections.
And I still spend the better part of an hour cleaning up the dividing lines.

Are there any HDR plug-ins yet?
KeithAlanK Wrote:Are there any HDR plug-ins yet?
I found one through a google search... dunno how good it is:
Thanks for the tutorial G.. great stuff! Smile

Toad, I used to use the technique you describe (taking one 12-bit RAW file and making multiple 8-bit "exposures", then overlaying them in photoshop and masking them as necessary) but then I had a bit of a closer look at the 16-bit image format in photoshop and noticed that not only do they have increased colour resolution, but they have increased dynamic range too!
Now I just open the RAW file as a single 16-bit image directly and apply numerous tone curves with masks to get the local exposure where I want it. I don't know the exact technical specs for the 16-bit photoshop images (esp with regard to dynamic range), but I do know it makes it possible to pull detail out of blown highlights just like you can with RAW, and makes it a lot easier to work with the files. Common-sense tells us that a 12-bit RAW image should be able to be fairly accurately represented in 16-bits as long as the dynamic range is covered (there are a couple of other very minor potential issues)... But I have no figures to provide an accurate comparison.
There are also some advantages in the technique you describe (photoshop has only limited functions for 16-bit images for example), but I think it provides a good alternative option for some people.

G... I think one of the major advances in sensor technology currently in development follows the concept of each pixel becoming a seperate little camera. Essentially this might simply mean that each pixel can choose its own ISO independantly of the other pixels and report this along with the normal RGB information, but it might go a bit further than this with seperate per-pixel processing in real-time. Think about it.. how cool would it be to be able to cover everything between 100 and 1600 ISO in a single shot - 100 ISO for the sky and 1600 in the shadows, all completely automatic. Even if there are no further advances to sensors, that alone would yield an extra 4 stops of dynamic range and ensure the lowest possible noise for any aperture/shutter combination. Big Grin
Don't quote me on that though - I simply remember reading something somewhere about development into the idea of each pixel being a seperate camera.. the rest is just speculation on my part.
I was trying to remember who uses HDR techniques, or at least who's work often has that distinctive "look".

Then I stumbled across my answer: A very popular photoblogger less than an hour's drive from me in San Marcos, Texas.
The BlueHour Blog

If you click on "My Secret Weapon" you'll see samples of the effectiveness of a PhotoShop plugin from LucisArt, with a link to their site and a 15% off coupon code that Andy arranged for his visitors. They have Windows and Mac versions.

The third sample looks exactly like what I try to do sometimes, and I'll bet the plugin takes 1/100th the time.

At the very least, if you enjoy good photography and particularly the view from a wideangle lens, visit The BlueHour Blog regularly.
Andy's very prolific and talented in my opinion, and that of many others..
Here's a before/after of one my own attempts at increasing the dynamic range to somewhere beyond 'correct' and into the realm of 'dramatic', or so I hoped.

Like Guerito's excellent tutorial example above, I'm trying to preserve (or even exaggerate) sky detail while still bringing some life to shadowed/underexposed subjects.
I shoot jpgs only, so these conditions are most difficult yet can be very rewarding with some hard work.

In the samples below, the before photo was made by locking the exposure while pointed at the hottest part of the sky only, and it surely would have benefitted greatly from fill-flash. Unfortunately this was a solitary grab shot that didn't recieve much thought. (resized only)
To make the final image I used the magnetic lasso to select just the chinese war horse statue, then pushed it's levels radically.
Select>inverse to push only the sky's levels.
Then 45 minutes were spent cloning the dividing line into submission.
NeatImage noise reduction to clean up the noise, and I'm FINALLY done.

Exposure bracketing works better, but cleaning up the dividing line between selections is still a time-consuming process. I'm sure there is a faster, neater way to do this that I'm missing.

I will be trying the free demo of LucisArt's plugin as soon as I have a large enough backlog of 'problem' exposures and 'intentionally underexposed for the sky' photos needing work. It's a 30-day demo, and I'll need to maximize my usage of it. There's no way I'm going to be able to get permission from my head-of-household to buy a $169usd plugin when I'm supposed to be saving for an engagement ring.

[Image: kak.cwh_before.jpg]

[Image: kak.cwh_after.jpg]

wooowww biiiiiiiiigggg diference!!!

i think i will give it a go...

thanks guerito for the tutorial
Your picture looks great!! Very dramatic btw Smile
I would like to share with you two images...
Which one you think looks better and why?

Thanks a lot!!! Big Grin

[Image: DSC_2484-01HDR1myvillage.jpg]

[Image: DSC_2484-01HDRmyvillage.jpg]
I lkike #2. It fels wrong to me to look "through" fog/dust and see a clearer image behind. #2 seems to show a more natural contrast between foreground an dbackground.

At first glance, I preferred #1 because the overall contrats is more balanced - but on close examination, it just didn't look real.

BTW: Keith - your photo is great. Looks totally surreal.
Many thanks for the kind words.

Irma, I'll have to agree with Toad's observations.
In #2 I like how the field in the foreground is clearer, and that helps reinforce my impression that the fog is coming from a river or stream between the field and town that I just can't see. Adds mystery to my mind.
I was not sure about this one... I really thought I had to add more fog Smile

Thanks a lot Toad, Keith for your comment...

i have to agree with the rest the second one, there is more detail on the ground. i would go one step futher and darken the sky a bit, it looks a bit wash out.
I saw a magazine coverdisc with Photomatrix SE (an older version I think) on it... I was mighty tempted to buy it, but couldn't justify the 19.95 for the recyclable junk that came with it (a.k.a. magazine). Big Grin
For that money you can buy the miranda's plug in to get DRI images... Wink