Lably
Skip to content

Lucas–Kanade method

Computer vision technique for optical flow estimation

  • 4 min read
  • 4 chapters

Related on Lably

Through Computer vision, Pixel and Least squares

By combining information from several nearby pixels, the Lucas–Kanade method can often resolve the inherent ambiguity of the optical flow equation. It is also less sensitive to image noise than point-wise methods. On the other hand, since it is a purely local method, it cannot provide flow information in the interior of uniform regions of the image.

Concept

The Lucas–Kanade method assumes that the displacement of the image contents between two nearby instants (frames) is small and approximately constant within a neighborhood of the point p under consideration. Thus the optical flow equation can be assumed to hold for all pixels within a window centered at p. Namely, the local image flow (velocity) vector (Vx,Vy) must satisfy

Ix(q1)Vx+Iy(q1)Vy=−It(q1)Ix(q2)Vx+Iy(q2)Vy=−It(q2)⋮Ix(qn)Vx+Iy(qn)Vy=−It(qn)

where q1,q2,…,qn are the pixels inside the window, and Ix(qi),Iy(qi),It(qi) are the partial derivatives of the image I with respect to position x,y and time t, evaluated at the point qi and at the current time.

These equations can be written in matrix form Av=b, where A=[Ix(q1)Iy(q1)Ix(q2)Iy(q2)⋮⋮Ix(qn)Iy(qn)]v=[VxVy]b=[−It(q1)−It(q2)⋮−It(qn)]

This system has more equations than unknowns and thus it is usually over-determined. The Lucas–Kanade method obtains a compromise solution by the least squares principle. Namely, it solves the 2×2 system ATAv=ATb or v=(ATA)−1ATb where AT is the transpose of matrix A. That is, it computes [VxVy]=[∑iIx(qi)2∑iIx(qi)Iy(qi)∑iIy(qi)Ix(qi)∑iIy(qi)2]−1[−∑iIx(qi)It(qi)−∑iIy(qi)It(qi)] where the central matrix in the equation is an Inverse matrix. The sums are running from i=1 to n.

The matrix ATA is often called the structure tensor of the image at the point p.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Robotics