Optical Flow Fundamentals

Imagine watching a video of a car driving down a highway. You want a computer to say something specific. For every single pixel, which direction did it move? This movement should be tracked between two consecutive frames. This per-pixel motion field is called optical flow. It is one of the oldest problems in computer vision. It is also one of the most fundamental. Self-driving cars use it to sense oncoming obstacles. Video codecs use it to compress frames by predicting motion. Slow-motion video generators use it too. They interpolate frames that never existed. The difficulty is that a camera gives us only brightness values. It does not give us motion directly. We must infer velocity from how pixel intensities change. This change happens over space and time. This inference requires an assumption about the world. A physical point on a surface keeps roughly the same brightness as it moves. It also requires a piece of calculus. This calculus converts that assumption into a single equation. The equation is elegant and linear. It relates image gradients to velocity. That equation, unfortunately, has two unknowns. These are horizontal and vertical velocity. But there is only one scalar constraint per pixel. This is the famous aperture problem. A small, local view of an edge cannot tell you the true motion. It can only tell you the component of motion perpendicular to the edge. Understanding why this equation is underdetermined matters greatly. So does knowing precisely what information is missing. This is the conceptual foundation for every real optical flow algorithm that follows. This article builds the mathematical bedrock of optical flow from first principles. It covers the brightness constancy assumption. It covers its linearization into the optical flow equation. It also gives a rigorous account of the aperture problem. It sets up, without yet solving, the estimation problem. Methods like Lucas-Kanade Optical Flow resolve this problem by pooling constraints over a neighborhood.

Key takeaways
  • Optical flow is the apparent 2D motion field of brightness patterns between consecutive frames.
  • It rests on the brightness constancy assumption: a point's intensity does not change as it moves.
  • A first-order Taylor expansion of this assumption yields the optical flow constraint equation, one linear equation per pixel in two unknowns.
  • One equation, two unknowns means the pixel-normal flow is the only fully determined quantity — this is the aperture problem.
  • Only image regions with 2D texture (corners) constrain both velocity components from local information alone.
  • Real algorithms add extra assumptions (local smoothness, global smoothness, or learned priors) to close this gap, e.g. Lucas-Kanade Optical Flow.
The core insight

Brightness constancy turns motion estimation into calculus, but the resulting equation is a single line-constraint per pixel, leaving one degree of freedom — the aperture problem — that must be resolved by extra assumptions.

The idea

Optical flow is the apparent velocity field v(x,y)=(u,v)\mathbf{v}(x,y) = (u,v) describing, for each pixel (x,y)(x,y) in an image, how far and in which direction its brightness pattern appears to have moved between time tt and time t+δtt+\delta t. It is important to distinguish optical flow from the true motion field — the projection of actual 3D scene velocities onto the image plane. The two coincide under ideal conditions (Lambertian surfaces, no lighting changes) but can diverge dramatically: a perfectly uniform, rotating sphere under fixed lighting produces zero optical flow despite having non-zero 3D motion, while a stationary striped barber pole under moving light can produce apparent flow with no physical motion at all. Optical flow is what we can actually measure from pixel intensities; the motion field is what we usually want to know. To make estimation tractable, essentially every classical flow algorithm — including feature trackers built on Feature Detection Fundamentals and Image gradients — adopts the brightness constancy assumption: the observed intensity I(x,y,t)I(x,y,t) of a physical point does not change as that point moves, only its image-plane position does. Formally, if a point at (x,y)(x,y) at time tt moves to (x+dx,y+dy)(x+dx, y+dy) at time t+dtt+dt, constancy requires

I(x,y,t)=I(x+dx, y+dy, t+dt).I(x,y,t) = I(x+dx,\, y+dy,\, t+dt).

This assumption is an idealization. It fails whenever shading changes with viewing or lighting angle (specular highlights, shadows), whenever objects are transparent or translucent, and at occlusion boundaries where surfaces appear or disappear. Nonetheless it holds well enough locally, over short time intervals and for diffuse (Lambertian) surfaces, to be the workhorse assumption of the field. Linearizing brightness constancy with a first-order Taylor expansion produces the central result of this article: the optical flow constraint equation (also called the brightness constancy constraint equation, BCCE), a single linear relationship between the spatial and temporal image gradients and the unknown velocity (u,v)(u,v). Because this one equation cannot pin down two unknowns, every pixel's local evidence constrains motion to a line in velocity space rather than a point — the aperture problem — motivating the neighborhood-pooling strategies used by later algorithms such as Lucas-Kanade Optical Flow.

How it works

Step 1 — State brightness constancy

Assume the point at (x,y)(x,y) moves by (dx,dy)(dx, dy) over a small time step dtdt, and its brightness is preserved:

I(x+dx, y+dy, t+dt)=I(x,y,t).I(x + dx,\ y + dy,\ t + dt) = I(x, y, t).

Step 2 — Taylor-expand the right-hand side

Assuming II is differentiable, expand the left side to first order around (x,y,t)(x,y,t):

I(x+dx, y+dy, t+dt)≈I(x,y,t)+∂I∂xdx+∂I∂ydy+∂I∂tdt+O(ε2).I(x + dx,\ y + dy,\ t + dt) \approx I(x,y,t) + \frac{\partial I}{\partial x} dx + \frac{\partial I}{\partial y} dy + \frac{\partial I}{\partial t} dt + O(\varepsilon^2).

Substituting into the constancy equation and cancelling I(x,y,t)I(x,y,t) from both sides leaves

∂I∂xdx+∂I∂ydy+∂I∂tdt≈0.\frac{\partial I}{\partial x} dx + \frac{\partial I}{\partial y} dy + \frac{\partial I}{\partial t} dt \approx 0.

Step 3 — Divide by dtdt to get velocities

Let u=dx/dtu = dx/dt and v=dy/dtv = dy/dt be the horizontal and vertical components of optical flow. Dividing through by dtdt:

Ixu+Iyv+It=0,I_x u + I_y v + I_t = 0,

where Ix=∂I/∂xI_x = \partial I/\partial x, Iy=∂I/∂yI_y = \partial I/\partial y, and It=∂I/∂tI_t = \partial I/\partial t are the spatial and temporal image gradients, all computable directly from the image sequence using finite differences (the same derivatives used in Image gradients for edge and corner detection). This is the optical flow constraint equation:

∇I⋅v+It=0,∇I=(Ix,Iy),  v=(u,v).\nabla I \cdot \mathbf{v} + I_t = 0, \qquad \nabla I = (I_x, I_y),\ \ \mathbf{v} = (u,v).

Step 4 — Recognize the equation is underdetermined

This is one scalar linear equation in two unknowns (u,v)(u,v). Geometrically, it defines a line in (u,v)(u,v)-velocity space:

Ixu+Iyv=−It.I_x u + I_y v = -I_t.

Any (u,v)(u,v) satisfying this line is consistent with the observed local brightness change. The only fully determined quantity is the component of flow along the gradient direction ∇I/∥∇I∥\nabla I / \|\nabla I\| — the normal flow:

un=−It∥∇I∥⋅∇I∥∇I∥,∥un∥=∣It∣∥∇I∥.u_n = -\frac{I_t}{\|\nabla I\|} \cdot \frac{\nabla I}{\|\nabla I\|}, \qquad \|u_n\| = \frac{|I_t|}{\|\nabla I\|}.

The component of true velocity parallel to the edge (tangential to the local iso-brightness contour) is invisible to this single equation — it can be anything without violating brightness constancy. This is the aperture problem: viewed through a small aperture (a local patch), a moving edge's true velocity cannot be recovered, only its perpendicular component.

Step 5 — Where does full 2D constraint come from?

A single equation cannot resolve (u,v)(u,v), but if a local neighborhood contains two or more differently-oriented gradients (i.e. a corner or textured patch, not a single straight edge), then each pixel contributes a differently-oriented line constraint in (u,v)(u,v)-space, and the intersection of these lines pins down a unique (u,v)(u,v). This is precisely the structural condition — a well-conditioned second-moment ("Harris") matrix — used by corner detectors in Feature Detection Fundamentals, and it is the reason optical flow is estimated reliably at corners and textured regions but not along smooth edges or inside flat regions. The following pseudocode summarizes the full pipeline: compute gradients, form the per-pixel constraint, and classify each pixel by how well-constrained its flow is. ```text ALGORITHM ComputeOpticalFlowConstraint(I_prev, I_curr):

# I_prev, I_curr: grayscale images at time t and t+dt, same size (H x W)

# Returns: Ix, Iy, It (gradient fields) and Constraint (per-pixel line) Ix = zeros(H, W) Iy = zeros(H, W) It = zeros(H, W) for each pixel (x, y) in I_curr:

# spatial derivatives via central differences on the current frame Ix[x,y] = ( I_curr[x+1, y] - I_curr[x-1, y] ) / 2 # edge pixels: use one-sided difference Iy[x,y] = ( I_curr[x, y+1] - I_curr[x, y-1] ) / 2

# temporal derivative between the two frames It[x,y] = I_curr[x, y] - I_prev[x, y] for each pixel (x, y): g = (Ix[x,y], Iy[x,y]) if norm(g) < EPSILON:

# flat region: no gradient, no constraint at all -- flow is fully undetermined mark (x,y) as UNCONSTRAINED else:

# the single linear constraint: Ixu + Iyv = -It Constraint[x,y] = Line(normal_direction = g, offset = -It[x,y])

# normal-flow magnitude is always recoverable: normal_speed = abs(It[x,y]) / norm(g) mark (x,y) as APERTURE_LIMITED with normal_speed and direction g return Ix, Iy, It, Constraint

ALGORITHM ClassifyAmbiguity(Ix, Iy, window_radius r):

# Determines, per pixel, whether local neighborhood constrains BOTH flow components

# (this anticipates the structure tensor used by Lucas-Kanade) for each pixel (x, y): M = [[0,0],[0,0]] # 2x2 second-moment (structure) matrix for (i, j) in window centered at (x,y) with radius r: M += [[Ix[i,j]^2, Ix[i,j]Iy[i,j]], [Ix[i,j]Iy[i,j], Iy[i,j]^2 ]] lambda1, lambda2 = eigenvalues(M) # lambda1 >= lambda2 >= 0 if lambda2 is small: # only one dominant gradient direction label(x,y) = "APERTURE PROBLEM (edge or flat region)" else: # two well-separated gradient directions label(x,y) = "WELL-CONSTRAINED (corner / texture)" return labels ``` The second routine does not yet solve for flow — that is the job of Lucas-Kanade Optical Flow — but it makes precise, using the same eigenvalue analysis as corner detection, exactly which pixels the aperture problem afflicts.

Figure
The aperture problem: a moving edge seen through a small window is consistent with infinitely many true velocities, all sharing the same normal component
Local aperture view Three different true motions — identical local brightness change. Velocity space (u, v) u v constraint line Ixu + Iyv = -It normal flow (recoverable) All points on the purple line satisfy the same local brightness-constancy equation.

Complexity & correctness

Time and space complexity. For an H×WH \times W image, computing IxI_x, IyI_y, and ItI_t via finite differences takes O(HW)O(HW) time and O(HW)O(HW) space, since each pixel requires a constant number of arithmetic operations on its neighbors, and the outputs are stored as H×WH\times W arrays. Classifying ambiguity with a window of radius rr costs O(HWr2)O(HW r^2) time in the naive implementation (an r×rr \times r sum per pixel), which reduces to O(HW)O(HW) using running-sum (integral image / box-filter) tricks that make the per-pixel window sum O(1)O(1) amortized. Nothing here yet solves for (u,v)(u,v); this article establishes the constraint, and the estimation cost is deferred to algorithms like Lucas-Kanade Optical Flow that must additionally solve a 2×22\times 2 linear system per pixel, adding only O(1)O(1) per pixel and hence O(HW)O(HW) overall.

Correctness of the linearization. The optical flow equation is only an approximation, valid in the limit of small motion. Formally, brightness constancy states I(x+dx,y+dy,t+dt)=I(x,y,t)I(x+dx, y+dy, t+dt) = I(x,y,t) exactly; the Taylor expansion introduces error terms of order O(∥(dx,dy,dt)∥2)O(\|(dx,dy,dt)\|^2), i.e., proportional to the square of the displacement and second derivatives of II. The approximation is therefore accurate when: 1. The displacement (u,v) dt(u,v)\,dt is small relative to the scale over which Ix,IyI_x, I_y change appreciably (i.e., small motion relative to image structure scale), and 2. II is smooth enough that a first-order Taylor expansion is meaningful (textureless regions with near-zero gradient are numerically ill-conditioned but not literally "wrong" — the constraint 0⋅u+0⋅v+It≈00\cdot u + 0\cdot v + I_t \approx 0 degenerates, forcing It≈0I_t\approx 0, which conveys no directional information). When displacements are large (fast motion, low frame rate), the linear approximation breaks down; this is why practical systems use coarse-to-fine pyramids, warping, or larger search ranges — refinements built on top of, not replacing, the constraint equation derived here.

Correctness of the aperture-problem claim. This is not merely empirical — it follows from linear algebra. The constraint Ixu+Iyv=−ItI_x u + I_y v = -I_t is one linear equation in two unknowns, so its solution set is a 1-dimensional affine subspace (a line) of R2\mathbb{R}^2, unless a second, linearly independent equation is supplied. Decompose the true velocity v=v∥+v⊥\mathbf v = \mathbf v_\parallel + \mathbf v_\perp into components parallel and perpendicular to the local edge (i.e. parallel and perpendicular to ∇I\nabla I). Since ∇I⋅v∥=0\nabla I \cdot \mathbf v_\parallel = 0 by construction (motion along the edge does not change local brightness to first order), the constraint equation depends only on v⊥\mathbf v_\perp:

∇I⋅v=∇I⋅v⊥=−It  ⟹  v⊥ is uniquely determined, v∥ is free.\nabla I \cdot \mathbf v = \nabla I \cdot \mathbf v_\perp = -I_t \implies \mathbf v_\perp \text{ is uniquely determined, } \mathbf v_\parallel \text{ is free.}

This is a proof, not a heuristic: any two velocities differing only by a vector parallel to the local iso-brightness contour produce identically zero change in the linearized brightness equation, hence are indistinguishable from one pixel's local evidence alone. Resolving v∥\mathbf v_\parallel strictly requires additional information — either spatial context (multiple differently-oriented gradients in a neighborhood, as in Lucas-Kanade Optical Flow), a global smoothness prior (as in Horn–Schunck-style methods), or a learned data prior (as in modern deep flow networks) — none of which is available from the single-pixel differential constraint itself.

Honest tradeoff. The brightness constancy linearization buys a clean, closed-form, per-pixel linear constraint at essentially zero computational cost, but it is fundamentally a local and first-order model: it says nothing about occlusion, large motion, non-Lambertian shading, or how to combine constraints across pixels. Every subsequent classical or deep optical flow method is, in some sense, a different strategy for patching these three gaps (aggregation, robustness, and scale) while keeping this equation as the measurement model at its core.

Worked example

Consider a tiny 5×55\times 5 synthetic image with a diagonal dark/light edge, sampled at two consecutive time steps, where the edge shifts by exactly one pixel to the right (true motion u=1,v=0u=1, v=0). Frame at tt (intensity 0 = dark, 1 = bright), edge running along the anti-diagonal: ``` row\col 0 1 2 3 4 0 0.0 0.0 0.0 1.0 1.0 1 0.0 0.0 1.0 1.0 1.0 2 0.0 1.0 1.0 1.0 1.0 3 1.0 1.0 1.0 1.0 1.0 4 1.0 1.0 1.0 1.0 1.0 ``` Frame at t+1t+1, shifted one column to the right (u=1, v=0u=1,\,v=0): ``` row\col 0 1 2 3 4 0 0.0 0.0 0.0 0.0 1.0 1 0.0 0.0 0.0 1.0 1.0 2 0.0 0.0 1.0 1.0 1.0 3 0.0 1.0 1.0 1.0 1.0 4 1.0 1.0 1.0 1.0 1.0 ``` Take pixel (x,y)=(2,2)(x,y) = (2,2) (row 2, col 2), which sits exactly on the edge in the first frame. Using central differences on the current frame (t+1t+1) and a temporal difference between frames:

QuantityComputationValue
Ix(2,2)I_x(2,2)(I(3,2)−I(1,2))/2=(1.0−0.0)/2(I(3,2) - I(1,2))/2 = (1.0 - 0.0)/20.50.5
Iy(2,2)I_y(2,2)(I(2,3)−I(2,1))/2=(1.0−0.0)/2(I(2,3) - I(2,1))/2 = (1.0 - 0.0)/20.50.5
It(2,2)I_t(2,2)It+1(2,2)−It(2,2)=1.0−1.0I_{t+1}(2,2) - I_t(2,2) = 1.0 - 1.00.00.0

Plugging into the optical flow constraint Ixu+Iyv+It=0I_x u + I_y v + I_t = 0:

0.5 u+0.5 v+0.0=0  ⟹  u=−v.0.5\,u + 0.5\,v + 0.0 = 0 \implies u = -v.

This is a line through the origin in (u,v)(u,v)-space, not a point — exactly the aperture problem in action, since (2,2)(2,2) sits on a straight diagonal edge with a single dominant gradient direction. The normal flow — the only recoverable quantity — is

∥v⊥∥=∣It∣∥∇I∥=00.52+0.52=0,\|\mathbf v_\perp\| = \frac{|I_t|}{\|\nabla I\|} = \frac{0}{\sqrt{0.5^2+0.5^2}} = 0,

which is misleading here only because ItI_t happened to be exactly zero at this pixel (the shifted edge still passes through the same intensity value at (2,2)(2,2)) — a reminder that single-pixel evidence can be degenerate. Now examine pixel (1,2)(1,2) instead:

QuantityComputationValue
Ix(1,2)I_x(1,2)(I(2,2)−I(0,2))/2=(1.0−0.0)/2(I(2,2)-I(0,2))/2 = (1.0-0.0)/20.50.5
Iy(1,2)I_y(1,2)(I(1,3)−I(1,1))/2=(1.0−0.0)/2(I(1,3)-I(1,1))/2 = (1.0-0.0)/20.50.5
It(1,2)I_t(1,2)It+1(1,2)−It(1,2)=0.0−1.0I_{t+1}(1,2) - I_t(1,2) = 0.0 - 1.0−1.0-1.0

Constraint: 0.5u+0.5v−1.0=0  ⟹  u+v=20.5u + 0.5v - 1.0 = 0 \implies u+v = 2. The normal-flow magnitude is ∣−1.0∣/0.5≈1.41|{-1.0}|/\sqrt{0.5}\approx 1.41, correctly signaling substantial motion, but the equation is satisfied equally by (u,v)=(1,1)(u,v)=(1,1), (2,0)(2,0), (0,2)(0,2), or infinitely many other pairs — even though the true motion is (1,0)(1,0). Only by pooling this constraint with neighboring pixels that have differently-oriented gradients (present near the corner of the diagonal pattern, but absent along its straight middle) can the true (1,0)(1,0) be isolated — precisely the mechanism Lucas-Kanade Optical Flow formalizes.

Common pitfalls & traps

PitfallWhy it happensFix
Treating the OF equation as fully solving for (u,v)(u,v)One equation, two unknowns — students forget it's a constraint line, not a point solutionAlways report normal flow, or explicitly pool multiple gradient directions before claiming full flow
Applying brightness constancy under lighting changeShadows, specular highlights, auto-exposure violate I(x,y,t)=I(x+dx,y+dy,t+dt)I(x,y,t)=I(x+dx,y+dy,t+dt)Use illumination-invariant preprocessing or robust/gradient-based constancy variants
Using large finite-difference steps or large true motionTaylor expansion is first-order and only locally valid; large dx,dy,dtdx,dy,dt break linearityUse small time steps, image pyramids, or iterative warping (coarse-to-fine)
Ignoring flat (textureless) regions∇I≈0\nabla I \approx 0 makes the constraint 0=It0=I_t, numerically unstable, not just underdeterminedMask out or down-weight low-gradient pixels; do not trust flow estimates there
Assuming corners always give reliable flowRepeated texture patterns (checkerboards) can still be locally ambiguous or aliasedCheck conditioning (e.g. eigenvalue ratio of the structure matrix) not just presence of two gradients
Confusing optical flow with the true 3D motion fieldThey coincide only under Lambertian, static-illumination assumptionsExplicitly state brightness-constancy assumptions when interpreting flow as "motion"

Pioneers & history

The mathematical formulation of optical flow as a differential brightness-constancy constraint was crystallized in the early 1980s, converging computer vision with ideas from psychophysics (motion perception in biological vision) and fluid dynamics (the notion of a "flow field").

Origins · 1 minBerthold K. P. Horn and how this was discovered
BK
Berthold K. P. Horn
b. 1943 · MIT, co-developer of the Horn–Schunck global optical flow method

Horn, together with Brian Schunck, published the paper that gave the field its name and its canonical differential formulation, introducing a global smoothness regularizer to resolve the aperture problem across the whole image rather than pixel by pixel.

BD
Bruce D. Lucas
20th century · Carnegie Mellon University, co-developer of the Lucas–Kanade method

Lucas, with Takeo Kanade, proposed resolving the aperture problem locally by assuming constant flow within a small window and solving a least-squares system per patch — the direct algorithmic descendant of the equation developed in this article, detailed separately as Lucas-Kanade Optical Flow.

History
1981
— Horn and Schunck publish the global-regularization optical flow formulation and coin "optical flow" in its modern technical sense.
1981
— Lucas and Kanade independently publish the local, patch-based least-squares approach to the same underdetermined equation.
1994
— Barron, Fleet, and Beauchemin publish an influential comparative performance survey of optical flow techniques, standardizing evaluation methodology.
2004
— Brox, Bruhn, Papenberg, and Weickert combine variational smoothness with robust penalty functions, substantially improving accuracy under large displacements.
2015
onward — Deep convolutional and transformer-based networks (FlowNet, PWC-Net, RAFT) learn flow end-to-end, implicitly encoding brightness-constancy-like priors and neighborhood aggregation without hand-designed equations.

Where this matters

Optical flow underlies video compression standards (motion-compensated prediction in MPEG/H.26x codecs estimates block-wise flow to encode only residual differences between frames). It is central to autonomous driving and robotics, where flow fields feed into obstacle detection, time-to-collision estimation, and visual odometry pipelines that also rely on Feature Detection Fundamentals for sparse tracking. Video frame interpolation (slow-motion generation, frame-rate up-conversion in TVs and streaming) synthesizes intermediate frames by warping along estimated flow. Action recognition models historically used stacked optical flow fields as an input modality alongside RGB frames to capture motion cues explicitly. Medical imaging uses optical-flow-style deformable registration to track tissue motion (e.g., cardiac wall motion in echocardiography). Even modern learned flow networks such as RAFT and PWC-Net, despite being trained end-to-end, are typically evaluated against — and partly interpretable through — the same brightness constancy constraint and aperture problem introduced here, making this article's content the conceptual substrate for the entire field, both classical and deep.

Ask the tutor: How exactly does Lucas-Kanade combine multiple pixels' constraint lines to solve the aperture problem in closed form?

Is optical flow the same thing as the true motion field of objects in a scene?

No. The motion field is the projection of actual 3D velocities onto the image plane, while optical flow is the apparent motion of brightness patterns that we can measure. They coincide only under idealized conditions: diffuse (Lambertian) surfaces, fixed illumination, and no transparency or specular reflection. Classic counterexamples make the distinction vivid — a uniformly colored sphere rotating under fixed lighting produces zero optical flow despite genuine 3D rotation, and a stationary barber pole under a moving spotlight produces apparent flow with zero physical motion. Optical flow algorithms, including everything built on the brightness constancy equation, estimate the measurable quantity (apparent brightness motion), and practitioners must remember this is only a proxy — sometimes an excellent one, sometimes a misleading one — for true scene motion.

Why can't we just add a second equation per pixel to fix the aperture problem?

The brightness constancy assumption fundamentally provides only one scalar equation per pixel — the rate of change of a scalar intensity function along one implicit trajectory. There is no second independent constraint hiding in a single pixel's local neighborhood in the same instant unless you look at additional pixels (spatial context) or exploit additional assumptions such as global smoothness, learned motion priors, or multiple frames with a explicit motion model. This is precisely why every practical optical flow algorithm — Lucas–Kanade, Horn–Schunck, or modern deep networks — introduces some additional principle beyond raw brightness constancy: a local window assumption, a global regularizer, or a data-driven prior, respectively.

Does the aperture problem mean optical flow is unsolvable?

No — it means single-pixel, purely local information is insufficient, but neighborhoods with sufficient texture provide enough extra constraints to solve it. If a small window contains two or more differently oriented gradients (as at corners), each pixel contributes a differently oriented line constraint in velocity space, and their intersection uniquely determines both flow components, assuming the flow is roughly constant across that window. This insight — quantified via the eigenvalues of the local structure ("second-moment") matrix, the same matrix used in corner detection — is the mathematical basis of the Lucas–Kanade method, which explicitly pools constraints over a patch to resolve the ambiguity that a single pixel cannot.

Why does the linearization break down for large or fast motion?

The optical flow constraint equation comes from a first-order Taylor expansion of brightness constancy, which drops terms of order O(∥(dx,dy,dt)∥2)O(\|(dx,dy,dt)\|^2). This approximation is only accurate when the displacement between frames is small relative to the spatial scale over which the image gradient itself changes. If an object moves many pixels between frames — due to fast motion or a low frame rate — the linear approximation can be wildly wrong, sometimes even predicting the opposite direction of true motion (an effect related to spatial aliasing, similar to the "wagon wheel effect" in film). Real systems address this with coarse-to-fine image pyramids, iterative warping, or explicit large-displacement search, all built on top of, not replacing, the core linear constraint.

How is optical flow related to feature detectors like Harris corners?

Both rely on the same local structure ("second-moment") matrix built from squared and cross image gradients over a window. A Harris corner detector flags points where this matrix has two large eigenvalues, meaning intensity varies in two independent directions — exactly the condition under which the aperture problem can be resolved locally. This is not a coincidence: Lucas–Kanade optical flow literally reuses the same matrix to solve its per-window least-squares system, and well-tracked "good features to track" are, almost by definition, the points where local optical flow estimation is best conditioned.

Can deep learning models avoid the aperture problem entirely?

Not in principle, though they can mitigate it far more effectively. Learned optical flow networks (FlowNet, PWC-Net, RAFT) still receive only two images as input, and a completely flat or edge-only local region genuinely lacks information to disambiguate flow no matter how the estimator is built. What deep models add is powerful learned priors over plausible global motion patterns (rigid objects, smooth flow fields, typical scene statistics) and much larger effective receptive fields, letting them "fill in" ambiguous regions far more accurately than hand-designed smoothness terms. The aperture problem is a statement about local information content, not about any particular algorithm's cleverness, so it remains a meaningful limit even for the best learned methods.

What role does the temporal derivative It play versus the spatial gradient?

The spatial gradient (Ix,Iy)(I_x, I_y) defines the direction in velocity space that is constrained (perpendicular to the local edge), while ItI_t sets the offset of that constraint line — effectively how much brightness changed at that pixel between frames. If It=0I_t = 0 despite a nonzero spatial gradient, the constraint line passes through the origin, meaning zero normal flow is consistent with the data (though tangential motion could still be arbitrary). If ∥∇I∥≈0\|\nabla I\| \approx 0, the equation degenerates entirely, since dividing by a near-zero gradient magnitude to get normal flow is numerically unstable, correctly reflecting that flat regions carry essentially no local motion information at all.

Before this

Where this leads