Describe a grayscale histogram and its use in exposure and equalization

Tests pixel distribution intuition. A strong answer covers intensity bin counts, left or right clustering for exposure errors, and CDF-based redistribution for equalization. Red flag: calling equalization min-max stretching without cumulative mapping.
WHAT THIS TESTS: This question tests whether you understand pixel-level statistics as a foundation for image analysis and enhancement. Interviewers want to see that you can connect a mathematical construct, the histogram, to physical imaging concepts like exposure, and that you know the difference between diagnosing a problem and algorithmically correcting it.
A GOOD ANSWER COVERS: First, define a grayscale image histogram as a bar chart or array where each index represents an intensity value from 0 to 255 and the height or value at that index is the count of pixels having that intensity. Second, explain exposure diagnosis by describing how an under-exposed image has most of its mass concentrated in the low-intensity shadow bins on the left, often with a spike at zero, while an over-exposed image concentrates mass in the high-intensity highlight bins on the right, often with a spike at 255. Mention that a well-exposed image typically spreads mass across the full range without severe clipping at either end. Third, describe histogram equalization as a technique that remaps intensity values using the cumulative distribution function of the original histogram. The core idea is to transform the input distribution so the output histogram approximates a uniform distribution across all bins, which maximizes global contrast. You should note that this is different from simple linear stretching because it adapts to the actual frequency of each intensity level.
COMMON WRONG ANSWERS: A common red flag is describing histogram equalization as just stretching the minimum and maximum values to fit the full range, which is linear contrast stretching, not equalization. Another mistake is discussing color histograms or RGB channels without first grounding the answer in grayscale, since the question specifically asks about grayscale. Some candidates also confuse the histogram itself with the image, saying the histogram shows spatial information rather than purely tonal distribution.
LIKELY FOLLOW-UPS: An interviewer might ask how histogram equalization behaves on an image that already has a uniform histogram, in which case it should leave the image largely unchanged. They might ask about adaptive histogram equalization, such as CLAHE, and why it is preferred over global equalization in many real-world scenarios. Another follow-up is how to handle color images, typically by converting to a color space like HSV and equalizing only the value channel.
ONE CONCRETE EXAMPLE: Consider a grayscale image of a foggy scene where most pixels sit between 180 and 220 on an 8-bit scale. The histogram shows a tight peak in the upper mid-tones. A human would call this low contrast and slightly over-exposed. Histogram equalization computes the cumulative probability for each bin, then maps the old intensity 180 to a much lower output intensity and spreads the other values across the 0 to 255 range. The resulting image shows clearer edges and more visible detail because the formerly narrow intensity band now occupies the full dynamic range.
Source: Wikipedia: Image histogram
Read the original → Wikipedia: Image histogram
- #computer vision
- #image processing
- #histograms
- #contrast enhancement
- #pixel statistics
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.