CVML Deep Question Bank¶
Curated practice questions across all chapters, sorted by chapter and difficulty. Detailed answers included.
Difficulty levels:
- 🟢 Basic
- 🟡 Intermediate
- 🟠 Hard
- 🔴 Very hard
- ⚫ Deep thinking (multi-topic)
Chapter 01 — Image Acquisition¶
Conceptual¶
🟢 Q1. Why do we use [0, 1] floating-point intensity values in computer vision rather than [0, 255] uint8?
Higher precision, no over-/underflow during convolution, easier ML normalisation.
🟢 Q2. Why is RGB three channels and not four or two?
Mirrors the three cone types of the human eye (L, M, S) → three channels reproduce most colours we can perceive.
🟡 Q3. Two materials look identical under daylight but different under a streetlamp. What is this called?
Metamerism — different spectral reflectances integrate to the same perceived colour under one illuminant but a different one under another.
🟡 Q4. Why does a smaller aperture (larger f-number) give a larger depth of field but a darker image?
Smaller aperture = smaller circle of confusion → more of the scene appears sharp. But less light reaches the sensor → image darker.
🟠 Q5. Could you build a colour camera from a pure greyscale CCD?
Yes — time-multiplex three exposures with R, G, B optical filters and combine them. Works only for static scenes.
Mathematical¶
🟢 Q6. Project \((p_{x}, p_{y}, p_{z}) = (4, 6, 8)\) with \(f = 4\).
\((p'_{x}, p'_{y}) = (4\cdot 4/8, 4\cdot 6/8) = (2, 3)\).
🟡 Q7. A 50 mm lens looks at a wall 10 m away. How many millimetres does a 1 m feature occupy on the sensor?
\(f / Z = 0.05 / 10 = 0.005\); \(1 m \times 0.005 = 5 mm\) on the sensor.
🟡 Q8. If image range is [0, 4095] and you normalise to [0, 1] — but data has values [10, 4090] — what happens with \(\min = 0, \max = 4095\) vs computed bounds?
With assumed [0, 4095] range, normalised data sits in [0.0024, 0.999] — close but not exactly using the full [0, 1] range. Using actual min/max stretches it to [0, 1].
Visualisation¶
🟡 Q9. What's the difference between barrel and pincushion distortion in a sketch?
Barrel: lines bow outward (like a barrel). Pincushion: lines bow inward (like a pillow).
Coding¶
🟡 Q10. Write code to flip BGR→RGB, swap red and blue channels, save the file.
See Chapter 1 §6.1.
Deep integration¶
🔴 Q11. Connect Chapter 1 with Chapter 8: why do smaller focal lengths give better depth resolution at long range?
\(Z = b\cdot f/d\). For fixed pixel size and disparity precision, a larger
fwould give bigger absolute disparity for the sameZ, not smaller. So actually larger focal lengths are better for long-range depth — except wider FOV (smallerf) is needed for far-and-wide scenes; the point is that pixel-precision indtranslates to depth precision via \(dZ = -b\cdot f/d^{2} \cdot dd\).
Chapter 02 — Filtering, Edges, Thresholding¶
Conceptual¶
🟢 Q12. Why does a Gaussian filter not produce ringing while a box filter does?
The Fourier transform of a Gaussian is itself Gaussian (smooth roll-off). The Fourier transform of a box is a sinc with infinite oscillations → ringing.
🟢 Q13. Why does convolution mirror the kernel?
So that convolution becomes associative and commutative — you can pre-compose multiple linear filters into one and apply once.
🟡 Q14. What happens to gradients on a noisy image and how do we fix it?
Gradients amplify noise. Smooth first with Gaussian, then take gradient (Sobel = built-in combination).
🟡 Q15. Why can two different images share the same histogram?
Histograms ignore spatial information. Pixels can be shuffled with no effect on the histogram.
🟠 Q16. Why does Otsu fail on heavily vignetted images?
Vignetting creates a smooth background gradient → histogram becomes unimodal → between-class variance maximisation no longer identifies a meaningful threshold.
Mathematical¶
🟢 Q17. Convolve [1, 2, 3, 4, 5] with [1, 0, -1] using zero padding.
Output: \((0-2, 1-3, 2-4, 3-5, 4-0) = (-2, -2, -2, -2, 4)\) after kernel-mirror to
[-1, 0, 1]⇒ \(O[i] = I[i-1] - I[i+1]\). Working: \((0-2, 1-3, 2-4, 3-5, 4-0) = (-2, -2, -2, -2, 4)\).
🟡 Q18. Compute the Otsu-like threshold for histogram [5, 0, 0, 3, 7] (5 levels).
Treat as binary: positive class = levels 3+ (10 samples), negative = 0+ (5). Means \(\mu _{0} = 0\), \(\mu _{1} \approx 3.7\). Variance \(\sigma ^{2}_{B} = (5/15)(10/15)(0 - 3.7)^{2} \approx 3.05\). Optimal τ between levels 0 and 3.
🟠 Q19. Show that DoG → LoG as \(\sigma _{2} \to \sigma _{1}^{+}\).
Taylor expansion of Gaussian in σ → \(dG/d\sigma \propto \nabla ^{2}G\) ⇒ \((G(\sigma _{2}) - G(\sigma _{1}))/(\sigma _{2} - \sigma _{1}) \to \nabla ^{2}G(\sigma _{1})\). So DoG/(σ₂ − σ₁) ≈ LoG.
Visualisation¶
🟡 Q20. A power spectrum has bright dots far from the centre on a 30° diagonal — what does that imply?
The image contains strong sinusoidal patterns oriented perpendicular to that diagonal at the corresponding frequency.
Coding¶
🟡 Q21. Implement Sobel from scratch in NumPy.
See Chapter 2 §6.3.
🟠 Q22. Implement Otsu in pure NumPy with no cv2.threshold.
See Chapter 2 §15.2.
Chapter 04 — Machine Learning¶
Conceptual¶
🟢 Q23. What is an epoch?
One full pass over the entire training dataset.
🟢 Q24. Why normalise after, not before, splitting?
Computing mean/std on the whole dataset leaks test-set statistics into training. Always compute statistics on training data only.
🟡 Q25. Why doesn't "more layers" always reduce error?
Increases parameters → more risk of overfitting; also vanishing/exploding gradients hinder optimisation.
🟡 Q26. Why do CNN first-layer kernels often look like Gabor filters?
They're learned from natural-image gradients; gradient-detector filters minimise reconstruction loss → Gabor-like features.
🟠 Q27. A 99 % accurate cancer test still misclassifies many positives. Why?
If the disease is rare (low prevalence), false positives outnumber true positives even at high accuracy. Use sensitivity, specificity, and prevalence.
Mathematical¶
🟢 Q28. Compute accuracy of a 3×3 confusion matrix [[8,1,1],[0,7,3],[2,0,8]].
\((8+7+8)/30 = 23/30 \approx 0.767\).
🟢 Q29. Compute sensitivity for class 0 in the same matrix.
\(8 / (8+1+1) = 8/10 = 0.80\).
🟡 Q30. Compute specificity for class 1.
TP₁ = 7. FN₁ = 0+3 = 3. FP₁ = 1+0 = 1. TN₁ = 30 − 7 − 3 − 1 = 19. Spec = 19 / (19+1) = 0.95.
🟡 Q31. Show softmax outputs sum to 1.
\(\Sigma _{i} e^{x_{i}} / \Sigma _{j} e^{x_{j}} = (\Sigma e^{x_{i}}) / (\Sigma e^{x_{j}}) = 1\).
Coding¶
🟡 Q32. Implement softmax + cross-entropy in NumPy.
See Chapter 4 §14.
Chapter 05 — Features¶
Conceptual¶
🟢 Q33. Why are corners "good" features?
Strong gradient in two independent directions → unique → matches reliably across views.
🟢 Q34. What's the difference between detection and description in features?
Detection finds where a feature is. Description encodes what it looks like.
🟡 Q35. Why does ZMNCC fail when colour temperature changes?
ZMNCC is robust only to additive offsets and uniform scaling. Colour-temperature shifts are non-linear (channel-dependent) → not handled.
🟠 Q36. Why does SIFT clip descriptor values at 0.2 before re-normalising?
Large gradients (e.g. specular highlights) can dominate the L2-norm; clipping reduces their influence so the descriptor remains invariant to severe local lighting changes.
Mathematical¶
🟢 Q37. Project (2, 3, 4) with \(f = 1\).
(0.5, 0.75).
🟡 Q38. Compute Harris score for Ix = [[1,0,-1],[1,0,-1],[1,0,-1]], Iy = transpose.
Σ Ix² = 6, Σ Iy² = 6, Σ IxIy = 0. det = 36, trace = 12. R = 36 − 0.04·144 = 36 − 5.76 = 30.24. Strong corner.
🟠 Q39. What's the largest possible R for a 3×3 patch with grayscale ∈ {0, 1}?
Bounded by patch energy; if the entire 3×3 has alternating black/white in a checker → both Ix and Iy strong → maximum trace and det.
Coding¶
🟡 Q40. Implement the SIFT ratio test from cv2.BFMatcher.knnMatch.
See Chapter 5 §6.2.
Chapter 06 — Optical Flow¶
Conceptual¶
🟢 Q41. Why is the optical-flow equation under-determined?
One equation, two unknowns (u, v). Need extra constraints.
🟢 Q42. Why does Lucas-Kanade fail in homogeneous regions?
Structure tensor is rank-deficient → no unique solution to the normal equations.
🟡 Q43. What is the aperture problem?
In a small window, only motion perpendicular to a strong edge can be measured; motion along the edge is invisible.
🟠 Q44. Why do specular surfaces violate brightness constancy?
Specular highlights move with the light source, not the surface — pixel colour changes when the camera moves even though the surface point hasn't.
Mathematical¶
🟡 Q45. Given \(Ix = 1, Iy = 0, It = -2\) for a single pixel, what does LK say?
Equation: \(u + 0\cdot v = 2\) → \(u = 2\). v is undetermined (aperture problem).
🟠 Q46. Derive the OF equation from \(I(x,y,t) = I(x+u, y+v, t+1)\) via Taylor.
Expand right side: \(I(x,y,t) + I_{x} u + I_{y} v + I_{t} + h.o.t. = I(x,y,t)\) ⇒ \(I_{x} u + I_{y} v + I_{t} = 0\).
Coding¶
🟡 Q47. Implement backward warping with bilinear interpolation in NumPy.
See Chapter 6 §6.3.
Chapter 07 — Parametric Transformations¶
Conceptual¶
🟢 Q48. Why do we need homogeneous coordinates?
So that translation becomes a matrix multiplication; allows chaining with R, S in one matrix.
🟡 Q49. Why does a homography have 8 DoF?
9 entries; defined up to a scalar (−1 DoF) → 8.
🟡 Q50. Why can't a Catmull-Rom spline overshoot if Hermite splines can?
Catmull-Rom auto-derives tangents from neighbours, so they always point along the local data trend → no extreme tangent magnitudes.
🟠 Q51. Why does a TPS warp not preserve straight lines?
TPS minimises bending energy globally; correspondences pull the surface around them, bending lines smoothly.
Mathematical¶
🟢 Q52. Decompose \(M = [[2,0,5],[0,3,7],[0,0,1]]\).
T = translate(5,7); S = diag(2,3); R = identity.
🟡 Q53. Do the trial-exam matrix decomposition again from scratch.
See Chapter 7 §4.12.
🟡 Q54. Compute cubic Bézier at t = 0.5 with control points (0,0), (1,2), (3,3), (4,0).
\(B(0.5) = 0.125\cdot (0,0) + 0.375\cdot (1,2) + 0.375\cdot (3,3) + 0.125\cdot (4,0) = (2, 1.875)\).
Coding¶
🟡 Q55. Implement DLT homography fitting from 4 correspondences.
See Chapter 7 §6.3.
🟠 Q56. Implement TPS warping in NumPy.
See Chapter 7 §6.6.
Chapter 08 — Epipolar Geometry & Depth¶
Conceptual¶
🟢 Q57. Why is depth resolution worse for distant objects?
\(Z = b\cdot f/d\). As
Zgrows,dshrinks → 1-pixel error indproduces a much larger error inZ.
🟡 Q58. Why is the fundamental matrix rank 2?
All epipolar lines pass through the epipole; algebraically \(F \cdot e = 0\) so
Fhas a null space → rank deficient.
🟡 Q59. Why does rectification reduce stereo to a 1-D search?
After rectification, corresponding points share the same y-coordinate (epipolar line = scan line).
🟠 Q60. Why does dynamic programming on cost matrices produce streaks?
Each scan-line is processed independently → no vertical coherence enforced.
Mathematical¶
🟡 Q61. Compute Z for \(b = 0.1 m\), \(f = 700 px\), \(d = 14 px\).
\(Z = 0.1\cdot 700/14 = 5 m\).
🟡 Q62. Trial-exam Q7b — recompute p₁ and p₂ from scratch.
See
CVML_Trial_Exam_Analysis.mdQ7b.
Coding¶
🟡 Q63. Implement census transform.
See Chapter 8 §6.6.
🟠 Q64. Implement the 8-point algorithm from scratch.
See Chapter 8 §10.2.
Chapter 09 — Morphing / View Synthesis¶
Conceptual¶
🟢 Q65. Why does cross-dissolve fail for face morphs with different eye spacing?
No geometric warp → corresponding eyes don't align → ghosted blend.
🟡 Q66. Why is image-space linear morphing not physically valid?
A 3-D point's actual path under a moving virtual camera doesn't project to a straight 2-D line in either source view in general.
🟠 Q67. Why does view morphing produce physically valid morphs?
Linear interpolation in the rectified view corresponds exactly to a virtual camera moving linearly along the baseline → matches a real camera.
Mathematical¶
🟡 Q68. With \(H_{1} = H_{2} = I\), what does the trial-exam morph formula collapse to?
\(\hat{x} = x + t \cdot (x' - x)\) — plain image-space linear interpolation.
Coding¶
🟡 Q69. Implement Beier-Neely morphing for two faces with 6 line-pair correspondences.
Use
cv2.getAffineTransformper triangle for a simple version.
Chapter 10 — Camera Calibration¶
Conceptual¶
🟢 Q70. Difference between intrinsic and extrinsic parameters?
Intrinsics describe the camera (focal length, principal point, distortion); extrinsics describe its pose in the world (R, T).
🟡 Q71. Why do we use RQ factorisation rather than QR for projection-matrix decomposition?
Because we want \(K \cdot R\) where K is upper triangular and R is orthonormal — RQ produces exactly that pair.
🟠 Q72. Why is radial distortion non-linear?
Distortion magnitude depends on \(r^{2}\), which is quadratic in pixel coordinates → cannot be represented by an affine transform.
Mathematical¶
🟢 Q73. Project (2, 1, 5) with \(K = [[400,0,320],[0,400,240],[0,0,1]]\), R = I, T = 0.
\((u, v) = (2\cdot 400/5 + 320, 1\cdot 400/5 + 240) = (480, 320)\).
🟡 Q74. Compute E if \(K_{L} = K_{R} = I\), \(R = identity\), \(T = (1, 0, 0)\).
\(T_\times = [[0,0,0],[0,0,-1],[0,1,0]]\). \(E = T_\times \cdot I = T_\times\).
Coding¶
🟡 Q75. Use cv2.calibrateCamera on 10 checkerboard photos. Print K.
See Chapter 10 §6.1.
Chapter 11 — Neural Radiance Fields¶
Conceptual¶
🟢 Q76. Why does NeRF need positional encoding?
MLPs are biased toward low-frequency functions; positional encoding lifts inputs to a high-frequency basis so the MLP can express fine details.
🟡 Q77. Why does view direction enter at the penultimate layer?
Forces the bulk of the network to learn a view-independent geometric representation; only the last layer adds view-dependent (specular) effects.
🟠 Q78. Why does NeRF need posed images?
Photometric loss requires knowing where each pixel comes from in 3-D — i.e. each photo's camera pose.
🟠 Q79. Why are NeRFs slow to render?
Each pixel needs hundreds of MLP queries (samples along the ray); volume rendering is inherently a per-sample process.
Mathematical¶
🟡 Q80. Compute \(\alpha _{i}\) for \(\sigma _{i} = 5, \delta _{i} = 0.1\).
\(\alpha _{i} = 1 - \exp (-0.5) \approx 0.393\).
🟡 Q81. Show that as \(\delta \to 0\) and \(\sigma\) is a Dirac at \(t_{0}\), the rendered colour equals the colour at \(t_{0}\).
The transmittance jumps from 1 to 0 exactly at \(t_{0}\) ⇒ all weight is on \(t_{0}\) ⇒ colour = c(t₀).
Coding¶
🟡 Q82. Implement positional encoding in NumPy with \(L = 4\).
def pos_enc(p, L=4):
out = [p]
for k in range(L):
out.append(np.sin(2**k * np.pi * p))
out.append(np.cos(2**k * np.pi * p))
return np.concatenate(out, axis=-1)
Mixed-Topic / Deep Integration Questions¶
⚫ Q83. Connect Chapters 5, 8 and 10: outline a complete pipeline from photos to a 3-D mesh.
- Detect SIFT features in every image (Ch 5).
- Match across all image pairs with the ratio test.
- RANSAC fundamental matrix per pair → outliers removed.
- Compute relative pose: \(E = K_{L}^{T} F K_{R}\); SVD → R, T (Ch 10).
- Triangulate sparse 3-D points (Ch 10).
- Bundle adjustment to refine poses + 3-D points.
- Multi-view stereo (patch-based or voxel colouring) for dense reconstruction.
- Marching cubes on density volume → triangle mesh.
- Optionally: train a NeRF (Ch 11) for photo-realistic novel views.
⚫ Q84. Connect Chapters 2 and 5: why does the Harris matrix appear both in feature detection AND in optical-flow estimation?
Both formulations sum products of image gradients
Ix, Iyover a window. In feature detection it tells us how anisotropic the gradient is (corner vs edge vs flat). In Lucas-Kanade optical flow it forms the normal equations \(M\cdot [u,v]^{T} = b\). Same matrix → identical reliability test (well-conditioned ⇔ feature/flow trustworthy).
⚫ Q85. Connect Chapters 6, 8 and 9: why does view morphing solve the same problem as stereo, but with a different goal?
Stereo recovers 3-D depth from rectified images via disparity. View morphing also rectifies — but instead of recovering depth, it linearly interpolates between the rectified images to create a new virtual view. Both rely on the rectification homographies; stereo extracts geometry, morphing synthesises imagery.
⚫ Q86. Connect Chapters 4, 11: how is NeRF's positional encoding similar to and different from CNN convolution learning Gabor filters?
Both lift raw pixel/coordinate inputs to a richer feature space that CNNs/MLPs find easier to mix. CNNs learn the basis from data; positional encoding fixes it analytically (sin/cos at exponentially scaling frequencies). CNNs are translation-equivariant; positional encoding is translation-aware (different spatial positions encode differently).
⚫ Q87. Compare the assumptions and failure cases of Lucas-Kanade vs Horn-Schunck vs FlowNet.
LK assumes constant flow in a window → fails homogeneous regions. HS adds a global smoothness term → fills homogeneous areas but blurs over edges. FlowNet 2.0 learns implicit priors from data → strong on textured rigid motion but still poor on occlusions and fine texture.
Difficulty distribution¶
| Level | Count |
|---|---|
| 🟢 Basic | 25 |
| 🟡 Intermediate | 38 |
| 🟠 Hard | 18 |
| 🔴 Very hard | 1 |
| ⚫ Deep thinking | 5 |
| Total | 87 |
Practice tip: do every Basic question first. If you get all of them right, do every Intermediate. Move to Hard only after you can solve all Intermediates without help.