ImageProcessingBasics.com

Digital image processing tutorials and interactive applets

### Histogram equalization and specification

#### Short tutorial

In histogram equalization we are trying to maximize the image contrast by applying a gray level transform which tries to flatten the resulting histogram. It turns out that the gray level transform that we are seeking is simply a scaled version of the original image's cumulative histogram. That is, the graylevel transform T is given by T[i] = (G-1)c(i), where G is the number of gray levels and c(i) is the normalized cumulative histogram of the original image.

When we want to specify a non-flat resulting histogram, we can use the following steps:

- Specify the desired histogram g(z)
- Obtain the transform which would equalize the specified histogram, Tg, and its inverse Tg
^{-1} - Get the transform which would histogram equalize the original image, s=T[i]
- Apply the inverse transform Tg
^{-1}on the equalized image, that is z=Tg^{-1}[s]

Related links:

Histogram equalization at wikipedia

Histogram specification at Harvey Mudd College

Histogram equalization at University of Edinburgh

#### Applet instructions

Click the images on the upper right to change the image being processed. You can choose the specified histogram using the radio buttons. In "User defined" mode you simply hold down the left mousebutton while painting your desired histogram in the figure depicting the specified histogram.#### Comments

comments powered by DisqusImageProcessingBasics.com © 2008-2024