# 卢卡斯-卡纳德方法

## 基本原理

L-K方法假设两个相邻帧的图像内容位移很小，且位移在所研究点p的邻域内为大致为常数。所以，可以假设光流方程 在以p点为中心的窗口内对所有的像素都成立。也就是说，局部图像流（速度）向量${\displaystyle (V_{x},V_{y})}$须满足：

${\displaystyle I_{x}(q_{1})V_{x}+I_{y}(q_{1})V_{y}=-I_{t}(q_{1})}$
${\displaystyle I_{x}(q_{2})V_{x}+I_{y}(q_{2})V_{y}=-I_{t}(q_{2})}$
${\displaystyle \vdots }$
${\displaystyle I_{x}(q_{n})V_{x}+I_{y}(q_{n})V_{y}=-I_{t}(q_{n})}$

${\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}}}$

${\displaystyle A^{T}Av=A^{T}b}$
${\displaystyle \mathrm {v} =(A^{T}A)^{-1}A^{T}b}$

${\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}}}$

i=1 到 n求和。

## 参考文献

1. ^ 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 互联网档案馆存檔，存档日期2007-06-11. (doctoral dissertation)