Wednesday, September 24, 2008

HDR Photography

A week or so ago, my iGoogle page featured a 'how to of the day' about HDR (High Dynamic Range) Photography. I like photography and dabble a very tiny bit in it, but nothing serious; I use my little digital camera that I bought two years ago, without much adjustment of exposure or anything like that. I sometimes take some decent pictures, but I know people that put my skills to shame. Likely, I will never be a fantastic photographer; however, I am quite good at post-processing. 

HDR appears to take multiple exposures of the same picture, overlay them, and take different contrasts from each picture to create a composite with a much higher contrast ratio throughout the entire picture. I haven't really looked into the actual mathematics or process behind it, so I could be completely off-base, but that's the impression I get.

When I read the article, I was definitely intrigued by the idea. I went out the next day with the intent of taking several samples for HDR processing. That night, I played around with the recommended freeware HDR program and my samples. While some of the results were interesting and evocative, none were clean enough for my tastes. Dissatisfied, I left the pictures alone, until this morning. I've been distracting myself from other tasks (or faffing around, I believe is the term?) by playing with the pictures some more.

The results of this morning's "research" have been fairly informative. I learned that the basic forms of the algorithms are somewhat bland (perhaps I should increase the exposure bracketing?). The only truly impressive transformations are made by the Mantiuk algorithm with "Contrast Equalization" enabled (I'll label this "CE" in the future); all the other transformations are fairly mundane, though the Reinhard 2005 algorithm seems to do the best job with these mundane transformations. The Mantiuk algorithm with CE, however, kept producing a large amount of dithering. After playing with different types of photos, I learned that it doesn't seem to handle solid colours or subtle gradients very well. When I found a picture with a lot of detail and very little in the way of solid colours, it worked much better.

Through much experimentation, Frey Labs are proud to present the following samples for your consumptive entertainment. If you look at the sky in the top left of the HDR versions, you can see the dithering I was discussing above.

The original rose photograph with no exposure adjustment (click for a larger version):


HDR version, Pregamma 1.0 Mantiuk CE 0.1 Saturation 0.8


HDR version, Pregamma 0.9 Mantiuk CE 0.1 Saturation 1.4


I can play around with the settings to get different results and, of course, do further post-processing in GIMP or Photoshop, but these are the raw output of qtpfsgui 1.9.2. For the best results, you want a lot of detail and very little solid colour. A contrast factor lower than 0.1 will produce ghosting. Contrary to what you might think, lower pre-gamma settings do NOT make the image darker; the tone mapping will create the same brightness with CE turned on, no matter the pre-gamma setting. Lower pre-gamma settings create richer and brighter colours, while higher pre-gamma settings create some washed out Burton-esque results.

The how-to says you need a tripod or stable surface for taking the exposure-bracketed photos. While you don't need one of them, I definitely recommend it. Qtpfsgui has an "Auto Align" feature when you first choose the photographs for the HDR process. The first option, "hugin's", crashes on my system, but the second option, "Median Threshold Bitmap", has worked well for me so far. 

The how-to said that cloud detail is significantly amplified by HDR, but I do not have any samples with which to test that. I will continue playing with my other samples later and post any interesting results.

1 comment:

Unknown said...

Hi, Britt! I know Rick does a lot of combining images in his photography, so he might have some tips for you.

Let me know when you're back in Austin!