Histogram equalization is a relatively simple process of flattening a distribution curve, or of imposing a balance in distribution. If the measurement is a digital translation, the process is a straightforward computer program. There are many uses for histograms, which are a graphic mapping of a single variable for a large set of data points. The most common applications in which many people encounter histograms are audio and video, both still and moving.
At its most basic, a histogram is a statistical tool for quality control. Typically, the graph’s horizontal x-axis is a single variable, say a dice cube rolled from one through six. The vertical y-axis is a simple count, or measurement, of frequency. A given dice is rolled 100 times, and the results are plotted onto this graph. Oddly, the numbers two, three, four, and five each appeared 16 times, but the number one only appeared once while the number six appeared 35 times.
In the example above, the graph is skewed for the numbers one and six. The dice is clearly defective, and quality control dictates that it be fixed by, say injecting it with weights. The fixed dice is again rolled 100 times, and the resulting graph shows that all six numbers appear with equal frequency. A histogram equalization has just been performed.
The histogram’s frequency distribution curve is common, and very apparent, in audio equipment. An expensive radio, perhaps a component amplifier, may display a row of digital bar graphs that dance up and down to the music. The leftmost bar measures low frequency noise, or bass; the bars progressively to the right measure high frequencies, or treble. Accompanying levers can increase or dampen a particular frequency. If the deep, booming bass of a Hip-Hop beat displays sharp spikes in the bar graph, the corresponding lever can be used to isolate and lower its volume without affecting the other frequencies.
The displayed audio signal in this example was seen to be unbalanced in favor of bass. The histogram equalization, achieved by lowering just the bass volume, imposed a balance and flattened distribution of all the music’s frequencies to approximate equal volume. The measurement is of a single variable, namely sound frequency from low to high. In a given instant of time, music projects many frequencies at varying volumes, and each of these measurements are data points.
One other common application of histogram equalization is in digital photography. A typical photograph contains millions of data points, called pixels. One photo quality control feature of many digital camera models is the histogram analysis. It measures the single variable of each pixel’s luminescence from light to dark, from white to black. The resulting graphic map is a display of the photo’s range of contrast.
The conventional wisdom of a good quality photograph is one which contains pure white, pure black and every gradation of light in between. If an over-exposed photo, or one awash in bright white light, is about to be shot, a review of its histogram will reveal a corresponding spike in graphic representation. The same is true of a loss of contrast in an under-exposed, darkened photo. Histogram equalization can be viewed in real time by adjusting the shot’s exposure settings until the graph displays a more balanced distribution of luminescence. Post-processing of digital images with a computer program may also have the ability to evaluate and equalize color histograms.