求解Homography Matrix的DLT方法

对于两张图片
图1

图2
进行特征点匹配
图3
去除错误的匹配
图4
对于现在image1与image2匹配的点集 { x 1 i } , { x 2 i } \{x_{1_i}\},\{x_{2_i}\} {x1i},{x2i}
我们希望找到一个矩阵H,使得任意匹配的两个点 x 1 i , x 2 i , x_{1_i},x_{2_i}, x1i,x2i, H x 1 = x 2 . Hx_1=x_2. Hx1=x2. H = ( h 1 h 2 h 3 h 4 h 5 h 6 h 7 h 8 h 9 ) H=\begin{pmatrix}h_1&h_2&h_3\\h_4&h_5&h_6\\h_7&h_8&h_9\end{pmatrix} H=h1h4h7h2h5h8h3h6h9 ( h 1 h 2 h 3 h 4 h 5 h 6 h 7 h 8 h 9 ) ( x 1 y 1 1 ) = ( x 2 y 2 1 ) ⇔ \begin{pmatrix}h_1&h_2&h_3\\h_4&h_5&h_6\\h_7&h_8&h_9\end{pmatrix}\begin{pmatrix}x_1\\y_1\\1\end{pmatrix}=\begin{pmatrix}x_2\\y_2\\1\end{pmatrix}\Leftrightarrow h1h4h7h2h5h8h3h6h9x1y11=x2y21 ( 0 0 0 x 1 y 1 1 − x 1 y 2 − y 1 y 2 − y 2 x 1 y 1 1 0 0 0 − x 1 x 2 − y 1 x 2 − x 2 ) ( h 1 h 2 h 3 h 4 h 5 h 6 h 7 h 8 h 9 ) = ( 0 0 0 0 0 0 0 0 0 ) \begin{pmatrix}0&0&0&x_1&y_1&1&-x_1y_2&-y_1y_2&-y_2\\x_1&y_1&1&0&0&0&-x_1x_2&-y_1x_2&-x_2\end{pmatrix}\begin{pmatrix}h_1\\h_2\\h_3\\h_4\\h_5\\h_6\\h_7\\h_8\\h_9\end{pmatrix}=\begin{pmatrix}0\\0\\0\\0\\0\\0\\0\\0\\0\end{pmatrix} (0x10y101x10y1010x1y2x1x2y1y2y1x2y2x2)h1h2h3h4h5h6h7h8h9=000000000
对于n组匹配的点,我们找到了2n个方程,通过SVD求解,这就是DLT方法. DLT方法一般只用于少量的匹配点.
求得的H矩阵效果如下.
DLT
Normalized DLT在DLT的基础上,将匹配的点先通过平移使得横纵坐标的均值均为0,然后通过缩放使得与原点的平均距离为√2 记 变 换 矩 阵 分 别 为 T 1 , T 2 记变换矩阵分别为T_1,T_2 T1T2 x 1 i ′ = T 1 × x 1 i , x 2 i ′ = T 2 × x 2 i x_{1_i}'=T_1\times x_{1_i},x_{2_i}'=T_2\times x_{2_i} x1i=T1×x1i,x2i=T2×x2i对变换后的两个点集使用DLT,求得H’. H ′ T 1 x 1 i = T 2 x 2 i ⇔ T 2 − 1 H ′ T 1 x 1 i = x 2 i H'T_1x_{1_i}=T_2x_{2_i}\Leftrightarrow T_2^{-1}H'T_1x_{1_i}=x_{2_i} HT1x1i=T2x2iT21HT1x1i=x2i进而我们可以得到 H = T 2 − 1 H ′ T 1 H=T_2^{-1}H'T_1 H=T21HT1
其中,对于Normalized过程的变换矩阵,可以看作是平移变换与缩放变换的组合. T i = ( s i 0 0 0 s i 0 0 0 1 ) ( 1 0 − x ‾ i 0 1 − y ‾ i 0 0 1 ) = ( s i 0 − s i x ‾ i 0 s i − s i y ‾ i 0 0 1 ) T_i=\begin{pmatrix}s_i&0&0\\0&s_i&0\\0&0&1\end{pmatrix}\begin{pmatrix}1&0&-{\overline x}_i\\0&1&-{\overline y}_i\\0&0&1\end{pmatrix}=\begin{pmatrix}s_i&0&-s_i{\overline x}_i\\0&s_i&-s_i{\overline y}_i\\0&0&1\end{pmatrix} Ti=si000si0001100010xiyi1=si000si0sixisiyi1
求得的H矩阵效果如下.

更多内容可以参考Multiple View Geometry in Computer Vision Second Edition

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值