## 问题引入

$$q_i=Rp_i+t$$

$$\frac{1}{2}\sum_{i=1}{n}\parallel q_i-Rp_i-t\parallel^2$$

1. SVD
2. 非线性优化

## Solution: SVD

\begin{aligned} &\frac{1}{2}\sum_{i=1}^{n}\parallel q_i-Rp_i-t\parallel^2\\=&\frac{1}{2}\sum_{i=1}^{n}\parallel q_i-Rp_i-t-(\mu_q-R\mu_p)+(\mu_q-R\mu_p)\parallel^2\\=&\frac{1}{2}\sum_{i=1}^{n}\parallel (q_i-\mu-q-R(p_i-\mu_p))+(\mu_q-R\mu_p-t)\parallel^2\\=&\frac{1}{2}\sum_{i=1}^{n}(\parallel q_i-\mu_q-R(p_i-\mu_p)\parallel^2+\parallel u_q-R\mu_p-t\parallel^2+\\&2(q_i-\mu_q-R(p_i-\mu_p))^T(\mu_q-R\mu_p-t)) \end{aligned}

\begin{aligned}&\sum_{i=1}^{n}(q_i-\mu_q-R(p_i-\mu_p))^T(\mu_p-R\mu_p-t)\\=&(\mu_q -R\mu_p-t)^T\sum_{i=1}^n(q_i-\mu_q-R(p_i-\mu_p))\\=&(\mu_q-R\mu_p-t)^T(n\mu_q-n\mu_q-R(n\mu_p-n\mu_p))\\=&0\end{aligned}

$$\frac{1}{2}\sum_{i=1}^{n}(\parallel q_i'-Rp_i'\parallel^2+\parallel \mu_q-R\mu_p-t\parallel^2)$$

1. $R^*=\mathop{\arg\min}\limits_{R}\frac{1}{2}\sum_{i=1}^{n}\parallel q_i'-Rp_i'\parallel^2$
2. $t^*=\mu_q-R\mu_p$

\begin{aligned}R^*&=\mathop{\arg\min}\limits_{R}\frac{1}{2}\sum_{i=1}^{n}(q_i'^Tq_i+p_i'^TR^TRp_i'-2q_i'^TRp_i')\\&=\mathop{\arg\min}\limits_{R}\frac{1}{2}\sum_{i=1}^{n}(q_i'^Tq_i+I-2q_i'^TRp_i')\\&=\mathop{\arg\min}\limits_{R}\frac{1}{2}\sum_{i=1}^{n}-q_i'^TRp_i'\end{aligned}

$$W=U\Sigma V^T$$

$$\Sigma=\left[\begin{matrix}\sigma_1&0&0\\0&\sigma_2&0\\0&0&\sigma_3\end{matrix}\right]$$

\begin{aligned}R^*&=UV^T\\t^*&=\mu_q-R\mu_p\end{aligned}

https://zhuanlan.zhihu.com/p/35893884