DSO windowed optimization 公式
这里有一个细节,我想了很久才想明白,DSO 中的 residual 联系了两个关键帧之间的相对位姿,但是最终需要优化帧的绝对位姿,中间的导数怎么转换?这里使用的是李群、李代数中的Adjoint。
参考 http://ethaneade.com/lie.pdf 。
需要变通一下,字母太多,表达不方便。此处 \(\xi\) 表示 se(3) 和 affLight 参数。
Adjoint 在其中的使用如下(根据代码推断,具体数学推导看我的博客《Adjoint of SE(3)》):
\[\begin{align} {\partial r_{th}^{(i)} \over \partial \xi_{h}}^T {\partial r_{th}^{(i)} \over \partial \xi_{h}} &= \left( {\partial r_{th}^{(i)} \over \partial \xi_{th}} {\partial \xi_{th} \over \partial \xi_{h}} \right)^T {\partial r_{th}^{(i)} \over \partial \xi_{th}} {\partial \xi_{th} \over \partial \xi_{h}} \notag \\ &= {\partial \xi_{th} \over \partial \xi_{h}}^T {\partial r_{th}^{(i)} \over \partial \xi_{th}}^T {\partial r_{th}^{(i)} \over \partial \xi_{th}} {\partial \xi_{th} \over \partial \xi_{h}} \notag \\
{\partial \xi_{th} \over \partial \xi_{h}} &= -\text{Ad}_{T_{th}}\notag \\
{\partial \xi_{th} \over \partial \xi_{t}} &= I \notag\end{align}\]
复习一下 Schur Complement:
\[\begin{align} \begin{bmatrix} H_{\rho\rho} & H_{\rho X} \\ H_{X\rho} & H_{XX} \end{bmatrix} \begin{bmatrix} \delta \rho \\ \delta X \end{bmatrix} &= - \begin{bmatrix} J_{\rho}^T r \\ J_X^T r \end{bmatrix} \notag \\
\begin{bmatrix} H_{\rho\rho} & H_{\rho X} \\ 0 & H_{XX} - H_{X\rho} H_{\rho\rho}^{-1} H_{\rho X} \end{bmatrix} \begin{bmatrix} \delta \rho \\ \delta X \end{bmatrix} &= - \begin{bmatrix} J_{\rho}^T r \\ J_X^T r - H_{X\rho} H_{\rho\rho}^{-1} J_{\rho}^T r \end{bmatrix} \notag \end{align}\]
EnergyFuntional::accumulateAF_MT 和 EnergyFunctional::accumulateLF_MT 的目标是计算\(H_{XX}, J_X^T r\),EnergyFunctional::accumulateSCF_MT 的目标是计算\(H_{X\rho} H_{\rho\rho}^{-1} H_{\rho X}, H_{X\rho} H_{\rho\rho}^{-1} J_{\rho}^T r\)。
\(X\)是68维的,4个相机参数加上8*8个帧状态量。就不写出来了。
这里需要注意一下,\(r\)是Nx1,\(\rho\)是Mx1,\(M \le N\),即 residual 的数目与需要优化的逆深度的数目不一定相等。\(J_{\rho}\)是NxM,\(J_X\)是Nx68。
非 Schur Complement 部分
\[H_{XX} = \begin{bmatrix} {\partial r \over \partial C}^T {\partial r \over \partial C} & {\partial r \over \partial C}^T {\partial r \over \partial \xi} \\ {\partial r \over \partial \xi}^T {\partial r \over \partial C} & {\partial r \over \partial \xi}^T {\partial r \over \partial \xi} \end{bmatrix}\]
\[\begin{align} {\partial r \over \partial C}^T {\partial r \over \partial C} &= \begin{bmatrix} {\partial r^{(1)} \over \partial C}^T & {\partial r^{(2)} \over \partial C}^T & \dots & {\partial r^{(N)} \over \partial C}^T \end{bmatrix} \begin{bmatrix} {\partial r^{(1)} \over \partial C} \\ {\partial r^{(2)} \over \partial C} \\ \dots \\ {\partial r^{(N)} \over \partial C} \end{bmatrix} \notag \\ &= \sum_{i=1}^{N} {\partial r^{(i)} \over \partial C}^T{\partial r^{(i)} \over \partial C} \notag \end{align}\]
\[\begin{align} {\partial r \over \partial C}^T {\partial r \over \partial \xi} &= \begin{bmatrix} {\partial r^{(1)} \over \partial C}^T & {\partial r^{(2)} \over \partial C}^T & \dots & {\partial r^{(N)} \over \partial C}^T \end{bmatrix} \begin{bmatrix} {\partial r^{(1)} \over \partial \xi_1} & {\partial r^{(1)} \over \partial \xi_2} & \dots & {\partial r^{(1)} \over \partial \xi_8} \\ {\partial r^{(2)} \over \partial \xi_1} & {\partial r^{(2)} \over \partial \xi_2} & \dots & {\partial r^{(2)} \over \partial \xi_8} \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(N)} \over \partial \xi_1} & {\partial r^{(N)} \over \partial \xi_2} & \dots & {\partial r^{(N)} \over \partial \xi_8} \end{bmatrix} \notag \\ &= \begin{bmatrix} \sum_{i=1}^{N} {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \xi_1} & \sum_{i=1}^{N} {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \xi_2} & \dots & \sum_{i=1}^{N} {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \xi_8} \end{bmatrix} \notag \end{align}\]
\[\begin{align} {\partial r \over \partial \xi}^T {\partial r \over \partial \xi} &= \begin{bmatrix} {\partial r^{(1)} \over \partial \xi_1}^T & {\partial r^{(2)} \over \partial \xi_1}^T & \dots & {\partial r^{(N)} \over \partial \xi_1}^T \\ {\partial r^{(1)} \over \partial \xi_2}^T & {\partial r^{(2)} \over \partial \xi_2}^T & \dots & {\partial r^{(N)} \over \partial \xi_2}^T \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(1)} \over \partial \xi_8}^T & {\partial r^{(2)} \over \partial \xi_8}^T & \dots & {\partial r^{(N)} \over \partial \xi_8}^T \end{bmatrix} \begin{bmatrix} {\partial r^{(1)} \over \partial \xi_1} & {\partial r^{(1)} \over \partial \xi_2} & \dots & {\partial r^{(1)} \over \partial \xi_8} \\ {\partial r^{(2)} \over \partial \xi_1} & {\partial r^{(2)} \over \partial \xi_2} & \dots & {\partial r^{(2)} \over \partial \xi_8} \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(N)} \over \partial \xi_1} & {\partial r^{(N)} \over \partial \xi_2} & \dots & {\partial r^{(N)} \over \partial \xi_8} \end{bmatrix} \notag \\
&= \begin{bmatrix} \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T{\partial r^{(i)} \over \partial \xi_1} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T{\partial r^{(i)} \over \partial \xi_2} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T{\partial r^{(i)} \over \partial \xi_8} \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T{\partial r^{(i)} \over \partial \xi_1} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T{\partial r^{(i)} \over \partial \xi_2} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T{\partial r^{(i)} \over \partial \xi_8} \\ \vdots & \vdots & \ddots & \vdots \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T{\partial r^{(i)} \over \partial \xi_1} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T{\partial r^{(i)} \over \partial \xi_2} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T{\partial r^{(i)} \over \partial \xi_8} \end{bmatrix} \notag \end{align}\]
\[\begin{align} J_{X}^Tr &= \begin{bmatrix} {\partial r \over \partial C}^T \\ {\partial r \over \partial \xi}^T \end{bmatrix} r \notag \\ &= \begin{bmatrix} {\partial r^{(1)} \over \partial C}^T & {\partial r^{(2)} \over \partial C}^T & \dots & {\partial r^{(N)} \over \partial C}^T \\ {\partial r^{(1)} \over \partial \xi_1}^T & {\partial r^{(2)} \over \partial \xi_1}^T & \dots & {\partial r^{(N)} \over \partial \xi_1}^T \\ {\partial r^{(1)} \over \partial \xi_2}^T & {\partial r^{(2)} \over \partial \xi_2}^T & \dots & {\partial r^{(N)} \over \partial \xi_2}^T \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(1)} \over \partial \xi_8}^T & {\partial r^{(2)} \over \partial \xi_8}^T & \dots & {\partial r^{(N)} \over \partial \xi_8}^T \end{bmatrix} \begin{bmatrix} r^{(1)} \\ r^{(2)} \\ \vdots \\ r^{(N)}\end{bmatrix} \notag \\
&= \begin{bmatrix} \sum_{i = 1}^{N} {\partial r^{(i)} \over \partial C}^T r^{(i)} \\ \sum_{i = 1}^{N} {\partial r^{(i)} \over \partial \xi_1}^T r^{(i)} \\ \sum_{i = 1}^{N} {\partial r^{(i)} \over \partial \xi_2}^T r^{(i)} \\ \vdots \\ \sum_{i = 1}^{N} {\partial r^{(i)} \over \partial \xi_8}^T r^{(i)} \end{bmatrix} \notag \end{align}\]
所以算这些矩阵就是遍历每一个 residual,累加求和。
Schur Complement 部分
\[\begin{align} \begin{bmatrix} H_{\rho\rho} & H_{\rho X} \\ H_{X\rho} & H_{XX} \end{bmatrix} \begin{bmatrix} \delta \rho \\ \delta X \end{bmatrix} &= - \begin{bmatrix} J_{\rho}^T r \\ J_X^T r \end{bmatrix} \notag \\
\begin{bmatrix} H_{\rho\rho} & H_{\rho X} \\ 0 & H_{XX} - H_{X\rho} H_{\rho\rho}^{-1} H_{\rho X} \end{bmatrix} \begin{bmatrix} \delta \rho \\ \delta X \end{bmatrix} &= - \begin{bmatrix} J_{\rho}^T r \\ J_X^T r - H_{X\rho} H_{\rho\rho}^{-1} J_{\rho}^T r \end{bmatrix} \notag \end{align}\]
Hsc:
\[H_{X\rho} H_{\rho\rho}^{-1} H_{\rho X}\]
bsc:
\[H_{X\rho} H_{\rho\rho}^{-1} J_{\rho}^T r\]
\[\begin{align} J_\rho^TJ_\rho &= {\partial r \over \partial \rho}^T {\partial r \over \partial \rho} \notag \\
&= \begin{bmatrix} {\partial r^{(1)} \over \partial \rho^{(1)}}^T & {\partial r^{(2)} \over \partial \rho^{(1)}}^T & \dots & {\partial r^{(N)} \over \partial \rho^{(1)}}^T \\ {\partial r^{(1)} \over \partial \rho^{(2)}}^T & {\partial r^{(2)} \over \partial \rho^{(2)}}^T & \dots & {\partial r^{(N)} \over \partial \rho^{(2)}}^T \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(1)} \over \partial \rho^{(M)}}^T & {\partial r^{(2)} \over \partial \rho^{(M)}}^T & \dots & {\partial r^{(N)} \over \partial \rho^{(M)}}^T \end{bmatrix} \begin{bmatrix} {\partial r^{(1)} \over \partial \rho^{(1)}} & {\partial r^{(1)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(1)} \over \partial \rho^{(M)}} \\ {\partial r^{(2)} \over \partial \rho^{(1)}} & {\partial r^{(2)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(2)} \over \partial \rho^{(M)}} \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(N)} \over \partial \rho^{(1)}} & {\partial r^{(N)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(N)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \\
&= \begin{bmatrix} \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \\ \vdots & \vdots & \ddots & \vdots \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \\
&= \begin{bmatrix} \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} & 0 & \dots & 0 \\ 0 & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \end{align}\]
\[ \begin{align} {\partial r \over \partial C}^T {\partial r \over \partial \rho} &= \begin{bmatrix} {\partial r^{(1)} \over \partial C}^T & {\partial r^{(2)} \over \partial C}^T & \dots & {\partial r^{(N)} \over \partial C}^T\end{bmatrix} \begin{bmatrix} {\partial r^{(1)} \over \partial \rho^{(1)}} & {\partial r^{(1)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(1)} \over \partial \rho^{(M)}} \\ {\partial r^{(2)} \over \partial \rho^{(1)}} & {\partial r^{(2)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(2)} \over \partial \rho^{(M)}} \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(N)} \over \partial \rho^{(1)}} & {\partial r^{(N)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(N)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \\ &= \begin{bmatrix} \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \end{align} \]
\[\begin{align} {\partial r \over \partial \xi}^T {\partial r \over \partial \rho} &= \begin{bmatrix} {\partial r^{(1)} \over \partial \xi_1}^T & {\partial r^{(2)} \over \partial \xi_1}^T & \dots & {\partial r^{(N)} \over \partial \xi_1}^T \\ {\partial r^{(1)} \over \partial \xi_2}^T & {\partial r^{(2)} \over \partial \xi_2}^T & \dots & {\partial r^{(N)} \over \partial \xi_2}^T \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(1)} \over \partial \xi_8}^T & {\partial r^{(2)} \over \partial \xi_8}^T & \dots & {\partial r^{(N)} \over \partial \xi_8}^T \end{bmatrix} \begin{bmatrix} {\partial r^{(1)} \over \partial \rho^{(1)}} & {\partial r^{(1)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(1)} \over \partial \rho^{(M)}} \\ {\partial r^{(2)} \over \partial \rho^{(1)}} & {\partial r^{(2)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(2)} \over \partial \rho^{(M)}} \\ \vdots & \vdots & \ddots & \vdots \\ {\partial r^{(N)} \over \partial \rho^{(1)}} & {\partial r^{(N)} \over \partial \rho^{(2)}} & \dots & {\partial r^{(N)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \\
&= \begin{bmatrix} \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \\ \vdots & \vdots & \ddots & \vdots \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \end{align}\]
\[\begin{align} H_{X\rho} H_{\rho\rho}^{-1} H_{\rho X} &= J_X^T J_\rho (J_\rho^TJ_\rho)^{-1} J_\rho^T J_X \notag \\
&= \begin{bmatrix} {\partial r \over \partial C}^T \\ {\partial r \over \partial \xi}^T \end{bmatrix} {\partial r \over \partial \rho} \left( {\partial r \over \partial \rho}^T {\partial r \over \partial \rho} \right)^{-1} {\partial r \over \partial \rho}^T \begin{bmatrix} {\partial r \over \partial C} & {\partial r \over \partial \xi} \end{bmatrix} \notag \\
&= \begin{bmatrix} {\partial r \over \partial C}^T {\partial r \over \partial \rho} \\ {\partial r \over \partial \xi}^T {\partial r \over \partial \rho} \end{bmatrix} \begin{bmatrix} \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & 0 & \dots & 0 \\ 0 & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \end{bmatrix} \notag \\ & \begin{bmatrix} {\partial r \over \partial \rho}^T {\partial r \over \partial C} & {\partial r \over \partial \rho}^T {\partial r \over \partial \xi} \end{bmatrix} \notag \\
&= \begin{bmatrix} \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \\ \vdots & \vdots & \ddots & \vdots \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(1)}} & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(2)}} & \dots & \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \end{bmatrix} \notag \\
&\begin{bmatrix} \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & 0 & \dots & 0 \\ 0 & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \end{bmatrix} \notag \\
&\begin{bmatrix} \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)^T \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right)^T \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(3)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(3)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(3)}} \right)^T \\
\vdots & \vdots & \ddots & \vdots \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right)^T \end{bmatrix} \notag \\
&= \begin{bmatrix} \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)\left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \\ \vdots & \vdots & \ddots & \vdots \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \end{bmatrix} \notag \\
&\begin{bmatrix} \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)^T \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right)^T \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(3)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(3)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(3)}} \right)^T \\
\vdots & \vdots & \ddots & \vdots \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right)^T & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right)^T & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right)^T \end{bmatrix}\notag \end{align}\]
同理
\[\begin{align} H_{X\rho} H_{\rho\rho}^{-1} J_\rho^T r \notag & = \notag \begin{bmatrix} \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right)\left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial C}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_1}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_2}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \\ \vdots & \vdots & \ddots & \vdots \\ \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(1)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T{\partial r^{(i)} \over \partial \rho^{(1)}} \right)^{-1} & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(2)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T{\partial r^{(i)} \over \partial \rho^{(2)}} \right)^{-1} & \dots & \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \xi_8}^T {\partial r^{(i)} \over \partial \rho^{(M)}} \right) \left( \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T{\partial r^{(i)} \over \partial \rho^{(M)}} \right)^{-1} \end{bmatrix} \notag \\
& \begin{bmatrix} \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(1)}}^T r^{(i)} \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(2)}}^T r^{(i)} \\
\vdots \\ \sum_{i=1}^N {\partial r^{(i)} \over \partial \rho^{(M)}}^T r^{(i)} \end{bmatrix} \end{align}\]
DSO windowed optimization 公式的更多相关文章
- DSO windowed optimization 代码 (4)
5 "step"计算 参考<DSO windowed optimization 公式>,计算各个优化变量的增加量. 公式再写一下: \[\begin{align} \b ...
- DSO windowed optimization 代码 (3)
4 Schur Complement 部分信息计算 参考<DSO windowed optimization 公式>,Schur Complement 部分指 Hsc(\(H_{X\rho ...
- DSO windowed optimization 代码 (2)
3 非 Schur Complement 部分信息计算 参考<DSO windowed optimization 公式>,非Schur Complement 部分指 \(H_{XX}\) ...
- DSO windowed optimization 代码 (1)
这里不想解释怎么 marginalize,什么是 First-Estimates Jacobian (FEJ).这里只看看代码,看看Hessian矩阵是怎么构造出来的. 1 优化流程 整个优化过程,也 ...
- Adjoint of SE(3)
以前看的书都提到 SE(3) 和 se(3) 的 Adjoint,但是并没有讲这个东西是干什么用的,只是给了一堆性质.这东西来自群论. 参考 Lie Groups for 2D and 3D Tran ...
- Paper Reading: Stereo DSO
开篇第一篇就写一个paper reading吧,用markdown+vim写东西切换中英文挺麻烦的,有些就偷懒都用英文写了. Stereo DSO: Large-Scale Direct Sparse ...
- Omnidirectional DSO: Direct Sparse Odometry with Fisheye Cameras 论文摘要
1. Abstract 通过一种Unified Omnidirectional Model作为投影方程. 这种方式可以使用图像的所有内容包括有强畸变的区域,而现存的视觉里程计方案只能修正或者切掉来使用 ...
- [CS231n-CNN] Linear classification II, Higher-level representations, image features, Optimization, stochastic gradient descent
课程主页:http://cs231n.stanford.edu/ loss function: -Multiclass SVM loss: 表示实际应该属于的类别的score.因此,可以发现,如果实际 ...
- 在线最优化求解(Online Optimization)之五:FTRL
在线最优化求解(Online Optimization)之五:FTRL 在上一篇博文中中我们从原理上定性比较了L1-FOBOS和L1-RDA在稀疏性上的表现.有实验证明,L1-FOBOS这一类基于梯度 ...
随机推荐
- BZOJ2553[BeiJing2011]禁忌——AC自动机+概率DP+矩阵乘法
题目描述 Magic Land上的人们总是提起那个传说:他们的祖先John在那个东方岛屿帮助Koishi与其姐姐Satori最终战平.而后,Koishi恢复了读心的能力…… 如今,在John已经成为传 ...
- log4net 单独项目
首先参考:http://blog.csdn.net/feiying008/article/details/45440547 有时,我们需要将日志功能作为单独模块,用来以后嫁接到其他项目. 今天就来看看 ...
- hdu1176 (免费馅饼)
免费馅饼 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...
- UVa - 10341
Solve the equation:p ∗ e ^−x + q ∗ sin(x) + r ∗ cos(x) + s ∗ tan(x) + t ∗ x ^2 + u = 02 + u = 0where ...
- 【BZOJ3668】【NOI2014】起床困难综合症(贪心)
[NOI2014]起床困难综合症(贪心) 题面 Description 21 世纪,许多人得了一种奇怪的病:起床困难综合症,其临床表现为:起床难,起床后精神不佳.作为一名青春阳光好少年,atm 一直坚 ...
- luoguU38228 签到题 (BSGS)
签到一脸 $a_n=10a_{n-1}+1$求出通项$a_n=\frac{10^n-1}{9}$,然后可以化成$10^n=9K+1 (mod m)$,求一个最小的n 然后我们知道这个n一定是<= ...
- CF1114F Please, another Queries on Array?(线段树,数论,欧拉函数,状态压缩)
这题我在考场上也是想出了正解的……但是没调出来. 题目链接:CF原网 题目大意:给一个长度为 $n$ 的序列 $a$,$q$ 个操作:区间乘 $x$,求区间乘积的欧拉函数模 $10^9+7$ 的值. ...
- Elasticsearch 常见问题的解决思路
本文为es性能监控基础的扩展,大家可以先看下性能监控基础,熟悉下es的基本原理.为翻译性质文档,感谢原作者,原始文档地址 类似于汽车的运行方式,Elasticsearch旨在让用户快速上手和运行,而无 ...
- Git中设置代理和取消代理
设置Socks5代理 git config --global http.proxy 'socks5://127.0.0.1:1080' && git config --global h ...
- C++ 中的导致编译错误汇总
多少年来,各路英雄好汉,八方神犇大佬,在CE中饮恨退役. OI的CE,还是那样熟悉的味道. (博主只能想到这么多,欢迎大家来补充) 1.变量名和内置函数冲突?!?! C++内置函数很多很多,许多你不知 ...