Could anyone recommend a method for the following least-squares problem:
find $R \in \mathbb{R}^{3 \times 3}$ that minimizes: $\sum\limits_{i=0}^N (Rx_i - b_i)^2 \rightarrow \min$, where $R$ is a unitary (rotation) matrix.
I could get an approximate solution by minimizing $\sum\limits_{i=0}^N (Ax_i - b_i)^2 \rightarrow \min$ (arbitrary $A \in \mathbb{R}^{3 \times 3}$), taking matrix $A$ and:
- computing SVD: $A = U \Sigma V^T$, dropping $\Sigma$ and approximating $R \approx U V^T$
- computing polar decomposition: $A = U P$, dropping scale-only symmetric (and positive definite in my case) $P$ and approximating $R \approx U$
I could also use QR decomposition, but it wouldn't be isometric (would depend on the choice of the coordinate system).
Does anyone know of a way to do this, at least approximately, but with better approximation than the two methods above?