WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Histogram Equalization

image
Couple
mode
HSB
RGB
dither
The histogram of an image shows how many pixels have each of the possible intensity values. Histogram equalization is a kind of contrast enhancement that stretches the histogram so that all values occur (more or less) an equal number of times. The resulting image uses the full range of possible values. This often works well, especially for bringing out details in overly light or overly dark sections of a grayscale image. When operating on color images, straightforward application of the histogram equalization to the red, green, and blue channels increases the contrast, but may also change the color balance. A common trick (selected here using the mode chooser box) is to operate in the HSB colorspace, applying the histogram equalization to the brightness channel, while leaving the hue and saturation channels unchanged. The display shows the original image on the left and the equalized image on the right. The histograms of the two images are shown immediately below. Observe how the RGB mode stretches all three channels while the HSB mode only stretches the brightness channel.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.