I'm currently trying to use skleanr.Transform.SimilarityTransform to remove scaling translation and rotation from one set of points to align it to the other.
However, if I centre the sets around the origin first, there seems to be frequently a problem (which doesn't occur if the points are all positives), the output being NaN.
array([[ nan, nan],
[ nan, nan],
[ nan, nan],
[ nan, nan],
[ nan, nan],
[ nan, nan],
[ nan, nan],
[ nan, nan],
[ nan, nan],
[ nan, nan]])
Note that if I don't centre the point there is no problem:
Out[89]:
array([[ 3.76870886, -0.35152078],
[ 1.83453334, -1.25080725],
[ 5.42428044, -4.30088121],
[ 2.51364241, -1.00154154],
[ 6.14244682, -2.71511189],
[ 5.37956586, -0.65190768],
[ 4.5752074 , -0.19039746],
[ 1.96968262, -1.99729896],
[ 1.47865106, 0.59493455],
[ 5.39473376, -0.31125435]])
Sometime it also tells me that the SVD doesn't converge.
Any idea what is going on?
Thanks,
Jean