.. _example_plot_local_equalize.py:


============================
Local Histogram Equalization
============================

This examples enhances an image with low contrast, using a method called *local
histogram equalization*, which spreads out the most frequent intensity values in
an image.

The equalized image [1]_ has a roughly linear cumulative distribution function
for each pixel neighborhood.

The local version [2]_ of the histogram equalization emphasized every local
graylevel variations.

References
----------
.. [1] http://en.wikipedia.org/wiki/Histogram_equalization
.. [2] http://en.wikipedia.org/wiki/Adaptive_histogram_equalization


.. image:: images/plot_local_equalize_1.png
    :align: center


.. literalinclude:: plot_local_equalize.py
    :lines: 22-



**Python source code:** :download:`download <plot_local_equalize.py>`
(generated using ``skimage`` |version|)



**IPython Notebook:** :download:`download <./notebook/plot_local_equalize.ipynb>`
(generated using ``skimage`` |version|)

