1. 找最近对应点(Find Closet Point)
对 Source 点云中的一点,求解其与 Target 点云中距离最近的那个点,作为其对应点。但是,这样操作的时间复杂度很高。实际中为了加速计算,我们不需要计算 Target 点云中每个点到 Source 点云中一点的距离。可以设定一个阈值,当距离小于阈值时,就将其作为对应点。
2. 解最优变换(Find Best Transform): 迭代优化
`up = P.mean(axis=0)`
`uq = Q.mean(axis=0)`
`t = uq - np.dot(R, up)`
P_centered = P - up
Q_centered = Q - uq
U, s, V = np.linalg.svd(np.dot(Q_centered.T, P_centered), full_matrices=True, compute_uv=True)