Adaptive histogram equalization
Adaptive histogram equalization is a computer image processing technique used to improve contrast in images. It differs from ordinary histogram equalization in the respect that the adaptive method computes several histograms, each corresponding to a distinct section of the image, and uses them to redistribute the lightness values of the image. Ordinary histogram equalization simply uses a single histogram for an entire image.
Consequently, adaptive histogram equalization is considered an image enhancement technique capable of improving an image's local contrast, bringing out more detail in the image. However, it also can produce significant noise. A generalization of adaptive histogram equalization called contrast limited adaptive histogram equalization, also known as CLAHE, was developed to address the problem of noise amplification.
Motivation and explanation of the method
Ordinary histogram equalization uses the same transformation derived from the image histogram to transform all pixels. This works well when the distribution of pixel values is similar throughout the image. However, when the image contains regions that are significantly lighter or darker than most of the image, the contrast in those regions will not be sufficiently enhanced.
Adaptive histogram equalization (AHE) improves on this by transforming each pixel with a transformation function derived from a neighbourhood region. It was developed independently by different research groups.[1][2][3][4] In its simplest form, each pixel is transformed based on the histogram of a square surrounding the pixel, as in the figure below. The derivation of the transformation functions from the histograms is exactly the same as for ordinary histogram equalization: The transformation function is proportional to the cumulative distribution function (CDF) of pixel values in the neighbourhood.

Pixels near the image boundary have to be treated specially, because their neighbourhood would not lie completely within the image. This applies for example to the pixels to the left or above the blue pixel in the figure. This can be solved by extending the image by mirroring pixel lines and columns with respect to the image boundary. Simply copying the pixel lines on the border is not appropriate, as it would lead to a highly peaked neighbourhood histogram.
Properties of AHE
- The size of the neighbourhood region is a parameter of the method. It constitutes a characteristic length scale: contrast at smaller scales is enhanced, while contrast at larger scales is reduced.
- Due to the nature of histogram equalization, the result value of a pixel under AHE is proportional to its rank among the pixels in its neighbourhood. This allows an efficient implementation on specialist hardware that can compare the center pixel with all other pixels in the neighbourhood.[5] An unnormalized result value can be computed by adding 2 for each pixel with a smaller value than the center pixel, and adding 1 for each pixel with equal value.
- When the image region containing a pixel's neighbourhood is fairly homogeneous, its histogram will be strongly peaked, and the transformation function will map a narrow range of pixel values to the whole range of the result image. This causes AHE to overamplify small amounts of noise in largely homogeneous regions of the image.
CLAHE
CLAHE differs from ordinary adaptive histogram equalization in its contrast limiting. This feature can also be applied to global histogram equalization, giving rise to contrast-limited histogram equalization (CLHE), which is rarely used in practice. In the case of CLAHE, the contrast limiting procedure has to be applied for each neighbourhood from which a transformation function is derived. CLAHE was developed[5] to prevent the overamplification of noise that adaptive histogram equalization can give rise to.
This is achieved by limiting the contrast enhancement of AHE. The contrast amplification in the vicinity of a given pixel value is given by the slope of the transformation function. This is proportional to the slope of the neighbourhood cumulative distribution function (CDF) and therefore to the value of the histogram at that pixel value. CLAHE limits the amplification by clipping the histogram at a predefined value before computing the CDF. This limits the slope of the CDF and therefore of the transformation function. The value at which the histogram is clipped, the so-called clip limit, depends on the normalization of the histogram and thereby on the size of the neighbourhood region. Common values limit the resulting amplification to between 3 and 4.
According to the paper that first presented CLAHE[5], it is advantageous not to discard the part of the histogram that exceeds the clip limit. Rather, the authors suggest a recursive procedure in which the excess is redistributed equally among all histogram bins, and the histogram is clipped again to limit those bins which the redistribution has pushed over the limit again.
References
- ^ D. J. Ketcham, R. W. Lowe & J. W. Weber: Image enhancement techniques for cockpit displays. Tech. rep., Hughes Aircraft. 1974.
- ^ D. J. Ketcham, R. W. Lowe & J. W. Weber: Real-time image enhancement techniques. In: Seminar on Image Processing, pp. 16. Hughes Aircraft. 1976.
- ^ R. A. Hummel: Image Enhancement by Histogram Transformation. Computer Graphics and Image Processing 6 (1977) 184195.
- ^ S. M. Pizer: Intensity mappings for the display of medical images. In: Functional Mapping of Organ Systems and Other Computer Topics. Society of Nuclear Medicine. 1981.
- ^ a b c Pizer, S. M., Amburn, E. P., Austin, J. D., et al.: Adaptive Histogram Equalization and Its Variations. Computer Vision, Graphics, and Image Processing 39 (1987) 355-368. Cite error: The named reference "clahe87" was defined multiple times with different content (see the help page).
See also
External links
- Example images demonstrating the effect of CLAHE at the Max Planck Institute of Molecular Cell Biology and Genetics
- A tutorial on CLAHE
- An example implementation of CLAHE in ANSI C