sequence of frames captured over time • Now our image data is a function of space (x, y) and time (t) NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 4/10
motion of brightness patterns • The motion field is the projection of the 3D motion into the image • Apparent motion can be caused by lighting changes without any actual motion • Ideally, optical flow would be the same as the motion field NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 4/10
frames, estimate the apparent motion field u(x,y) and v(x,y) between them NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 4/10
1. Brightness constancy: projection of the same point looks the same in every frame • 2. Small motion: points do not move very far • 3. Spatial coherence: points move like their neighbors NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 4/10
Equation I(x, y, t − 1) = I(x + u(x, y), y + v(x, y), t) • 2. Small motion: Linearizing the right side using Taylor expansion I(x, y, t − 1) ≈ I(x, y, t) + Ix u(x, y) + Iy v(x, y) 0 ≈ It + Ix u + Iy v. • One equation, two unknowns per pixel • The component of the flow perpendicular to the gradient (i.e., parallel to the edge) is unknown (aperture problem) ∇I.(u, v) + It = 0 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 4/10
get more equations for a pixel? • 3. Spatial coherence constraint: neighbors have the same (u, v) • E.g., if we use a 5 × 5 window, that gives us 25 equations per pixel ∇I(xi )[u, v] + It (xi ) = 0 Ix (x1 ) Iy (x1 ) . . . Ix (xn ) Iy (xn ) u v = − It (x1 ) . . . It (xn ) 1B. Lucas and T. Kanade. An iterative image registration technique with an application to stereo vision. 1981 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 6/10
squares problem (over-constrained): n×2 A 2×1 d = n×1 b • Solution given by (AT A)d = AT b Ix Ix Ix Iy Ix Iy Iy Iy u v = − Ix It Iy It 1B. Lucas and T. Kanade. An iterative image registration technique with an application to stereo vision. 1981 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 6/10
T. Kanade. An iterative image registration technique with an application to stereo vision. 1981 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 6/10
T. Kanade. An iterative image registration technique with an application to stereo vision. 1981 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 6/10
T. Kanade. An iterative image registration technique with an application to stereo vision. 1981 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 6/10
T. Kanade. An iterative image registration technique with an application to stereo vision. 1981 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 6/10
T. Kanade. An iterative image registration technique with an application to stereo vision. 1981 NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 6/10
as a global energy function which is should be minimized: min u,v (Ix u + Iy v + It )2 + λ(∥∇u∥2+∥∇v∥2) dx dy min u,v (Ix u + Iy v + It )2 + λ(u2 x + u2 y + v2 x + v2 y ) dx dy • Euler-Lagrange (Ix u + Iy v + It ) Ix + λ (∆u) = 0 (Ix u + Iy v + It ) Iy + λ (∆v) = 0 • Discrete version: exercise. NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 8/10
range of shifts, using either integer or sub-pixel steps (use of a hierarchical approach). • Gradient descent: Incremental refinement. NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 10/10
search range corresponds to a significant fraction of the larger image, as is the case in image stitching) F{I1 (x + u)} = F{I1 (x)}e−ju.ω = I1 (ω)e−ju.ω F{ECC (u) = F i I0 (xi )I1 (xi + u) = I0 (ω)I∗ 1 (ω), where I∗ 1 (ω) is the complex conjugate of I1 (ω). Fourier-based convolution is often used to accelerate the computation of image correlations. NHSM - 4th year: Computer vision - Motion (Week 6) - M. Hachama ([email protected]) 10/10