Page 1 of 2

export of aligned point cloud to mesh with geo coordinates

Posted: Tue Apr 25, 2023 2:00 pm
by tsch_kl
Hello,
I do have a mesh with geo coordinates (x = 2.585.875,617, y= 5.705.987,132, z= 108,457).
I have a various point clouds that are registered incorrectly. Now I want to fix this error with CloudCompare.

Using the Algine function (https://www.cloudcompare.org/doc/wiki/i ... itle=Align), I looked for more than three points in the incorrectly registered point cloud as well as in the correctly registered mesh, thus fitting the point cloud to the mesh. In the properties of the point cloud, it does now show a displaced Box Center as well as a Global Box center.

I now want to export the point cloud using these new coordinates for other purposes. By trying the Global Shift and Scale function (https://www.cloudcompare.org/doc/wiki/i ... _and_Scale) I unfortunately did not get a correct result.

How can I export the point cloud so that it has correct coordinates?

Please do not delete my question again.

Thanks a lot
Thomas

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Tue Apr 25, 2023 7:21 pm
by daniel
Is it related to your previous message? Then in this case it was just awaiting for approval (we have a lot of spam on this forums sadly, so new users must wait for validation).

Which version are you using? Normally if you use the 'Align' or the 'ICP' tools, the Global Shift of the reference entity should be transferred to the aligned cloud.

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Fri Apr 28, 2023 5:15 pm
by tsch_kl
Hi Daniel,
Is it related to your previous message? Then in this case it was just awaiting for approval (we have a lot of spam on this forums sadly, so new users must wait for validation).
Yes, I will continue here. Sorry for the inconvenience.
Which version are you using? Normally if you use the 'Align' or the 'ICP' tools, the Global Shift of the reference entity should be transferred to the aligned cloud.
I am using Cloud Compare v2.13 alpha 64-bit.
They haven't changed at all? Not even a little bit? What was the transformation you applied?
(and you would only use 'Edit > Edit Global Shift' if you wanted to remove the Global Shift completely - i.e. output the cloud in its local coordinate system)
I do have a transformation, but if I do reimport it, it will make a difference. I do have two scenaries, which I will be explaining now.

First Case:
Point Cloud "Global Shift/Scale" while importing with "Point in original coordinate system (on disk) x=-11.015, y=12.208, z=12.628 which suggests a transformation of 100 in the x-direction will result in "Point in local coordinate system" x=88.9858, y=12.208, z=12.628. I do then apply Aligh Tools while picking three points on a mesh. This leads to a transformation matrix of

0.921720 0.022978 -0.040241 791.170349
-0.023561 0.922493 -0.012919 983.736084
0.039903 0.013930 0.921916 83.210899
0.000000 0.000000 0.000000 1.000000

See the first Screenshot for the result of reimport into Cloud Compare.

Second Case:
Point Cloud "Global Shift/Scale" while importing with "Point in original coordinate system (on disk) x=2585844.635, y=5705976.530, z=92.5820 which suggests a transformation of -2585800.00 in the x-direction and -5705900.00 in the y-direction will result in "Point in local coordinate system" x=44.635, y=76.53, x=92.582. I do then apply Aligh Tools while picking three points on a mesh. This leads to a transformation matrix of

3.657363 1.644496 -0.182341 463.963867
0.725578 -1.991666 -3.408918 1481.146362
-1.486994 3.072917 -2.111859 150.970352
0.000000 0.000000 0.000000 1.000000

Same problem while reimporting.

If you want, I can share the to be transformed point cloud with you and my CloudCompare project. I think the problem is my skills and not the software, but I do not find my mistake.

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Tue May 02, 2023 9:03 am
by tsch_kl
Just to clear up, I want to export the aligned point cloud with geocoordinates i.e. x=2585844.635, y=5705976.530, z=92.5820.

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Tue May 02, 2023 9:31 pm
by daniel
I'll have to take a look at that in details, but it might take some time, sorry...

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Sat May 06, 2023 9:47 am
by daniel
So I finally had the time to look at this.

Only the coordinates/values of the 'Global box center' should matter. These are the values that will be exported. Most of the file formats support large coordinates (apart from STL files I believe). For the other, we always export 'Global coordinates'. The local coordinate system is only temporary and within CloudCompare.

If you export to LAS files, you can set the 'LAS shift', which is similar to CC's Global Shift in its principle. But whatever values you choose, the exported coordinates will be the same. However, when you re-import the cloud, you are not forced to use the suggested shift. You have to set the shift carefully when using different clouds so that the local coordinate system is the same for all clouds.

Don't hesitate to send me the clouds (to admin[at]cloudcompare.org) if you think something is still not right.

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Mon May 08, 2023 8:07 am
by tsch_kl
Hello Daniel,
okay, I am a step further!
To my process: I have exported 5 different qualities (Lowest, Low, Medium, High and UltraHigh) of this point cloud from Metashape. The first point cloud (high quality), with which I performed the registration, is showing the correct coordinates under "Global box center". The remaining four point clouds, to which I then applied only the transformation matrix, have only those of the matrix under "Global box center". I think this is where my problem lies.
Thomas

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Mon May 08, 2023 5:15 pm
by daniel
When you apply the registration matrix, do you see the "Global Shift & Scale" dialog appear?

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Tue May 09, 2023 5:58 am
by tsch_kl
Hi Daniel,
no, with Ctrl+T the transformation dialog appears and after entering the 4x4 matrix the point cloud will move directly. I will send you my CC-File.
Regards

Re: export of aligned point cloud to mesh with geo coordinates

Posted: Tue May 09, 2023 6:12 am
by daniel
Are you able to load the file you sent me on your side? Because on my side it triggers an exception...