Monday 28 July 2008

High Dynamic Range

Someone was asking the other day about HDR photography, or high dynamic range. This is a process whereby you take several photographs of the same subject with varying exposures, then mathmatically combine them to produce an image with greater dynamic range.

What is dynamic range? Well the simplest way to describe it is that amount of detail that is exposed correctly so that it can be seen (i.e. that isn't blown out or completely black).

Have you ever looked at a beautiful sunset and tried to photograph it, only to find the sky is a beautiful red colour, but the foreground is in silhouette even though you could see it when you were there? Or it's a beautiful summer day, with a clear blue sky and you try to photograph someone, and they come out correctly exposed but the sky is blown out? Or that film camera images always seem to look nicer than digital camera images? Well that's because the human eye has a much greater dynamic range than a camera, and film has a better dynamic range than digital. And essentially the greater the dynamic range the more detail in the image. So what we see isn't necessarily what we are going to capture with our camera.

True HDR


But here is where the maths come in. We can actually take multiple exposures of an image and combine the best bit from each. To do this I use a piece of software called Photomatix. This comes in PC and Mac formats, and is pretty cheap. And it works well.

Firstly you need to take your source images. I always start with RAW, but in theory you could have multiple jpegs. You need at least 3 images, with varying exposures, but you can have up to 5 or 7 or even more if the light dictates. I generally do 3 though at +/- 2EV, that is 2 stops below and 2 stops above the metered reading.

You can do a little processing such as setting the colour temperature, but I mostly just leave them as they are. If you modify one though you ought really to modify the others in the same way. This is why I generally leave the images as they came from the camera.

You then load them into Photomatix and let it create the initial blend.
Capture

Notice the image will look utterly wierd. This is because at this point the image has a higher dynamic range than your monitor is capable of displaying. You can move your cursor around the image to reveal things. You will see the bightness adjust just like the human eye would as you move around the image. It's good here to check for noise or any artifacts that will ruin the final combine. If all looks good though, you can tone map and compress the image into something your monitor can handle. In the image above I have focused in on the window detail which show the detail of the brickwork inside the building even though on the large view this is completely black.

When you do this there are many different options you can choose from. It can be a bit trial and error because until you have processed the image you won't know 100% what it will look like.
Capture2

Ever again the loupe is focused on the interior detail through the window. This view gives you a pretty good idea what the image will end up like, but it could still be a long way away. It could eaily be far too bright or far too dark. So this is where the trial and error comes. Basically you just have to pick some settings and try it. Then look at the end result.
Capture3

If you like this image, you should then save it, either as a 16 bit TIFF or an 8 bit JPEG. If it's not right though, try to go back and fix it. Photomatix has the highest dynamic range and colour depth to work with. If you save the image you're locking that compressed view down, so you can only work with that set amount of data. If you try to fix any images in Photomatix this will yield a better final combine, although it will be much more work to do this.

Eventually though you'll have something you are happy with. At this point I would then run any shaprening, cropping or tweaking you want, to create your final image. Here is mine
Hurlstone Point

I just did this quickly as a test, I think the end result it slightly 'overcooked', the blue is too saturated for my liking although the brickwork colours better resemble the glourious summer sunset we had that evening. I may revisit this image and spend an hour or so on it.

Pseudo HDR (Tone mapping)


There is another technique you can create better images from just a single file. Usually people use RAW images for this. In theory you could use a single JPEG. I tried this although it's debatable how much of an improvement it made. You could spend time doing this, although I can't say that it would be worth it. However with a RAW you can extract several different 'exposures' and save these. Then load them into photomatix, tell photomatix what the EV differentials are (in 1/3 EV increments) then process as above.

Actually I do things slightly differently. I begin by teaking the image in lightroom to the best of my abilities. I'll crop, rotate, and adjust contrast, saturation and levels to make it look as good as I can. For example
Exmoor Pony

Then I'll save three 'exposures' from that point and combine these in photomatix
Exmoor Pony (redo)

Again I try to do as little processing afterwards as I can, and prefer to try to get photomatix to create the image correctly in the first place. The results can be quite pleasing however.
Pony Food

No comments: