Computer Vision Interview
40 Q&A
Chapter 4
Histograms & Feature Intro — Interview Q&A
Histogram equalization, CLAHE, and an introduction to keypoints, descriptors, and matching.
40 questions
Chapter 4
Histogram Equalization: 20 Essential Q&A
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.
Feature Detection Intro: 20 Essential Q&A
21
What is a local image feature?
⚡ easy
Answer: A salient image patch with a keypoint (location, scale, orientation) and often a descriptor vector summarizing local appearance for matching.
22
Difference detector vs descriptor?
📊 medium
Answer: Detector finds stable interest points; descriptor encodes local neighborhood for similarity—can mix (e.g. Harris corners + SIFT descriptor in some pipelines).
23
Why are corners good features?
📊 medium
Answer: High gradient in multiple directions—well localized, repeatable under small viewpoint/light changes vs flat regions or straight edges.
24
What is a blob feature?
📊 medium
Answer: Extremum in scale-space (LoG/DoG)—captures roundish regions; complementary to corners for texture-poor scenes.
25
What is scale invariance?
📊 medium
Answer: Detect+describe at multiple scales or with scale-normalized patch so matching works across zoom—SIFT pyramid, ORB octave pyramid.
26
Achieve rotation invariance?
📊 medium
Answer: Assign dominant orientation from gradient histogram and rotate patch canonical frame—or use rotation-invariant descriptors (some trade distinctiveness).
27
What are affine covariant regions?
🔥 hard
Answer: Regions that deform predictably under affine viewing of planar surfaces—MSER, Harris-Affine family; stronger than similarity for wide baselines.
28
What is NCC template matching?
📊 medium
Answer: Normalized cross-correlation over patches—brightness/contrast normalized SSD-like score; expensive vs sparse keypoints.
29
What is Lowe's ratio test?
📊 medium
Answer: Reject match if distance to nearest neighbor is not sufficiently smaller than second-nearest—reduces ambiguous matches.
30
Mutual nearest neighbor?
⚡ easy
Answer: Accept match only if a is nearest to b and b nearest to a—simple filter for symmetric uniqueness.
31
Why RANSAC after feature matching?
📊 medium
Answer: Estimates geometric model (F/E/H) while rejecting outliers from incorrect matches—essential for robust pose and stitching.
32
What is bag-of-visual-words?
📊 medium
Answer: Quantize descriptors to vocabulary clusters; image → histogram of words—classic image retrieval / classification before deep CNNs.
33
Features in tracking?
⚡ easy
Answer: Track keypoints frame-to-frame with KLT, optical flow, or re-detect+match—balance drift vs redetection.
34
Features in SLAM / VO?
📊 medium
Answer: Sparse landmarks for bundle adjustment; need repeatable detection and robust data association across frames.
35
Define repeatability.
⚡ easy
Answer: Same real-world point detected under noise, blur, and viewpoint change—measured by overlap of keypoint regions on benchmark sequences.
36
Define distinctiveness.
⚡ easy
Answer: Descriptor separates correct matches from distractors—low false match rate at fixed threshold.
37
Effect of occlusion?
⚡ easy
Answer: Keypoints disappear; need robust matching, wide baseline tolerance, or dense methods / learning-based segmentation.
38
Why Hamming distance?
⚡ easy
Answer: For binary descriptors (BRIEF, ORB)—XOR + bit count; fast with POPCNT hardware.
39
What is FLANN?
📊 medium
Answer: Fast Library for Approximate Nearest Neighbors—speeds k-NN on high-dim descriptors with trees or LSH; trade accuracy for speed.
40
Learned local features?
🔥 hard
Answer: SuperPoint, LIFT, etc.—CNNs predict keypoints+descriptors end-to-end; outperform classical on some benchmarks with enough data.
Full tutorial chapter
Pair these interview notes with the matching CV tutorial chapter.