This is a cython wrapper for the C code of CLAHE (Contrast Limited Adaptive Histogram Equalization), available from "Graphics Gems IV". This is an alternative to contrast-stretch, it slides a window over the image and locally stretches the contrast while respecting a constraint on authorized gradient jumps.
python example.py
Raw image and simple contrast-stretch:
ANSI C code from the article
"Contrast Limited Adaptive Histogram Equalization"
by Karel Zuiderveld, [email protected]
in "Graphics Gems IV", Academic Press, 1994