Linear Least Squares Fit of Sphere to Points

后端 未结 5 509
無奈伤痛
無奈伤痛 2020-12-31 16:10

I\'m looking for an algorithm to find the best fit between a cloud of points and a sphere.

That is, I want to minimise

where C is the centre

5条回答
  •  抹茶落季
    2020-12-31 16:55

    Difficult to do this without iteration.

    I would proceed as follows:

    1. find the overall midpoint, by averaging (X,Y,Z) coords for all points

    2. with that result, find the average distance Ravg to the midpoint, decide ok or proceed..

    3. remove points from your set with a distance too far from Ravg found in step 2

    4. go back to step 1 (average points again, yielding a better midpoint)

    Of course, this will require some conditions for (2) and (4) that depends on the quality of your points cloud !

提交回复
热议问题