Machine learningComputer VisionImage enhancementAlgorithm

Histogram Equalization

Also known as: Histogram stretching, Contrast enhancement

OriginatorSignal processing communityYear1970sSources2Related methods9

Histogram equalization is an image preprocessing technique that redistributes pixel intensities to improve contrast and visibility of details. By spreading the histogram of pixel values evenly across the available range, histogram equalization enhances images with poor contrast, making features more visually distinct and easier to process algorithmically.

Key highlights

  • Simple, fast, and computationally efficient; suitable for real-time preprocessing
  • Automatically adapts to image content; no manual parameter tuning required
  • Effective at improving visibility of details in underexposed or low-contrast images
  • Improves performance of downstream image processing algorithms (edge detection, feature extraction)
  • Reversible; the original intensity mapping can be recovered if needed

Intuition

This section is available to Pro members. Upgrade to Pro

How it works

This section is available to Pro members. Upgrade to Pro

When to use it

Use histogram equalization as a preprocessing step before feature detection, segmentation, or classification when images have poor contrast or uneven illumination. Histogram equalization is particularly useful for medical images, satellite imagery, and surveillance footage. Avoid standard histogram equalization when images already have good contrast (it may introduce artifacts), or when the intensity distribution is meaningful for the task; in such cases, consider adaptive or selective histogram equalization alternatives.

Strengths & limitations

Strengths
  • Simple, fast, and computationally efficient; suitable for real-time preprocessing
  • Automatically adapts to image content; no manual parameter tuning required
  • Effective at improving visibility of details in underexposed or low-contrast images
  • Improves performance of downstream image processing algorithms (edge detection, feature extraction)
  • Reversible; the original intensity mapping can be recovered if needed
Limitations
  • Can introduce artifacts or unnatural appearance when applied to already-good contrast images
  • Amplifies noise in dark or flat regions where pixel values cluster
  • May over-enhance small details unrelated to objects of interest (noise, compression artifacts)
  • Not adaptive to local image regions; global equalization treats all areas uniformly

Common pitfalls

This section is available to Pro members. Upgrade to Pro

Applications

This section is available to Pro members. Upgrade to Pro

Frequently asked

What is the cumulative distribution function (CDF) and how does it relate to histogram equalization?

The CDF shows the proportion of pixels with intensity less than or equal to a given value. For histogram equalization, the normalized CDF directly provides the new intensity for each original intensity: bright intensities (high CDF values) are mapped to higher output values, and dim intensities (low CDF values) are mapped to lower output values, spreading the distribution evenly.

Why does histogram equalization amplify noise?

Histogram equalization stretches underutilized intensity ranges to fill the full range. If a region of the image contains clustered pixel values (e.g., a dark, noisy area), equalization spreads these values across a wider range, making noise more visible. This is a trade-off: improved contrast in underexposed regions comes at the cost of emphasizing noise.

What is the difference between global and adaptive histogram equalization?

Global histogram equalization uses a single histogram for the entire image, treating all regions uniformly. Adaptive histogram equalization (AHE) computes the histogram in small local neighborhoods for each pixel, which preserves local contrast and prevents over-enhancement. Contrast-limited adaptive histogram equalization (CLAHE) further limits the contrast enhancement to avoid noise amplification.

Can histogram equalization be applied to color images?

Yes, but care must be taken to preserve color balance. Applying equalization independently to R, G, and B channels can distort colors. Instead, convert to a color space where intensity and color are separated (e.g., HSV), equalize only the intensity channel, and convert back to RGB. Alternatively, use perceptually uniform color spaces for more natural results.

Sources

  1. 1.
    Gonzalez, R. C., & Woods, R. E. (1992). Digital Image Processing. Addison-Wesley, 2nd edition, Chapter 3.
  2. 2.
    Pizer, S. M., Amburn, E. P., Austin, J. D., et al. (1987). Adaptive histogram equalization and its variations. Computer Vision, Graphics, and Image Processing, 39(3), 355–368.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 3). Histogram Equalization. ScholarGate. https://scholargate.app/computer-vision/histogram-equalization