Functions > Image Processing > Image Manipulation > Example: Equalization
Example: Equalization
equalize
Use the equalize function to perform a histogram equalization. Equalization can be used as an advanced form of level mapping to enhance features of a picture, or to use a particular display device more efficiently.
For information on using this example, refer to About Image Processing Examples.
1. Read in an image and plot the following histogram.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
This image is very dark. You can spread the intensities over a larger portion of the available spectrum.
2. Define the cumulative histogram by the difference equation for CK.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
3. Linearize the cumulative histogram.
Click to copy this expression
Click to copy this expression
Click to copy this expression
Click to copy this expression
4. Plot the new image histogram.
Click to copy this expression
5. Plot the cumulative histogram of the equalized image.
Click to copy this expression
Click to copy this expression
Click to copy this expression
6. Compare the original and equalized images.
(arcs.bmp)
(arcs_eq.bmp)
The equalized image contains details that are not visible in the original image.
The above technique can be used in the following situations:
The image contains mainly highlights and insufficient shadows.
The full dynamic range of the image is not used. For example, the image contains large gaps where no intensities are used.
Some highlights or shadows can become over exaggerated in equalized photographic images due to the sensitivity of the human eye and PC monitor. You can perform level mapping and attempt to correct the problem.
Scaling and clipping are other useful techniques for adjusting the dynamic range of an image. You can use these techniques only for images with intensity spectrum that is narrower than 0 to 255. Equalization can be used even when intensity levels 0 and 255 are present.
Was this helpful?