Home > Mobile >  How to calc matrix4 that covert a set of point from one 3D coordinate to another 3D coordinate
How to calc matrix4 that covert a set of point from one 3D coordinate to another 3D coordinate

Time:11-17

Now n points(p1~pn) are given in a cartesian 3D coordinate system: L1. Actually, L1 is a local coordinate system of a 3D model.

And n points(P1~Pn) are given in the other cartesian 3D coordinate system: L2. L2 is the Earth-centered, Earth-fixed coordinate system: ECEF.

Pi represents the converted point of pi from L1 to L2.

Now I want to find the matrix4 that convert points in L1 to L2 with the minimum error. Is this possible mathematically? Any idea or suggestion would be thankful.

CodePudding user response:

There is a well known solution indeed. Look at the Kabsch algorithm:

https://en.m.wikipedia.org/wiki/Kabsch_algorithm

There are many packages implementing it out there.

  • Related