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's really being asked
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.
The full answer
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.
The mistakes people make
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.
What usually comes next
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.
A 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.
Interview question
Which statement best describes how histogram equalization remaps grayscale intensities?
- a.It counts pixels in each bin to detect whether the image is under- or over-exposed.
- b.It linearly stretches the darkest and brightest pixels to fit the full 0-255 range.
- c.It shifts all pixel values by a constant to center the histogram around the mid-tone.
- d.It applies the cumulative distribution function to redistribute intensities toward a uniform histogram.Correct
Why? this is the answer
Histogram equalization uses the cumulative distribution function of the original histogram to remap intensities so the output approximates a uniform distribution, maximizing global contrast. The first option describes linear contrast stretching, which merely rescales the minimum and maximum values without considering the frequency of each intensity level.
Just read this? Test yourself on what you have been reading.
Read the original → en.wikipedia.org
- #computer vision
- #image processing
- #histograms
- #contrast enhancement
- #pixel statistics
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on computer vision — each one lists the topics its interview covers.
See open roles