HDR photography - why and how
Give me the highest dynamic range!
Written on 05/22/2011 by Patrick Bregman
I felt like doing a little tech blog again, and this time I want to talk about high dynamic range photography, also known as HDR photography. Let's start by saying that I won't go into the exact details of what HDR is. If you want to read all about it, I suggest you start with the Wikipedia page about HDR. I will, however, cover the basics as far as I know them.
You might have seen the term HDR in recent games. I know that at least Oblivion and Half Life 2: Episode 2 have this option. The simplest (and most direct) explanation is that the dynamic range is higher than the "normal" dynamic range. Sounds logical, doesn't it? But then the question rises, what is dynamic range? Dynamic range is the difference between the darkest and the lightest part of the image, at least that's how Wikipedia explains it.
You can see it like this: A camera can only capture a certain range of light. This is often not the entire range of light that you and I see. This means the camera has to choose which range it captures, which is done by checking how bright certain spots are. Those are the points on which your camera will focus. Let's look at a picture to make it clear:

As you might already have spotted, the trees in the bottom center are not completely green, part of them is black or very dark green. The camera did this to make sure that the part on which it was focused, the clouds and the sky, was much brighter than the shadow side of the trees. There are a few more places in the picture where this happens. Also, please note that this was already a HDR photo. HDR images are meant to reproduce the entire dynamic range that our eyes can see. A camera or computer display is not capable of capturing or displaying the entire dynamic range that we can see.
Why do you want HDR?
This is an interesting question, why do we want HDR? I personally think that it is because we are expecting more and more from our PCs and camera's. Also, a lot of games are moving to a more life like appearance, which means that the standard dynamic range that we get is not enough to display the dynamic range we expect to see when we look outside. And because displays are still what we consider "SDR", or Standard Dynamic Range, we needed some kind of solution to this. You can see this in the above mentioned games, the parts which are normally render very dark to black are now rendered with a bit more color in it while the very bright parts are still rendered very bright, but also with color in it. The trick to this is kinda technical. Given a game, the graphics card calculates colors between 0 and 255. If a color happens to become 345 because of the fact that there is a light source close to it, it is automatically set to 255. To render stuff in HDR, the idea of immediately putting everything in the 0 to 255 range is dropped. Instead, the calculations are done with floating point numbers. So the 0 to 255 range is changed to 0.0 to 1.0. If a color is, let's say, 2.5, it is stored as 2.5 and all calculations are done with that specific color as 2.5. Only in the last step, sending everything to your display, is it put back into the 0 to 255 range. It may sound a bit complex, but this is a part that you normally don't have to bother with. Unless you are a game developer, and in that case I'm sure you can find holes in my explanation.
How do you get HDR images from your camera?
I know of two ways to get HDR images from your camera. The first is the easiest but requires that your camera can make HDR images on it's own. My camera (a Sony DSC-HX5V) can do this. This mode is called Backlight correction HDR and is primarily intended to take pictures in the direction of the sun or another bright source of light. The idea is that the camera takes a few pictures with different lighting. My camera takes 3 pictures. One that is darker than normal, to capture all the fine details, one with the normal settings and one which is brighter to get all the highlights. It then combines these three pictures into one. The result of this is pictured above.
The other option is using software on your PC to combine a collection of pictures into one. This gives you the option to tune how much of the effect you want in the picture. This requires you to take 3 pictures that are exactly the same. This is almost impossible to completely by hand, so cameras are starting to get an option called "bracketing" in the compact camera segment. DSLR cameras and professional cameras already had this option for a while. Bracketing means that your camera shoots a series of pictures with different lighting settings for you. Afterwards you can combine those pictures into one using special software. Before giving you a boring list of software that you might use for this, I'll give you an example of this technique:

You can see that the trees are still very dark, but the clouds have a bit more color. And of course you see the sun burning it's way through. I don't really like this picture, the effect is a bit too much for my taste but it gives a nice view of what can be done.
People who notice details will also see that there are some kind of borders along the top and right edges. This is because I shot this using bracketing without using a tripod. I realigned the images, but I "forgot" to crop those borders away. "forgot"? Yes, because it shows that there are actually three images used to make this scene.
Then a list of software that you can use to make your own HDR pictures. First is something which is cross-platform, I only discovered this today so I have no idea how good it actually works so please leave a comment telling me about it. The program that I'm talking about is Luminance HDR. This is build upon Qt4, a framework which should be available for almost all systems. Besides this I only know of two Mac OS X programs, namely Light Compressor and HDRtist. I personally prefer Light Compressor because it gives a bit more control over the result. But if you can't spare the money for it, HDRtist works just as well, it only gives a bit less control over the result. The software HDR picture was generated using HDRtist.
Well, that was it for this post. If you have questions, things you want to share or anything else, drop them in the comments box below.
More like this
-
Difference between zoom and prime lenses — 01/16/2012
A lot of people have a camera, be it in their phone, a compact camera, a dSLR or any other type. Most of these cameras ...
-
Night photography — 04/27/2012
Long time no post. Been busy with all kinds of stuff, including school and work. But when I came home this night I saw quite ...
-
A trip through your psyche - Part 3 — 06/11/2011
First of, a new table of contents, and then on to the real content.
blog comments powered by Disqus



