next up previous contents
Next: Search for the Optimum Up: Minimum Information Loss Previous: Minimum Information Loss

Building a Logarithmic Histogram

The whole optimization process is done on a logarithmic image histogram. A logarithmic and not a linear histogram is used, because the clipping interval has a constant size for a given contrast on the log scale. Another reason is the possibility of building a logarithmic histogram from high contrast images with a relatively small array. Throughout this chapter tex2html_wrap_inline5033 is used, although any other base would yield the same results (the base 2 is chosen in analogy to photography). While forming the histogram, values below a certain value tex2html_wrap_inline5313 tex2html_wrap_inline5315 and above a value tex2html_wrap_inline5317 should be clipped to these values, as the tex2html_wrap_inline5033 is not defined for 0, and the histogram array is limited for huge luminance values. The histogram is an array, in which each array member holds the number of pixels with the corresponding luminance. The luminance values for each pixel in the raw image are stored in float format, so actually each histogram array member represents luminances in a certain interval. These equidistant histogram intervals are arbitrarily long, but a finer histogram yields a more precise result. We will define the histogram array as H[k], where tex2html_wrap_inline5323, the value tex2html_wrap_inline5325 corresponds to H[1] and tex2html_wrap_inline5329 to tex2html_wrap_inline5331. The luminance corresponding to H[k] will be called tex2html_wrap_inline5335 and the tex2html_wrap_inline5337. The difference of the logarithms of two adjacent grades, the elementary histogram interval tex2html_wrap_inline4849, is
 equation935
The size of the clipping interval for a given clipping contrast C is called CLIP and
 equation941
A possible choice for the above values could be: tex2html_wrap_inline5345, tex2html_wrap_inline5347, tex2html_wrap_inline5349, tex2html_wrap_inline5351, tex2html_wrap_inline5353, then d = 0.005 and CLIP = 1000. The histogram array is initialized to zero, and then for each color component of all raw image pixels, H[k] is incremented, where
 equation951
and d stands for one r, g, or b color component. Note that the raw image does not need to be stored. The histogram can be built simultaneously with the calculation of pixel luminances. Note also that the number of histogram entries (the sum of all H[k]) is three times the number of pixels in the raw image. After the histogram is formed, the optimum clipping interval has to be found.


next up previous contents
Next: Search for the Optimum Up: Minimum Information Loss Previous: Minimum Information Loss

matkovic@cg.tuwien.ac.at