CSE445Computer Vision

Optical Flow and Motion

The optical flow constraint equation, the aperture problem, and Lucas-Kanade, Horn-Schunck, and pyramids.

Key Terms

OFCEAperture ProblemLucas-KanadeHorn-SchunckCoarse-to-Fine PyramidIterative Warping

Python Tools

OpenCVNumPyMatplotlib

Textbook Reference

Szeliski Ch.9

Topics Covered

  1. 1Brightness constancy and the optical flow constraint equation
  2. 2The aperture problem and why flow is underdetermined locally
  3. 3Lucas-Kanade: local constancy, the normal equations, and reliability from M
  4. 4Horn-Schunck: global smoothness and the variational solution
  5. 5Coarse-to-fine pyramids and iterative warping for large motion

Learning Outcomes

  • Derive the optical flow constraint from brightness constancy
  • Contrast the Lucas-Kanade and Horn-Schunck assumptions and solutions
  • Explain how pyramids extend flow estimation to large displacements

Derivation walkthrough

From two video frames to a motion field

Seven stages, 22 steps: brightness constancy, the linearised flow constraint, the aperture problem, Lucas–Kanade least squares, dense regularisation, and the motion field it produces. Switch to step mode to advance the picture and the algebra one line at a time.

1 / 22

FRAME tFRAME t + ΔtTEMPORAL SAMPLINGtt + ΔtΔt = 1one frame intervalFRAME INTERVALΔt = 1CAR DISPLACEMENT(28, -6) pxBALL DISPLACEMENT(20, 14) pxBACKGROUND(0, 0) pxARROW LENGTH ≈ SPEED · ARROW DIRECTION ≈ IMAGE MOTION · IMAGE y AXIS POINTS DOWN

Stage 1 · Step 1 of 3

Frame t

Sample two frames Δt apart

Take the reference frame. Each pixel stores one brightness value at image position (x, y) and time t.

I(x,y,t)I(x, y, t)

Key idea

u and v are velocities in pixels per unit time. With Δt = 1 frame they read directly as a pixel displacement.

Playing. Selecting any stage or step pauses playback so you can inspect it.

Lecture PDFs

Optical Flow and Motion

The embedded PDF preview is disabled to reduce Vercel bandwidth usage. Open the lecture file directly in Google Drive for viewing, downloading, or presenting.