Tone mapping is a method to convert data with greater color depth (12 or 16 bit) to 8 bit. Informally speaking, each input value is linearly transformed into a floating point number from 0 to 1, then possibly subjected to some more transformations in order to augment contrast, and then converted to a 8-bit integer.

There are 5 options of tone mapping:

  • Linear
  • Gamma
  • Gamma+Contrast
  • Gamma+Curves
  • Gamma+CLAHE

Below are the details on these options.

Linear

The floating point number is taken as is, without any additional transformations.

Parameters: none.

Gamma

The floating point number is subjected to gamma transformation. Pixels with brightness below the Black Point are interpreted as pure black, those with brightness above the White Point are interpreted as pure white, and those in between are converted using the power law with exponent Gamma.

Parameters: Gamma, White Point, Black Point.

If Autocontrast option is selected, then White Point and Black Point are calculated automatically.

Gamma+Contrast

The floating point number is subjected to the following two transformations in a row:

  • Gamma transformation (see above) with Black Point set to Offset and White Point set to 1.
  • Contrast-enhancing transformation, defined as a cubic spline via 4 points: (0,0), (0.1,0.1-ContrastShift), (0.9,0.9+ContrastShift), and (1,1).

Parameters: Gamma, Offset, ContrastShift.

Gamma+Curves

The floating point number is subjected to the following two transformations in a row:

  • Gamma transformation (see above) with Black Point set to Offset and White Point set to 1.
  • Contrast-enhancing transformation, defined as a cubic spline via 5 points: (0,0), (0.25, 0.25 + ShadowShift), (0.5, 0.5+MidtoneShift), (0.75, 0.75+HighlightShift), and (1,1).

Parameters: Gamma, Offset, ShadowShift, MidtoneShift, HighlightShift.

GAMMA+CLAHE

CLAHE algorithm (Contrast Limited Adaptive Histogram Equalization) splits the image into several regions (Region Size along each side) and applies the histogram equalization transformation to each region. Then an overall Gamma transformation (see above) is applied.

Clip is the parameter that bounds contrast enhancement, so as not to enhance the background noise.

Parameters: Gamma, White Point, Black Point, Clip, Region Size.

  • No labels