Tonemapping

Page Index:

The photographers approach to HDR & MDR tonemapping
   ...a manual tonemapping howto
Overview of tone mapping operators and algorithms

Additional Resources:

HDR Software overview on the Panotools Wiki
ADR (Adaptive Dynamic Range)
Some Light probes

Manual tonemapping of high contrast brackets on the Panotools Wiki

Other external HDR-tonemapping resources:

 

The photographers approach to HDR & MDR tonemapping

While digital cameras utilize linear response curves, negative film incorporates a logarithmic one:
Brightness values near the minimum or maximum values are compressed, utilizing
 a higher dynamic range than typical digial cameras are capable of.
Many photographers are used to this fact and have perfected their darkroom workflow towards logarithmic response curves.

 

How to capture high dynamic range

To overcome the limited dynamic range of digital cameras, there is a workaround available - called "bracketing".
The problem however is, how to map this increased dynamic range into a standar color space for display or print.

( All panoramas use SPi-V viewer technology © Aldo Hoeben )


Bracketed panorama (click image to open full size version)
Click here to open the 3 images as dynamic ADR-Panorama

How to make high dynamic range viewable

This is the so called "tonampping" process. There are several approaches available. The most common ones are:


Averaged
(click image to open panorama)

Averaging (created with Photomatix):

Pixel value of all input images are averaged.

 


Highlight & Shadow Details
(click image to open panorama)
Exposure Blending ("Highlight and Shadow Details" in Photomatix terminology):

The pixel values of each input image are compared. The pixel value of the picture that is neither under- nor overexposed will be used for the final image.


Tonemapped
(click image to open panorama)
Tonemapping:

An adaptive mathematical function is used to recalculate all pixel values to guarantee their fit into a standard (s)RGB color space.

This function is used by applications like Photomatix. Read Photomatix' FAQ to learn more about their tonemapping function.


Logarithmic Tonemap
(click image to open panorama)
"Logarithmic Tonemapping":

Unlike "classic" tonemapping the logarithmic variant will not use local operators to adapt brightness and color values.

This variation resembles most the workflow of a "classic darkroom". I would like to see this implemented in some sort of software.


Overview of tone mapping operators and algorithms

Click on the images to view them full size.

For reference purposes: Download original HDR-panorama
The original images (right click to save):

 D70 sRGB mode, Exposure stepping:

+2 EV 0 EV -2 EV

Panorama as 2-image ADR / 3-image ADR  (good Graphics-card strongly recommended)


Lightness Perception Method (Krawczyk, Myszkowski, Seidel)
Open as Panorama This is a preview of Grzegorz Krawczyk's Lightness Perception Method
(code not yet released to the public)
    Grzegorz Krawczyk is also the author of the "PFStmo"-package. See below for visual comparison.

Further Tone Mapping Operator information is available here.


FDRCompressor Plug-In 1.0 (Andreas Schömann)
(updated: 2006-01-20/zenith bug)

default
Open as Panorama Default Settings from the FDRCompressor Tutorial-page

optimized
Open as Panorama Compression: 4
Global Contrast: 4
Black: 10
Converted to 8 bit and Levels enhanced, Levels (black and white point) corrected to 10 and 210

From the book "High Dynamic Range Imaging" - ISBN 0-12-585263-0

Image names follow the operator names.
All variations rendered with standard options - they do not reflect full potential of the respective tone mapping operators.

Right side image is cropped to show how black (zero) image regions influence the tone mapping algorithm.
 

 

      TMO Parameters by Grzegorz Krawczyk

linear
Open as Panorama
cropped version
 

logarithmic
Open as Panorama
cropped version
 

photographic
Open as Panorama
cropped version

(Open as Panorama)
(also referenced as "reinhard" TMO)

photoreceptor
Open as Panorama
cropped version

(Open as Panorama)

retinex
Open as Panorama
cropped version
 
       

ashikhmin
Open as Panorama
cropped version
 

bilateral
Open as Panorama
cropped version

(Open as Panorama)

chiu
Open as Panorama
cropped version
 

drago
Open as Panorama
cropped version

(Open as Panorama)

ferschin
Open as Panorama
cropped version
 

ferwerda
Open as Panorama
cropped version
 

gdc
Open as Panorama
cropped version

(Open as Panorama)

histadj
Open as Panorama
cropped version
 

horn
Open as Panorama
cropped version
 

icam
Open as Panorama
cropped version
 

miller
Open as Panorama
cropped version
 

mom
Open as Panorama
cropped version
 

oppenheim
Open as Panorama
cropped version
 

pattanaik
Open as Panorama
cropped version
 

schlick
Open as Panorama
cropped version
 

tr
Open as Panorama
cropped version
 

trilateral
Open as Panorama
cropped version
 

ward
Open as Panorama
cropped version

(Open as Panorama)

 

 


A manual approach to implement logarithmic tonemapping

Software needed:

  • HDRShop

  • An image manipulation Software like Photoshop or Gimp

The "Cookbook":

  1. Generate an HDR-image from your bracketed exposures.
    You can download the brackets from the thumbnails on the beginning of the page, or you can directly use the downloadable HDR.
     

  2. Increase the Gamma Value: Go to Menu [View] - [Display Curve] - [Custom].
    For our example, you may use a gamma value of 4 (you have to type the number in the input box)
     

  3. Adapt the brightness value of your image: Menu [View] - [Exposure] - [Custom]
    Move the slider, until the maximum brightness you want to see in your final image is not burnt out.

    The result after above steps may look like this:

     

  4. Save this image as a LDR image. You need to choose a format that will also save your current display settings - like TIFF.
     

  5. Open the image with Photoshop: You can now fine-tune your image by adapting the tonal values:
    This is how brightness distribution will look like after opening the image:


    Now, change the curve using the triangle-shaped sliders on bottom:

    Please note, that we are cutting out some of the minimum/maximum brightness values. This is the same as using negative film for capturing the scenery which also can't capture all brightness values.
    If you like, you could also use an S-shaped gradation curve to achieve the same corrections.


Conclusion:

There is no "one-for-all" universal solution to map high dynamic range images down to a viewable/printable image.
The best method and TMO highly depends on the maximum brightness difference in your source HDR image.


Feedback: salzamt@dativ.at