High Dynamic Range Imaging by Marissa Garcia, Shota Makino, Sixue(Mira) Chen - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Chapter 5

Implementation: Tone Mapping Method1

5.1 Tone Mapping

Tone Mapping is a tool that allows us to map a High Dynamic Range (HDR) image for display on a Low Dynamic Range (LDR) medium, such as an LCD screen. We have implemented Reinhard's algorithms in doing this, which revolve around the idea of scaling the pixel values of the image by a factor to fit in the LDR. In Reinhard's paper, two implementations are found. Let us call these two: Initial Scaling, and Dodge-and-Burning (DAB).

For both implementations, we compress the 3 different channels of Red, Green, and Blue into luminance values by:

img14.png

We denote the luminance value by Lw and Red, Green, Blue by R, G, B respectively.

As we would like to avoid singularities, we adjust all luminance values for each pixel with a small value, ε. For the Initial Scaling scheme, we first obtain the key value of the scene by computing:

img15.png

where we sum over all x and y values indicating pixel location. Now, we normalize all pixel values with respect to the middle-grey of the scene. The middle-grey is the subjective middle brightness region of the scene and for images of normal brightness, this middle-grey value typically maps to 0.18, and always lies in between 0 and 1. Once we have normalized, we scale all pixel values by to get a LDR image:

img16.png

In the DAB scheme, we obtain two Gaussian functions of different sizes located concentric with each other, where the ratio of variances is set to 1.6 (this value can be changed slightly to meet better quality tone mapping). We convolute the image with both Gaussian functions and calculate:

img17.png

where V1 and V2 are the Gaussian functions of different sizes, φ is a parameter (=8 in our case), a is the subjective middle-grey value of our scene and s is the scaling ratio of the Gaussian functions.

In doing so, we hope to find a small outcome that is less than or equal to a tolerance level that we give (in our case 0.05). If this value meets the tolerance level, we try to enlarge the variance (and by doing so enlarge both gaussians) so that we can compute (1) over again to re-evaluate if this larger area still meets the tolerance. We keep doing this until our Gaussians cover the entire image or we meet the largest area that is less than the tolerance level. We then keep the convoluted values of the image with the smaller Gaussian function and use this for our new LDR image.

What we are essentially doing in this scheme is finding the smallest contrast difference obtainable in the largest area and keeping these values. In effect, we are smoothing the image to fit the LDR yet keeping the edges and details of the image.

In these two ways, we are able to obtain a LDR from a HDR image.

 

 

__________

1This content is available online at <http://cnx.org/content/m45499/1.1/>.