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 first developed for use in aircraft cockpit displays.D. J. Ketcham, R. W. Lowe & J. W. Weber: ''Image enhancement techniques for cockpit displays''. Tech. rep., Hughes Aircraft. 1974. cited in R. A. Hummel: ''Image Enhancement by Histogram Transformation''. Computer Graphics and Image Processing 6 (1977) 184195. 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 theProperties 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. 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 regarding to intensities, 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.K. Zuiderveld: ''Contrast Limited Adaptive Histogram Equalization''. In: P. Heckbert: ''Graphics Gems IV'', Academic Press 1994,Contrast Limited AHE
Ordinary AHE tends to overamplify the contrast in near-constant regions of the image, since the histogram in such regions is highly concentrated. As a result, AHE may cause noise to be amplified in near-constant regions. Contrast Limited AHE (CLAHE) is a variant of adaptive histogram equalization in which the contrast amplification is limited, so as to reduce this problem of noise amplification.S. M. Pizer, E. P. Amburn, J. D. Austin, et al.: ''Adaptive Histogram Equalization and Its Variations''. Computer Vision, Graphics, and Image Processing 39 (1987) 355-368. In CLAHE, 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 neighbourhoodEfficient computation by interpolation
Adaptive histogram equalization in its straightforward form presented above, both with and without contrast limiting, requires the computation of a different neighbourhood histogram and transformation function for each pixel in the image. This makes the method very expensive computationally. Interpolation allows a significant improvement in efficiency without compromising the quality of the result. The image is partitioned into equally sized rectangular tiles as shown in the right part of the figure below. (64 tiles in 8 columns and 8 rows is a common choice.). A histogram, CDF and transformation function is then computed for each of the tiles. The transformation functions are appropriate for the tile center pixels (black squares in the left part of the figure). All other pixels are transformed with up to four transformation functions of the tiles with center pixels closest to them, and are assigned interpolated values. Pixels in the bulk of the image (shaded blue) are bilinearly interpolated, pixels close to the boundary (shaded green) are linearly interpolated, and pixels near corners (shaded red) are transformed with the transformation function of the corner tile. The interpolation coefficients reflect the location of pixels between the closest tile center pixels, so that the result is continuous as the pixel approaches a tile center. This procedure reduces the number of transformation functions to be computed dramatically and only imposes the small additional cost of linear interpolation.Efficient computation by incremental update of histogram
An alternative to tiling the image is to "slide" the rectangle one pixel at a time, and only incrementally update the histogram for each pixel,T. Sund & A. Møystad: ''Sliding window adaptive histogram equalization of intra-oral radiographs: effect on diagnostic quality''. Dentomaxillofac Radiol. 2006 May;35(3):133-8. by adding the new pixel row and subtracting the row left behind. The algorithm is denoted SWAHE (Sliding Window Adaptive Histogram Equalization) by the original authors. The computational complexity of histogram calculation is then reduced from ''O''(''N²'') to ''O''(''N'') (with ''N'' = pixel width of the surrounding rectangle); and since there is no tiling a final interpolation step is not required.See also
* Histogram equalization *References
{{reflist 6. G. R. Vidhya and H. Ramesh, "Effectiveness of contrast limited adaptive histogram equalization technique on multispectral satellite imagery", Proc. Int. Conf. Video Image Process., pp. 234-239, Dec. 2017.External links