Umeyama 算法求解相似变换
Kabsch–Umyama 算法是一种对齐和比较两组点之间的相似性的方法。它通过最小化点对的根平方偏差(RMSD)来找到最佳的平移,旋转和缩放。Kabsch(1976,1978) 首先描述了寻找最佳旋转的算法。Umeyama(1991) 提出了类似方法,该方法除旋转外还支持平移和缩放。
求 $c$, $\mathbf{R}$, $\mathbf{t}$ 使得下式最小:
$$
\frac{1}{n} \sum_{i=1}^n \vert\vert y_i - (c\mathbf{R}x_i + \mathbf{t}) \vert\vert_2^2
$$
注: 该问题与 Fusiello(2015) 附录 A 中提到的扩展正交普氏分析 (Extended Orthogonal Procrustes Analysis) 实际上是同一概念。
相关文献
- Kabsch, W. (1976). “A solution for the best rotation to relate two sets of vectors”. Acta Crystallographica. A32 (5): 922–923. doi:10.1107/S0567739476001873.
- Kabsch, W. (1978). “A discussion of the solution for the best rotation to relate two sets of vectors”. Acta Crystallographica. A34 (5): 827–828. doi:10.1107/S0567739478001680
- Umeyama, S. (1991). “Least-squares estimation of transformation parameters between two point patterns”. IEEE Transactions on Pattern Analysis and Machine Intelligence. 13 (4): 376–380. doi:10.1109/34.88573.
- Lawrence, J. , Bernal, J. and Witzgall, C. (2019). “A Purely Algebraic Justification of the Kabsch-Umeyama Algorithm”. Journal of Research (NIST JRES), National Institute of Standards and Technology, Gaithersburg, MD. doi:10.6028/jres.124.028
- A. Fusiello, F. Crosilla and F. Malapelle, “Procrustean Point-Line Registration and the NPnP Problem,” 2015 International Conference on 3D Vision, 2015, pp. 250-255, doi:10.1109/3DV.2015.35.
其他博客
算法实现
- evo/evo/core/geometry.py#umeyama_alignment
- Eigen Documentation >> Eigen::umeyama()
- Eigen::umeyama 函数实现: Eigen\src\Geometry\Umeyama.h
- https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Geometry/Umeyama.h#L95-L164
- 调用 Eigen::umeyama(): rigid_transformation3D_srt.cpp
- 刚体变换 (不支持缩放): https://github.com/cgraumann/umeyama-matlab
代码
C++ Eigen
1 | // This file is part of Eigen, a lightweight C++ template library |
C++ OpenCV
1 | // 计算多个三维点对之间的最优相似变换矩阵 |
Python
1 |
|
Matlab
1 | % init |
Umeyama 算法求解相似变换