In this post, I will describe some tips on SVD from a programmer point of view.

SVD is actually one of the most important and frequently invlolved technique in graphics and animation, as it is the way to compute the transformation between correspondences. To name just a few, we were curious as being reading papers regarding motion capture facial animation, as-rigid-as-possible surface modeling, registration in capturing, etc. Hope this post give a useful guide regarding the implementation behind.

Given a set of points, in their initial configuration and current configuration , the goal is to find the transformation such that the least suqares error is minimized:

We need a local reference frame for the point cloud, nomally by defining the centroid. Let it be denoted by , so for the one at time . To this end, how to minimize the error? We change the least squares function

A variety of centroid definition simplifies the minimization as to minimize and . So means, first, to compute , and then . Minimizing the first term is to construct the convariance matrix

and then perform SVD on this matrix

and .

Takel care of the relection where . This issue is addressed by changing the sign of the column of corresponding to the smallest singular value (the third column), such that .

To this end,

Final, in this post, only described the solution to Absolute Orientation problem, but in practice, it is generalized to Weighted Absolute Orientation. But the core idear is the same, but different in the definition of centroid, in turn the convariance matrix.