Extending Arun's Method for Least Square Point Set Fitting with Isotropic Scaling
June 30, 2016
I recently wanted to extend my implementation of the ICP algorithm to include isotropic scaling. Internally, ICP alternates between finding the closest points in the target shape to those in the source shape – thus giving two corresponding point sets – and finding the optimal rigid transformation to align those point sets. As the alignment of the shapes improve, so do the estimates of the closest points, and so on, hence, the Iterative Closest Point algorithm.
In the original paper Besl and McKay1 use a quaternion based method for finding the optimal rigid transformation, but the algorithm can be implemented just as well using a rotation-matrix method such as Arun’s method.2
Without Scaling¶
The method of Arun et al. is as follows:
Given , and as two sets of -dimensional points, we want to find rotation matrix and translation vector such that is minimised.
The solution for translation is simple: the optimal translation will be that which matches the centroid of the rotated source shape to that of the target. That is where refers to the centroid of , and is the optimal rotation. See the next section for a proof of this.
The rotation is more complex, but they show that given the singular value decomposition then where
Adding Scaling¶
A solution including isotropic scaling was published by Umeyama in 1991.3 However, I also gave a shot at my own derivation, and I will show that our results are the same.
Adding in a scale factor, the objective function becomes
The solution for can be found by setting the partial derivative to zero hence
This is exactly the result mentioned above for , with the addition of the scale factor .
We can solve for by taking a partial derivative, this time with respect to
It is a straightforward expnsion of the above to arrive at
and expanding with the previous solution and rearranging yields
Now note that and expand on the left hand side to :
That last term is 0 and so
That is both of which are pretty nice.
Note: In my implementation I found that though the second form is more satisfying to me mathematically, the 1st form seemed to work better for computations. I don’t have an explanation for this.
Comparing with Umeyama’s Solution¶
Using the notation I have been using in this post, Umeyama showed that
Already, we see our denominators match, so we want to show
Somehow we have to get the trace in there, so we’ll need two facts about trace:
- The trace of the product of two matrices is related by .
- For vectors and , the inner product and outer product are related by
Based on the 2nd fact, and recalling that we can write the numerator of our equation as
We can now immediately substitute in and giving
immediately the , and cancel leaving . Transposing and (from the 1st fact) gives as required.
-
Besl, Paul J., and Neil D. McKay. “Method for registration of 3-D shapes.” In Robotics-DL tentative, pp. 586-606. International Society for Optics and Photonics, 1992. ↩
-
Arun, K. S.; Huang, T. S. & Blostein, S. D. Least-squares fitting of two 3-D point sets IEEE Transactions on pattern analysis and machine intelligence, IEEE, 1987, 698-700 ↩
-
Umeyama, S. Least-squares estimation of transformation parameters between two point patterns IEEE Transactions on pattern analysis and machine intelligence, IEEE, 1991, 13, 376-380 ↩