Computer Vision Interview 20 essential Q&A Updated 2026
Optical Flow

Optical Flow: 20 Essential Q&A

Per-pixel motion between frames—classical PDEs and modern learned estimators.

~11 min read 20 questions Advanced
brightness constancyLKHSwarping
1 What is optical flow? ⚡ easy
Answer: Per-pixel 2D motion field (u,v) mapping points in frame t to frame t+1—under brightness and smoothness assumptions.
2 Brightness constancy? 📊 medium
Answer: Assumes I(x,y,t) ≈ I(x+u,y+v,t+1)—linearize for small motion; breaks with lighting change or specularities.
3 Smoothness prior? 📊 medium
Answer: Neighboring pixels should have similar flow—regularizes ill-posed problem except at motion boundaries.
4 Lucas–Kanade? 📊 medium
Answer: Assume constant flow in patch—solve least squares on spatial gradients—sparse, good for corners, fails on uniform regions.
5 Horn–Schunck? 🔥 hard
Answer: Global energy balancing data term and smoothness—produces dense flow; iterative Gauss–Seidel / modern convex solvers.
6 Dense vs sparse? ⚡ easy
Answer: Dense: vector per pixel. Sparse: features only (LK on Harris corners)—dense needed for warping, segmentation, depth hints.
7 Gaussian pyramid? 📊 medium
Answer: Estimate flow coarse-to-fine to handle large displacement—warp and refine each level.
8 Occlusions? 🔥 hard
Answer: Pixels visible in one frame but not the next—forward-backward consistency checks and learned occlusion masks help.
9 Farneback? 📊 medium
Answer: Polynomial expansion per neighborhood then solve for displacement—dense polynomial basis alternative in OpenCV.
flow = cv2.calcOpticalFlowFarneback(prev, next, None, 0.5, 3, 15, 3, 5, 1.2, 0)
10 TV-L1? 🔥 hard
Answer: Total variation regularization with L1 data term—robust to outliers, good for preserving discontinuities.
11 Warping in deep nets? 📊 medium
Answer: Differentiable bilinear sampling to align frames by predicted flow—core building block in iterative refinement networks.
12 Deep learning flow? 📊 medium
Answer: CNNs predict flow end-to-end (FlowNet, PWC, RAFT)—supervised on synthetic datasets (FlyingChairs, Sintel) + finetune.
13 PWC-Net? 🔥 hard
Answer: Pyramid, warping, cost volume—correlate features at multiple scales efficiently.
14 RAFT? 🔥 hard
Answer: Build multi-scale 4D correlation volume + recurrent GRU updates—state-of-the-art accuracy on benchmarks.
15 Flow vs stereo? 📊 medium
Answer: Stereo: displacement along epipolar line (1D) after rectification. Flow: general 2D motion—stereo is constrained flow.
16 Large motion? 📊 medium
Answer: Pyramids, feature matching init, or patch-based methods—pure local LK insufficient without hierarchy.
17 Metrics? ⚡ easy
Answer: EPE (end-point error) on Middlebury/Sintel/KITTI—different datasets stress occlusion and realism.
18 Use in stabilization? ⚡ easy
Answer: Estimate global dominant motion from flow field or parametric model—smooth camera path.
19 Failure modes? 📊 medium
Answer: Textureless regions, repetitive patterns, fast motion, transparency—classical and learned methods both struggle.
20 Real-time? ⚡ easy
Answer: DIS, Farneback GPU, lite deep models—trade accuracy vs FPS for robotics and AR.

Optical Flow Cheat Sheet

Assumptions
  • Brightness
  • Smooth
Classic
  • LK sparse
  • HS dense
Deep
  • Warp + refine

💡 Pro tip: BC + smoothness; LK local, HS global; pyramid for big motion.

Full tutorial track

Go deeper with the matching tutorial chapter and code examples.