Tuesday, October 26, 2010

My HDR Technique

Since I keep referring to it over on NSN, I thought I'd write a short post on what my HDR processing technique really looks like...

Shooting: AEB +/- 2 stops. (Occasionally, I'll do five exposures at +/- 2 stops, but neither of my cameras allows for this easily, so I only do when I really think I need the extra stops, like when the sun is in the frame.) Manual exposure mode to make sure I really get +/- 2 stops--if you're in an auto mode, if the light changes, so could the exposure. ISO 100 for the lowest noise (on most Canon cameras anyway--50 might give lower noise on the cameras that have it, but at the expense of dynamic range). Tripod, mirror lock-up, cable release. Level the camera, and shoot away. Check the histograms to see that in the darkest shot, the highlights aren't blown and in the lightest shots, there is some space on the left side (lots of space, preferably, since that's where noise lives).

But this post is really about the Processing:

I'll do this by example. This is a shot I recently posted on NSN. First, the three individual exposures:

This scene probably didn't need an HDR treatment, but I think it can still be improved by it.

These images were first converted to TIF in ACR. The only adjustment I made in ACR was to set the white balance, and I set it the same on all three shots. This is important--if your camera is set to AWB, you could get different white balances for the different exposures. It's also important not to make any other changes in the RAW conversion step. (Well, there are probably some changes that would be okay, but I'm not going to go into that.)

I take these into Photomatix and generate an .HDR file (or .EXR file--for most practical purposes it doesn't really matter which format). I set Photomatix to "Align source images by matching features", to "Reduce chromatic aberrations", and to "Attempt to reduce ghosting artifacts--background movements (eg water or foliage)" with "High" detection. I actually do this in batch mode, since I'll come back from a trip with perhaps dozens of sets of images to make into HDR files.

I can then open the HDR file and do tone-mapping. This is where it gets complicated in Photomatix, as there are so many options and sliders to play with. My main warning here is that the image you see on the screen doesn't have to look like the final result. In fact, it probably won't, as I'll show. I actually do two tone-maps for my image, one using the Details Enhancer (DE) method, and one using the Tone Compressor (TC) method. The DE operates locally, trying to maximize local contrast across the image. The TC method acts globally, to map the HDR space into a LDR space in a uniform way (so that two pixels with the same HDR values in different parts of the images will have the same LDR values). The DE method can result in halos, while the TC method will not. But don't worry about that now...

Here are my two tone maps for the above image. I have no idea what settings I used for each of these--I just play around until I get something I'm happy with.

Here's the DE version:

And here's the TC version:

Neither one is something I'd be happy with. The DE is very flat, and the TC is very contrasty--in particular the gradation in the sky has been emphasized. (Note that in the DE version it actually reduced this gradation from the original.) If we zoomed right in, though, we'd see better detail in the DE version.

Next, I take these two images and put them into Photoshop. My technique is to put the DE layer on the bottom and the TC layer on top, with an Overlay blending mode and an opacity somewhere between 20-40% (I forget what actual value I used here). When we do this, we get the following:

Now we're getting somewhere. I think this is better than either of the individual tone maps, and certainly better than the "0" exposure by itself. But every image I do any processing on (whether it's HDR or not) gets an optimization treatment of levels, curves, and saturation, often with masks to selectively apply the effects to different parts of the image. The treatment is always done manually to get what I feel at the time is the best presentation I can get from that image, while staying true to what I remember the scene looking like in my mind.

Below, I'll show what I got when I applied these optimizations to both the above blended HDR image and the original "0" exposure alone.

First, the HDR:

And what I'd have gotten if I didn't shoot HDR and just optimized the "0" exposure:

To me, there's really no comparison. The HDR really is more vibrant than the other. And at the same time, it has less gradation in the blue sky, which I know is objectionable to some people.

But to be fair, I'd have done a couple of things differently if I hadn't shot for HDR. First, I'd have shot a bit more to the right (as I had more room on the right side of the histogram in the "0" exposure than I did on the left). This likely would have helped with noise in the shadows (which you can't really see at this web-size anyway). Secondly, I would likely have done some adjustments in ACR (like "fill light"--or other tools in that part of ACR). But for this image, I don't think I would have done much.

So there you go. My basic HDR technique in a nutshell. I shoot every landscape image with bracketing, on the assumption that I will apply this technique to it.

Friday, October 8, 2010

Featured Image #2

My next featured image is more recent. I took this in Jasper NP last weekend.

This is an HDR panoramic image taken from the Wilcox Pass trail, looking toward the Athabasca Glacier. On the left is Mount Athabasca (and the secondary peak is Andromeda), and on the right is Mount Kitchener (with the snow-covered peak). The glacier is obvious between them. If you look really carefully, you can see the moon on the right.

An interesting tidbit: the river that comes off the Athabasca Glacier is not the Athabasca River, but the Sunwapta. Likewise, the river than comes down from the Athabasca Pass is not the Athabasca River, but the Whirlpool River. Both are tributaries of the Athabasca, though. The Athabasca River comes off the Columbia Glacier, just a few kilometres from the Athabasca Glacier (both come off the Columbia Icefield). The Columbia River, though, has nothing to do with the Columbia Glacier or the Athabasca River--it heads west to the Pacific, while the Athabasca River flows north to the Arctic. But the source of one or more tributaries of the Columbia River also come off the Columbia Icefield, just a few kilometres away. Additionally, the source of the North Saskatchewan River, which flows east to Hudson's Bay (and on to the Atlantic) also comes off the Columbia Icefield, making it the only place on the continent which drains into three oceans.

Frankly, though, I've always thought the concept of Hudson's bay flowing to the Atlantic is a bit weak. I guess it depends on whether the Arctic Archipelago is in the Arctic Ocean or separates the Arctic and Atlantic Oceans. But if you don't accept that, then you have to have two continental divides, and the one that splits north and east ends up in Ontario. (Actually, even with the traditional Hudson's bay=Atlantic argument, we have two divides, but the north section becomes quite small--just Northern Alberta, a corner of BC, and the Northwest Territories--and we don't worry much about it.)

Anyway, this picture was taken from the Wilcox pass trail which is in Jasper, but just a stone's throw from the Banff border. Actually, some of Banff is in the picture, on the left edge, since the Banff/Jasper border goes up to the peak of Mt. Athabasca. This trail is strenuous but not technically difficult as it goes straight up the side of the mountains. It doesn't switchback,but angles up to the north, quickly getting above the treeline to views like this. Generally, you'd expect to see a group of male bighorn sheep up here, but for some reason this day there were none. One photographer from Montana I ran into on the way up (who was on his way down) said that he'd been coming here at around this time for 26 years, and it was the first time he'd been skunked.

It was shot with a Canon 5D Mk II, and a 28-135 IS lens. That's certainly not my favourite lens, but I wanted to keep the weight down, considering I was also carrying a 300/2.8 IS. If I'd had my 17-40 instead, there'd be a much bigger gap between the two lenses--since getting the 5D2 (my other camera has a 1.6 crop factor) I've missed having a lens between them, so on this trip I dusted off the old 28-135 IS. (It had been sitting on a shelf since I got the 17-40.)

I shot it with several frames, with the camera oriented vertically. Each frame had three exposures. The three exposures were all the same for each frame, so this was done in M mode. Stitching becomes nearly impossible if you use different exposures across a pano. Back at the computer, I ran each set of three exposures through Photomatix to get an .EXR file (which is an HDR format). I didn't tone-map them yet. I took the EXR files into AutoPanoPro to stitch into one larger EXR file. That now went back into Photomatix to tone map. As usual with my HDR work, I tone-mapped it twice, once with the Details Enhancer mode and the other with the Tone Compressor mode. These two images went into CS4 as separate layers. I put the TC layer on top of the DE layer, set the blending mode to overlay and adjusted the opacity to taste. (I think it ended up around 40% in this case.) Then I did the usual levels and curves adjustments. The saved layered 16-bit TIF file is around 2.5 GB in size. Ouch. I really wish someone would figure out a way of losslessly compressing 16-bit TIF files!