axelpale/nudged

improve stability with numerically large coordinates

Opened this issue · 0 comments

Estimators with scaling and rotation involve squaring various sums of coordinates. If the coordinates are large numbers, then the limits of the double precision floating point numbers are quickly reached. Can we do better?

Scaling and rotation should be independent of the coordinate space origin. Therefore we should be able to offset the given coordinates close to the origin before estimation and then offset the result back to original coordinate space. This can make the estimation with large coordinates much more robust.

Note that the translation component of the resulting transformation is affected by both scaling and rotation. Therefore simple addition of negated offset is not enough. A proper mathematical treatment is necessary to solve this right. My hunch is that the offset needs to be scaled and offset with the estimated transformation before adding it back.