单应矩阵
作者:互联网
单应性: 定义为从一个平面到另一个平面的投影映射
为何单应性矩阵只有8个自由度?
\[
H= \begin{bmatrix} h_{11} & h_{12} & h_{13} \\ h_{21} & h_{22} & h_{23} \\ h_{31} & h_{32} & h_{33} \end{bmatrix}
\]
\[
s\begin{bmatrix}u\\v\\1\end{bmatrix}
= \begin{bmatrix} h_{00} & h_{01} & h_{02} \\ h_{10} & h_{11} & h_{12} \\ h_{20} & h_{21} & h_{22} \end{bmatrix}\begin{bmatrix}x\\y\\1\end{bmatrix}
= \begin{equation} {h_{22}} \begin{bmatrix} \frac{h_{00}}{h_{22}} &\frac{h_{01}}{h_{22}} &\frac{h_{02}}{h_{22}} \\ \frac{h_{10}}{h_{22}} &\frac{h_{11}}{h_{22}} &\frac{h_{12}}{h_{22}} \\ \frac{h_{20}}{h_{22}} &\frac{h_{21}}{h_{22}} &1 \end{bmatrix} \end{equation}\begin{bmatrix}x\\y\\1\end{bmatrix}
\]
\[
\frac{s}{h_{22}}\begin{bmatrix}u\\v\\1\end{bmatrix}
= \begin{equation} \begin{bmatrix} \frac{h_{00}}{h_{22}} &\frac{h_{01}}{h_{22}} &\frac{h_{02}}{h_{22}} \\ \frac{h_{10}}{h_{22}} &\frac{h_{11}}{h_{22}} &\frac{h_{12}}{h_{22}} \\ \frac{h_{20}}{h_{22}} &\frac{h_{21}}{h_{22}} &1 \end{bmatrix} \end{equation}\begin{bmatrix}x\\y\\1\end{bmatrix}
\]
通过换元法可得
\[
s\begin{bmatrix}u\\v\\1\end{bmatrix}
= \begin{bmatrix} h_{00} & h_{01} & h_{02} \\ h_{10} & h_{11} & h_{12} \\ h_{20} & h_{21} & 1 \end{bmatrix}\begin{bmatrix}x\\y\\1\end{bmatrix}
\]
\[
\begin{equation} \left\{ \begin{aligned} su&=h_{00}x + h_{01}y + h_{02}\\ sv&=h_{10}x + h_{11}y + h_{12}\\ s&=h_{20}x + h_{21}y + 1 \\ \end{aligned} \right. \end{equation}
\]
化简可得
\[
\begin{equation}
\begin{bmatrix}-x & -y &-1&0&0&0&xu&yu&u \\ 0&0&0& -x & -y &-1&xv&yv&v \\ \end{bmatrix} \begin{bmatrix}h_{00}\\h_{01}\\h_{02}\\h_{h10}\\h_{11}\\h_{12}\\h_{20}\\h_{21}\\1\end{bmatrix} =0 \end{equation}
\]
令
\[
A = \begin{bmatrix}-x & -y &-1&0&0&0&xu&yu&u \\ 0&0&0& -x & -y &-1&xv&yv&v \\ \end{bmatrix} \\
h = \begin{bmatrix}h_{00}\\h_{01}\\h_{02}\\h_{h10}\\h_{11}\\h_{12}\\h_{20}\\h_{21}\\1\end{bmatrix} \\
\]
\(\bf{Ah=0}\), 8自由度, 所以需要四个点对, 具体求解见OPENCV中常用的四点求解法, 解为A的右奇异矩阵最小特征值对应的特征向量, 具体解法见 求解Ax=0
标签:begin,end,21,22,单应,矩阵,bmatrix,frac 来源: https://www.cnblogs.com/nowgood/p/homomatrix.html