Computer Vision Interview
20 essential Q&A
Updated 2026
histogram
Histogram Equalization: 20 Essential Q&A
Global equalization, CLAHE, and when contrast stretching helps or hurts.
~10 min read
20 questions
Intermediate
equalizationCLAHECDFcontrast
Quick Navigation
1
What is histogram equalization (HE)?
⚡ easy
Answer: Remaps intensities so output histogram is more uniform—spreads contrast using the cumulative distribution function (CDF) as a transform.
2
What is an image histogram?
⚡ easy
Answer: Count of pixels at each intensity level (per channel). For 8-bit gray, 256 bins—shows under/over exposure and bimodality.
3
How does CDF define the HE mapping?
📊 medium
Answer: Transform T(k) maps input level k using normalized CDF × (L−1)—monotonic mapping preserves order, spreads occupied intensity ranges.
4
What is global HE?
📊 medium
Answer: Single mapping from whole-image histogram—fast but can fail with spatially varying illumination (washes out regions).
5
Why “equalize” to flat histogram?
⚡ easy
Answer: Uniform use of gray levels maximizes entropy in a discrete sense—improves perceptual contrast when information was compressed into narrow intensity band.
6
Why does HE amplify noise?
📊 medium
Answer: Stretching flat regions spreads quantization noise across more levels; CLAHE limits contrast locally to reduce this.
7
What is CLAHE?
🔥 hard
Answer: Contrast Limited Adaptive HE: run HE on small tiles, clip histogram before equalization to limit slope, interpolate tile borders—handles uneven lighting better than global HE.
8
What is clip limit in CLAHE?
📊 medium
Answer: Caps histogram bin heights before redistribution—limits maximum local contrast boost; higher clip → stronger enhancement but more noise.
9
Why tile size matters?
⚡ easy
Answer: Small tiles: local adaptation but blocking artifacts if interpolation weak; large tiles: approaches global HE.
10
Mistake when equalizing RGB directly?
📊 medium
Answer: Independent per-channel HE changes hue/saturation—unnatural colors. Prefer luminance-only or LAB L channel.
11
Recommended color workflow?
📊 medium
Answer: Convert to LAB, equalize L* only, convert back—preserves chroma better than RGB HE.
12
Contrast stretching vs HE?
⚡ easy
Answer: Linearly maps [min,max] to full range—simpler, no CDF; HE is nonlinear full remap based on distribution shape.
13
Gamma correction vs HE?
📊 medium
Answer: Gamma is parametric power curve; HE is data-driven. Gamma doesn’t require histogram computation; HE adapts to image statistics.
14
What is histogram specification?
🔥 hard
Answer: Match histogram to a target distribution via mapping through CDFs—generalization of equalization (uniform target).
15
What is histogram back-projection?
📊 medium
Answer: Marks pixels whose colors match a model histogram—used in classic CamShift / skin detection pipelines.
16
HE in medical imaging?
⚡ easy
Answer: Improve tissue visibility; must avoid misleading diagnosis—sometimes CLAHE on X-ray/CT views; DL often learns normalization end-to-end now.
17
Still use HE before CNNs?
📊 medium
Answer: Less common if dataset is large; can help low-light inputs or classical pre-steps; batch norm and augmentation reduce reliance.
18
Discrete quantization effect?
⚡ easy
Answer: Mapped values rounded to 256 levels—true uniform continuous histogram impossible; some bins may stay empty.
19
OpenCV calls?
⚡ easy
Answer:
cv2.equalizeHist for grayscale; cv2.createCLAHE(clipLimit, tileGridSize) for CLAHE.
clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8, 8))
y = clahe.apply(gray)
20
When avoid HE?
📊 medium
Answer: When preserving absolute photometry matters, or scene already high contrast—HE can clip highlights or crush semantic color cues.
Histogram / Contrast Cheat Sheet
Global HE
- CDF remap
- Whole image
CLAHE
- Tiles + clip
- Local contrast
Color
- LAB L only
- Not RGB per channel
💡 Pro tip: CLAHE = adaptive + clip limit—say why global HE fails on uneven light.
Full tutorial track
Go deeper with the matching tutorial chapter and code examples.