Page 1 of 1

Translate local coordinates of transformation matrix to global coordinates

Posted: Tue Feb 22, 2022 4:33 pm
by ohnoinkimono
Dear all,

I am registering two point clouds from 2018 and 2019 using ICP. When loading the dataset I accept the entity being translated to a local coordinate system in order to work with smaller coordinates (like explained here https://www.cloudcompare.org/doc/wiki/i ... _and_Scale)

I then

A) use "Apply Transformation" on the 2018 cloud to correct a known xy offset (in UTM):

1.000000000000 0.000000000000 0.000000000000 -0.769159376621
0.000000000000 1.000000000000 0.000000000000 0.895914077759
0.000000000000 0.000000000000 1.000000000000 0.000000000000
0.000000000000 0.000000000000 0.000000000000 1.000000000000

B) register the clouds (2018 compared, 2019 reference) using ICP (rotation in xyz, translation in xyz) to further enhance the quality of the alignment and deal with the offset in z direction. The resulting transformation matrix is as follows:

0.999918162823 0.001638919814 0.012756800279 -5.675217151642
-0.001892545260 0.999801933765 0.019895041361 -8.521860122681
-0.012721646577 -0.019917536527 0.999720633030 14.672024726868
0.000000000000 0.000000000000 0.000000000000 1.000000000000

While I was able to apply the xy shift (under A) ) in - what seems to be the UTM unit [m] - I am somewhat lost with the values in the transformation matrix as calculated by the ICP. I guess, I am dealing with local coordinates now? The shift I can see (and measure using point picking tool > distance between two points) is a 10-20 cm, not several meters. So, how can I now translate the transformation matrix back to retrieve the global coordinates?

I highly appreciate your suggestions.
Best wishes and thank you!

Re: Translate local coordinates of transformation matrix to global coordinates

Posted: Thu Feb 24, 2022 4:17 pm
by daniel
So the Global Shift doesn't change the units.

Everything you do in CloudCompare is applied (in 'real time') in the local coordinate system. But then it will be impacted on the global coordinates when the cloud will be exported.

So when you apply the first transformation, since it's a simple translation, its effect is exactly the same in the local and global coordinate systems.

And then, ICP will apply a transformation in the local coordinate system. Here, the fact that it's a combination between a rotation and a translation makes it more complicated to interpret the translation - as the translation is applied after the rotation. And the rotation is applied to the origin of your local coordinate system.

Last, to retrieve your global coordinates, you just need to export the points again.