Adaptive histogram equalization

It is therefore suitable for improving the local contrast and enhancing the definitions of edges in each region of an image.

Simply copying the pixel lines on the border is not appropriate, as it would lead to a highly peaked neighbourhood histogram.

CLAHE limits the amplification by clipping the histogram at a predefined value before computing the CDF.

[3] The image is partitioned into equally sized rectangular tiles as shown in the right part of the figure below.

The transformation functions are appropriate for the tile center pixels (black squares in the left part of the figure).

This procedure reduces the number of transformation functions to be computed dramatically and only imposes the small additional cost of linear interpolation.

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.

G. R. Vidhya and H. Ramesh, "Effectiveness of contrast limited adaptive histogram equalization technique on multispectral satellite imagery", Proc.