Contrast Limited Adaptive Histogram Equalization - adapthist
Adaptive histogram equalization (AHE) 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. It is therefore suitable for improving the local contrast of an image and bringing out more detail. However, AHE has a tendency to overamplify noise in relatively homogeneous regions of an image. A variant of adaptive histogram equalization called contrast limited adaptive histogram equalization (CLAHE) prevents this by limiting the amplification.
This library is an implementation of the CLAHE algorithm developed by Karel Zuiderveld.
python setup.py build_ext -i python setup.py install
- The underlying algorithm relies on an image whose rows and columns are even multiples of
the number of tiles, so the extra rows and columns are left at their original values, thus preserving the input image shape. * For RGB or RGBA images, the algorithm is run on each channel. * For RGBA images, the original alpha channel is removed.