在计算机视觉中,卢卡斯-卡纳德方法是一种广泛使用的光流估计的差分方法,这个方法是由Bruce D. Lucas和Takeo Kanade发明的。它假设光流在像素点的邻域是一个常数,然后使用最小平方法对邻域中的所有像素点求解基本的光流方程。[1]
[2]
通过结合几个邻近像素点的信息,卢卡斯-卡纳德方法(简称为L-K方法)通常能够消除光流方程里的多义性。而且,与逐点计算的方法相比,L-K方法对图像噪声不敏感。不过,由于这是一种局部方法,所以在图像的均匀区域内部,L-K方法无法提供光流信息。
L-K方法假设两个相邻帧的图像内容位移很小,且位移在所研究点p的邻域内为大致为常数。所以,可以假设光流方程 在以p点为中心的窗口内对所有的像素都成立。也就是说,局部图像流(速度)向量
须满足:




其中,
是窗口中的像素,
是图像在点
和当前时间对位置x,y和时间t的偏导。
这些等式可以写成矩阵的形式
,此处
![{\displaystyle 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 v={\begin{bmatrix}V_{x}\\[10pt]V_{y}\end{bmatrix}},\quad {\mbox{and}}\quad b={\begin{bmatrix}-I_{t}(q_{1})\\[10pt]-I_{t}(q_{2})\\[10pt]\vdots \\[10pt]-I_{t}(q_{n})\end{bmatrix}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f289ba8a702ce3fa3e32457b02f6a69a28b87a79)
此方程组的等式个数多于未知数个数,所以它通常是over-determined的。L-K方法使用最小平方法获得一个近似解,即计算一个2x2的方程组:
或

其中,
是矩阵
的转置。即计算:
![{\displaystyle {\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}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7d94a7e72c2c1f8bda30c925e57d543cb4d48145)
对i=1 到 n求和。
矩阵
通常被称作图像在点p的 结构张量。
- ^ 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)