Lucas–Kanade method
In computer vision, the Lucas–Kanade method is a widely used differential method for optical flow estimation developed by Bruce D. Lucas and Takeo Kanade. It assumes that the flow is essentially constant in a local neighbourhood of the pixel under consideration, and solves the basic optical flow equations for all the pixels in that neighbourhood, by the least squares criterion. 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... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
In computer vision, the Lucas–Kanade method is a widely used differential method for optical flow estimation developed by Bruce D. Lucas and Takeo Kanade. It assumes that the flow is essentially constant in a local neighbourhood of the pixel under consideration, and solves the basic optical flow equations for all the pixels in that neighbourhood, by the least squares criterion. 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. \begin{align} I_x(q_1) V_x + I_y (q_1) V_y &= -I_t(q_1) \\ I_x(q_2) V_x + I_y (q_2) V_y &= -I_t(q_2) \\ & \; \ \vdots \\ I_x(q_n) V_x + I_y (q_n) V_y &= -I_t(q_n) \end{align} where q_1,q_2,\dots,q_n are the pixels inside the window, and I_x(q_i),I_y(q_i),I_t(q_i) are the partial derivatives of the image I with respect to position x, y and time t , evaluated at the point q_i and at the current time. These equations can be written in matrix form A v = b , where A = \begin{bmatrix} I_x(q_1) & I_y(q_1) \\[10pt] I_x(q_2) & I_y(q_2) \\[10pt] \vdots & \vdots \\[10pt] I_x(q_n) & I_y(q_n) \end{bmatrix} \quad\quad\quad v = \begin{bmatrix} V_x\\[10pt] V_y \end{bmatrix} \quad\quad\quad b = \begin{bmatrix} -I_t(q_1) \\[10pt] -I_t(q_2) \\[10pt] \vdots \\[10pt] -I_t(q_n) \end{bmatrix} 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 \times 2 system A^T A v=A^T b or \mathrm{v}=(A^T A)^{-1}A^T b where A^T is the transpose of matrix A . That is, it computes \begin{bmatrix} V_x\\[10pt] V_y \end{bmatrix} = \begin{bmatrix} \sum_i I_x(q_i)^2 & \sum_i I_x(q_i)I_y(q_i) \\[10pt] \sum_i I_y(q_i)I_x(q_i) & \sum_i I_y(q_i)^2 \end{bmatrix}^{-1} \begin{bmatrix} -\sum_i I_x(q_i)I_t(q_i) \\[10pt] -\sum_i I_y(q_i)I_t(q_i) \end{bmatrix} where the central matrix in the equation is an Inverse matrix. The sums are running from i=1 to n . The matrix A^T A is often called the structure tensor of the image at the point p . A^T W A v=A^T W b or \mathrm{v}=(A^T W A)^{-1}A^T W b where W is an n \times n diagonal matrix containing the weights W_{i i} = w_i to be assigned to the equation of pixel q_i . That is, it computes \begin{bmatrix} V_x\\[10pt] V_y \end{bmatrix} = \begin{bmatrix} \sum_i w_i I_x(q_i)^2 & \sum_i w_i I_x(q_i)I_y(q_i) \\[10pt] \sum_i w_i I_x(q_i)I_y(q_i) & \sum_i w_i I_y(q_i)^2 \end{bmatrix}^{-1} \begin{bmatrix} -\sum_i w_i I_x(q_i)I_t(q_i) \\[10pt] -\sum_i w_i I_y(q_i)I_t(q_i) \end{bmatrix} The weight w_i is usually set to a Gaussian function of the distance between q_i and p . In order for equation A^T A v=A^T b to be solvable, A^T A should be invertible, or A^T A 's eigenvalues satisfy \lambda_1 \ge \lambda_2 > 0 . To avoid noise issue, usually \lambda_2 is required to not be too small. Also, if \lambda_1/\lambda_2 is too large, this means that the point p is on an edge, and this method suffers from the aperture problem. So for this method to work properly, the condition is that \lambda_1 and \lambda_2 are large enough and have similar magnitude. This condition is also the one for corner detection. This observation shows that one can easily tell which pixel is suitable for the Lucas–Kanade method to work on by inspecting a single image. One main assumption for this method is that the motion is small (less than 1 pixel between two images for example). If the motion is large and violates this assumption, one technique is to reduce the resolution of images first and then apply the Lucas–Kanade method. In order to achieve motion tracking with this method, the flow vector can be iteratively applied and recalculated, until some threshold near zero is reached, at which point it can be assumed that the image windows are very close in similarity. By doing this to each successive tracking window, the point can be tracked throughout several images in a sequence, until it is either obscured or goes out of frame. ==References== ==External links== The image stabilizer plugin for ImageJ based on the Lucas–Kanade method Mathworks Lucas-Kanade Matlab implementation of inverse and normal affine Lucas-Kanade FolkiGPU: GPU implementation of an iterative Lucas-Kanade based optical flow KLT: An Implementation of the Kanade–Lucas–Tomasi Feature Tracker Takeo Kanade C example using the Lucas-Kanade optical flow algorithm C++ example using the Lucas-Kanade optical flow algorithm Python example using the Lucas-Kanade optical flow algorithm Python example using the Lucas-Kanade tracker for homography matching MATLAB quick example of Lucas-Kanade method to show optical flow field MATLAB quick example of Lucas-Kanade method to show velocity vector of objects
Cite this
"Lucas–Kanade method". 1755689129. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1306922941 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy