关于视觉SLAM14讲中的最小二乘法求解超定方程组

关于视觉SLAM14讲中的最小二乘法求解超定方程

1、超定方程组

粗糙的解释:方程的个数比未知数还多。
超定方程组是指方程个数大于未知量个数的方程组。对于方程组Ra=y,R为n×m矩阵,如果R列满秩,且n>m。则方程组没有精确解,此时称方程组为超定方程组。

2、最小二乘法求解

E ( x ) = ∥ A x − b ∥ 2 = ( A x − b ) T ( A x − b ) = ( x T A T − b T ) ( A x − b ) = x T A T A x − b T A x − x T A T b + b T b = x T A T A x − ( A T b ) T x − ( A T b ) T x + b T b \begin{array}{l} E(\mathbf{x})=\|\mathbf{A} \mathbf{x}-\mathbf{b}\|^{2} \\ =(\mathbf{A} \mathbf{x}-\mathbf{b})^{T}(\mathbf{A} \mathbf{x}-\mathbf{b}) \\ =\left(\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}}-\mathbf{b}^{\mathbf{T}}\right)(\mathbf{A} \mathbf{x}-\mathbf{b}) \\ =\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}} \mathbf{A} \mathbf{x}-\mathbf{b}^{\mathbf{T}} \mathbf{A} \mathbf{x}-\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}} \mathbf{b}+\mathbf{b}^{\mathbf{T}} \mathbf{b} \\ =\mathbf{x}^{\mathbf{T}} \mathbf{A}^{\mathbf{T}} \mathbf{A} \mathbf{x}-\left(\mathbf{A}^{\mathbf{T}} \mathbf{b}\right)^{\mathrm{T}} \mathbf{x}-\left(\mathbf{A}^{\mathrm{T}} \mathbf{b}\right)^{\mathrm{T}} \mathbf{x}+\mathbf{b}^{\mathrm{T}} \mathbf{b} \end{array} E(x)=Axb2=(Axb)T(Axb)=(xTATbT)(Axb)=xTATAxbTAxxTATb+bTb=xTATAx(ATb)Tx(ATb)Tx+bTb
∂ E ∂ x = 2 A T A x − 2 A T b = 0 \frac{\partial E}{\partial \mathbf{x}}=2 \mathbf{A}^{\mathbf{T}} \mathbf{A} \mathbf{x}-2 \mathbf{A}^{\mathrm{T}} \mathbf{b}=0 xE=2ATAx2ATb=0 x = ( A T A ) − 1 A T b \mathbf{x}=\left(\mathbf{A}^{T} \mathbf{A}\right)^{-1} \mathbf{A}^{T} \mathbf{b} x=(ATA)1ATb

关于矩阵求导可以看这个应该够了:
https://zhuanlan.zhihu.com/p/273729929

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值