Derivation of Kanade-Lucas-Tomasi Tracking Equation Stan Birchfield January 20, A. D. 1997 Carlo Tomasi [1] has recently proposed the following symmetric definition for the dissimilarity between two windows, one in image I and one in image J: Z Z d d ǫ= [J(x + ) − I(x − )]2 w(x) dx, (1) 2 2 W where x = [x, y]T , the displacement d = [dx , dy ]T , and the weighting function w(x) is usually set to the constant 1. Equation (1) is identical to the equation given in [2] except that the current version has been made symmetric with respect to both images by replacing [J(x) − I(x − d)] with [J(x + d2 ) − I(x − d2 )]. Now the Taylor series expansion of J about a point a = [ax , ay ]T , truncated to the linear term, is: J(ξ) ≈ J(a) + (ξx − ax ) ∂J ∂J (a) + (ξy − ay ) (a), ∂x ∂y where ξ = [ξx , ξy ]T . Following the derivation in [3], we let x + d 2 = ξ and x = a to get: J(x + d dx ∂J dy ∂J ) ≈ J(x) + (x) + (x). 2 2 ∂x 2 ∂y I(x − d dx ∂I dy ∂I ) ≈ I(x) − (x) − (x). 2 2 ∂x 2 ∂y Similarly, Therefore, Z Z d d ∂J(x + d2 ) ∂I(x − d2 ) ∂ǫ [J(x + ) − I(x − )][ = 2 − ]w(x) dx, ∂d 2 2 ∂d ∂d Z Z W ≈ [J(x) − I(x) + gT d]g(x)w(x) dx, W where g= ∂ ∂x I+J 2 ∂ ∂y I+J 2 T . To find the displacement d, we set the derivative to zero: Z Z ∂ǫ = [J(x) − I(x) + gT (x)d]g(x)w(x) dx = 0. ∂d W 1 Rearranging terms, we get Z Z [J(x) − I(x)]g(x)w(x) dx W Z Z gT (x)dg(x)w(x) dx, Z Z T = − g(x)g (x)w(x) dx d. = − W W In other words, we must solve the equation Zd = e, (2) where Z is the following 2 × 2 matrix: Z Z g(x)gT (x)w(x) dx Z= W and e is the following 2 × 1 vector: Z Z e= [I(x) − J(x)]g(x)w(x) dx. W References [1] C. Tomasi. Personal correspondence, May 1996. [2] C. Tomasi and T. Kanade. Detection and Tracking of Point Features. Carnegie Mellon University Technical Report CMU-CS-91-132, April 1991. [3] J. Shi and C. Tomasi. Good features to track. In CVPR, pages 593-600, 1994. 2