I have two set of points $\left\{ a_j \right\}_{j=1...n},\left\{ b_j \right\}_{j=1...n}$, you can assume $a_j$ are noisy. I want to find a rotation matrix $R$ and a translation vector $T$ such that

$$ \epsilon(R,T) = \frac{1}{2n} \sum_{j=1}^{n} \lVert Ra_j + T - b_j \rVert_2^2 $$

is minimized. I'm not sure what is the simplest approach, but here is what I was thinking, which I think make sense. I set $R_0 = I$ and $T_0 = 0$ (or maybe something more sensibile, exploiting also the content of this question per each iteration I alternate between minimizing w.r.t. $T$ (which is essentially a mean to be computed) and for finding $R$ at the current iteration I use the method linked in the wiki of the linked question (namely this).

Does this approach make sense? I don't like the "alternate" bit, but I can't see any other way (I can parametrize using quaternions, but I doubt it would be any simpler).

  • $\begingroup$ Are there outliers ? $\endgroup$ – Yves Daoust Jan 22 '19 at 17:54
  • $\begingroup$ You mean values with no correspondences? $\endgroup$ – user8469759 Jan 22 '19 at 17:57
  • $\begingroup$ No, outliers are erratic points that do not belong to the true distribution. $\endgroup$ – Yves Daoust Jan 22 '19 at 17:58
  • $\begingroup$ No, no outliers. $\endgroup$ – user8469759 Jan 22 '19 at 17:58


Solving the least-squares equation shows you that the optimal translation maps one centroid to the other and you can easily find it. Then the problem reduces to finding the rotation matrix after you have centered the two point clouds.

$$ \epsilon(R) = \frac{1}{2n} \sum_{j=1}^{n} \lVert R\tilde a_j - \tilde b_j \rVert_2^2 $$

This problem is not so easy, as the matrix $R$ is constrained to be orthogonal. If you have enough points, you can "cheat" by ignoring the constraint, solving the linear system, and ajusting orthogonality by Gram-Schmidt.

The exact solution requires SVD. More here: https://scicomp.stackexchange.com/q/10584/17391

  • $\begingroup$ How do I find $R$? Shall I use at that point the method I've pointed out? $\endgroup$ – user8469759 Jan 22 '19 at 18:00
  • $\begingroup$ Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked? $\endgroup$ – user8469759 Jan 22 '19 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.