fbpx
Wikipedia

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.[1][2]

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 edit

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   under consideration. Thus the optical flow equation can be assumed to hold for all pixels within a window centered at  . Namely, the local image flow (velocity) vector   must satisfy

 

where   are the pixels inside the window, and   are the partial derivatives of the image   with respect to position   and time  , evaluated at the point   and at the current time.

These equations can be written in matrix form  , where

 

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   system

 
or
 
where   is the transpose of matrix  . That is, it computes
 
where the central matrix in the equation is an Inverse matrix. The sums are running from   to  .

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

Weighted window edit

The plain least squares solution above gives the same importance to all   pixels   in the window. In practice it is usually better to give more weight to the pixels that are closer to the central pixel  . For that, one uses the weighted version of the least squares equation,

 
or
 
where   is an   diagonal matrix containing the weights   to be assigned to the equation of pixel  . That is, it computes
 

The weight   is usually set to a Gaussian function of the distance between   and  .

Use conditions and techniques edit

In order for equation   to be solvable,   should be invertible, or  's eigenvalues satisfy  . To avoid noise issue, usually   is required to not be too small. Also, if   is too large, this means that the point   is on an edge, and this method suffers from the aperture problem. So for this method to work properly, the condition is that   and   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.[3]

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.[1] 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.

Improvements and extensions edit

The least-squares approach implicitly assumes that the errors in the image data have a Gaussian distribution with zero mean. If one expects the window to contain a certain percentage of "outliers" (grossly wrong data values, that do not follow the "ordinary" Gaussian error distribution), one may use statistical analysis to detect them, and reduce their weight accordingly.

The Lucas–Kanade method per se can be used only when the image flow vector   between the two frames is small enough for the differential equation of the optical flow to hold, which is often less than the pixel spacing. When the flow vector may exceed this limit, such as in stereo matching or warped document registration, the Lucas–Kanade method may still be used to refine some coarse estimate of the same, obtained by other means; for example, by extrapolating the flow vectors computed for previous frames, or by running the Lucas–Kanade algorithm on reduced-scale versions of the images. Indeed, the latter method is the basis of the popular Kanade–Lucas–Tomasi (KLT) feature matching algorithm.

A similar technique can be used to compute differential affine deformations of the image contents.

See also edit

References edit

  1. ^ a b B. D. Lucas and T. Kanade (1981), An iterative image registration technique with an application to stereo vision. Proceedings of Imaging Understanding Workshop, pages 121--130
  2. ^ Bruce D. Lucas (1984) Generalized Image Matching by the Method of Differences (doctoral dissertation)
  3. ^ J. Y. Bouguet, (2001) . Pyramidal implementation of the affine lucas kanade feature tracker description of the algorithm. Intel Corporation, 5.

External links edit

  • The image stabilizer plugin for ImageJ based on the Lucas–Kanade method
  • Mathworks Lucas-Kanade Matlab implementation of inverse and normal affine Lucas-Kanade
  • 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

lucas, kanade, method, computer, vision, widely, used, differential, method, optical, flow, estimation, developed, bruce, lucas, takeo, kanade, assumes, that, flow, essentially, constant, local, neighbourhood, pixel, under, consideration, solves, basic, optica. 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 1 2 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 Contents 1 Concept 2 Weighted window 3 Use conditions and techniques 4 Improvements and extensions 5 See also 6 References 7 External linksConcept editThe 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 displaystyle p nbsp under consideration Thus the optical flow equation can be assumed to hold for all pixels within a window centered at p displaystyle p nbsp Namely the local image flow velocity vector V x V y displaystyle V x V y nbsp must satisfyI 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 I x q n V x I y q n V y I t q n displaystyle begin aligned I x q 1 V x I y q 1 V y amp I t q 1 I x q 2 V x I y q 2 V y amp I t q 2 amp vdots I x q n V x I y q n V y amp I t q n end aligned nbsp where q 1 q 2 q n displaystyle q 1 q 2 dots q n nbsp are the pixels inside the window and I x q i I y q i I t q i displaystyle I x q i I y q i I t q i nbsp are the partial derivatives of the image I displaystyle I nbsp with respect to position x y displaystyle x y nbsp and time t displaystyle t nbsp evaluated at the point q i displaystyle q i nbsp and at the current time These equations can be written in matrix form A v b displaystyle Av b nbsp whereA I x q 1 I y q 1 I x q 2 I y q 2 I x q n I y q n v V x V y b I t q 1 I t q 2 I t q n displaystyle A begin bmatrix I x q 1 amp I y q 1 10pt I x q 2 amp I y q 2 10pt vdots amp vdots 10pt I x q n amp 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 nbsp 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 displaystyle 2 times 2 nbsp systemA T A v A T b displaystyle A T Av A T b nbsp or v A T A 1 A T b displaystyle mathrm v A T A 1 A T b nbsp where A T displaystyle A T nbsp is the transpose of matrix A displaystyle A nbsp That is it computes V x V y i I x q i 2 i I x q i I y q i i I y q i I x q i i I y q i 2 1 i I x q i I t q i i I y q i I t q i displaystyle begin bmatrix V x 10pt V y end bmatrix begin bmatrix sum i I x q i 2 amp sum i I x q i I y q i 10pt sum i I y q i I x q i amp 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 nbsp where the central matrix in the equation is an Inverse matrix The sums are running from i 1 displaystyle i 1 nbsp to n displaystyle n nbsp The matrix A T A displaystyle A T A nbsp is often called the structure tensor of the image at the point p displaystyle p nbsp Weighted window editThe plain least squares solution above gives the same importance to all n displaystyle n nbsp pixels q i displaystyle q i nbsp in the window In practice it is usually better to give more weight to the pixels that are closer to the central pixel p displaystyle p nbsp For that one uses the weighted version of the least squares equation A T W A v A T W b displaystyle A T WAv A T Wb nbsp or v A T W A 1 A T W b displaystyle mathrm v A T WA 1 A T Wb nbsp where W displaystyle W nbsp is an n n displaystyle n times n nbsp diagonal matrix containing the weights W i i w i displaystyle W ii w i nbsp to be assigned to the equation of pixel q i displaystyle q i nbsp That is it computes V x V y i w i I x q i 2 i w i I x q i I y q i i w i I x q i I y q i i w i I y q i 2 1 i w i I x q i I t q i i w i I y q i I t q i displaystyle begin bmatrix V x 10pt V y end bmatrix begin bmatrix sum i w i I x q i 2 amp 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 amp 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 nbsp The weight w i displaystyle w i nbsp is usually set to a Gaussian function of the distance between q i displaystyle q i nbsp and p displaystyle p nbsp Use conditions and techniques editIn order for equation A T A v A T b displaystyle A T Av A T b nbsp to be solvable A T A displaystyle A T A nbsp should be invertible or A T A displaystyle A T A nbsp s eigenvalues satisfy l 1 l 2 gt 0 displaystyle lambda 1 geq lambda 2 gt 0 nbsp To avoid noise issue usually l 2 displaystyle lambda 2 nbsp is required to not be too small Also if l 1 l 2 displaystyle lambda 1 lambda 2 nbsp is too large this means that the point p displaystyle p nbsp is on an edge and this method suffers from the aperture problem So for this method to work properly the condition is that l 1 displaystyle lambda 1 nbsp and l 2 displaystyle lambda 2 nbsp 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 3 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 1 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 Improvements and extensions editThe least squares approach implicitly assumes that the errors in the image data have a Gaussian distribution with zero mean If one expects the window to contain a certain percentage of outliers grossly wrong data values that do not follow the ordinary Gaussian error distribution one may use statistical analysis to detect them and reduce their weight accordingly The Lucas Kanade method per se can be used only when the image flow vector V x V y displaystyle V x V y nbsp between the two frames is small enough for the differential equation of the optical flow to hold which is often less than the pixel spacing When the flow vector may exceed this limit such as in stereo matching or warped document registration the Lucas Kanade method may still be used to refine some coarse estimate of the same obtained by other means for example by extrapolating the flow vectors computed for previous frames or by running the Lucas Kanade algorithm on reduced scale versions of the images Indeed the latter method is the basis of the popular Kanade Lucas Tomasi KLT feature matching algorithm A similar technique can be used to compute differential affine deformations of the image contents See also editOptical flow Horn Schunck method Shi Tomasi corner detection algorithm Kanade Lucas Tomasi feature trackerReferences edit a b B D Lucas and T Kanade 1981 An iterative image registration technique with an application to stereo vision Proceedings of Imaging Understanding Workshop pages 121 130 Bruce D Lucas 1984 Generalized Image Matching by the Method of Differences doctoral dissertation J Y Bouguet 2001 Pyramidal implementation of the affine lucas kanade feature tracker description of the algorithm Intel Corporation 5 External links editThe 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 Retrieved from https en wikipedia org w index php title Lucas Kanade method amp oldid 1198991888, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.