Monday, September 19, 2011

What is tone mapping? How does it relate to HDR?

Question

Whenever I read / hear about HDR (High Dynamic Range) photography, someone usually says something along the lines of "Actually, you're talking about tone mapping, not HDR."

Please can someone explain what Tone Mapping is, and how it relates to HDR?

Answer

An HDR image has a high dynamic range, which means a very large ratio between the brightest and darkest parts of the image. An HDR image on a normal (low dynamic range) monitor will actually look very flat:

This is because that huge range of brightnesses has to be compressed to fit into a much smaller range of brightnesses. This results in an overall lack of contrast, hence the flatness.

This image has a split personality, the skies are very bright and the subject much dimmer, if we could use all the monitor's brightness range for the sky, it would look pretty good:

But we'd totally lose our subject. Likewise if you used all the monitors brightness range for the subject it would also look good, but we'd totally lose the sky:

It would be great if we could combine them in some way, or carefully ration out the brightness range we have to work with so we make most use of it. This is where tonemapping comes in.

What tonemapping does is instead of mapping the whole image into the monitor's brightness range in one go, it adjusts the contrast locally so that each region of the image uses the whole range for maximum contrast (there's a bit more going on here, it depends on the tonemapping algorithm used). Here is the same image tonemapped:

The reason that tonemapping is not HDR is that you can tonemap a single low dynamic range image in order to make it more contrasty. The result looks similar but with much more noise in the shadows:

Disclaimer: for the love of God don't do this to your images!

This is an demonstration of the fact that dynamic range and noise are opposites, in fact dynamic range is usually defined in terms of the noise floor of an image. This is because there is a point at which any tonal differences in an image get lost in noise, so this defines the darkest thing you can image (which in tern with the brightest thing, defined by the point at which the signal clips) determines the dynamic range.

No comments:

Post a Comment