I am looking for ways to compute the least-squares fit for a sphere given any set of points. The points will have noise on them, and they might be lob-sided to one part of the sphere. Of course, the quality of the fit depends on how much noise and how lob-sided the points are, etc.
At the moment, I have something that works using a global optimization method (BTRK, to be precise) that is minimizing the points' distances from the sphere's circle iteratively. This works pretty well, but is slow.
So, I am looking into faster ways to get the job done. I came across one method based on what looks like a standard SVD-based method:
So, the idea is to build up a matrix M, decompose with SVD, then pick the row of M with the smallest non-zero singular value. Correct me if I am wrong so far.
Most of my confusion is on what exactly M is. How do I build M? He loses me on the third-last paragraph on page 634. He states that
grad(J) = 2( M M^T) a
First of all, I don't follow how he got that. In this case, he states that M is the set of points. That somewhat makes sense for the example of fitting a plane to the set of points, but I don't see how he derived that.
Further down, he states what the objective function is for a sphere, but I can't see how to build M for this case.