Point cloud accuracy loss after applying transformation matrix

Feel free to ask any question here
Daniel Anton
Posts: 1
Joined: Thu Jun 06, 2019 11:26 am

Point cloud accuracy loss after applying transformation matrix

Post by Daniel Anton »

Hi Daniel,


First of all, congratulations for the versatile CloudCompare. It has become an essential tool for my research.

I am currently involved in massive point cloud processing and I decided to use CloudCompare for geo-referencing my scan data.
When applying a transformation matrix to any point cloud (apparently regardless the number of points) using CloudCompare v2.11 Alpha, the quality of the data decreases -the point clouds lose accuracy as in the screenshots attached (they are the same point cloud. Left: original; Right: transformed).

Issue after applying transformation matrix2.png
Issue after applying transformation matrix2.png (641.82 KiB) Viewed 6537 times

This does not happen when transforming the point cloud with the Translate/Rotate tool.


Thank you so much.


Best regards,
Daniel
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Point cloud accuracy loss after applying transformation matrix

Post by daniel »

What kind of transformation matrix do you input? Can you give us an example?

And does the cloud have large coordinates maybe?
Daniel, CloudCompare admin
Buczer
Posts: 5
Joined: Wed Jan 30, 2019 8:21 pm

Re: Point cloud accuracy loss after applying transformation matrix

Post by Buczer »

Hi Daniel !

I have the same problem, I'm losing the precision of the point cloud after the application of the transformation matrix. You can see below how my point cloud looks like before and after transformation.

before:
pc_raw.jpg
pc_raw.jpg (267.44 KiB) Viewed 6129 times
after transformation:
pc_transform.jpg
pc_transform.jpg (245.3 KiB) Viewed 6129 times
I want to transform my data from a local coordinate system to a national coordinate system. I further steps I'll want to process data and get the georeferenced output which will be ready to use in the field with GPS app.

Is there a way to do it without losing the precision ?

My transformation matrix look like this :

1.000000000000 0.000000000000 0.000000000000 607798.500000000000
0.000000000000 1.000000000000 0.000000000000 540818.937500000000
0.000000000000 0.000000000000 1.000000000000 111.369804382324
0.000000000000 0.000000000000 0.000000000000 1.000000000000

Thank in advance for your answer.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Point cloud accuracy loss after applying transformation matrix

Post by daniel »

And when you input such a transformation matrix, CC doesn't ask you to apply a Global Shift? (if yes, then you should accept this temporary shift).

Which version of CloudCompare are you using?
Daniel, CloudCompare admin
Buczer
Posts: 5
Joined: Wed Jan 30, 2019 8:21 pm

Re: Point cloud accuracy loss after applying transformation matrix

Post by Buczer »

When I applied such a transformation matrix CC doesn't ask me to apply a Global Shift

I tried to do this in CC 2.11.3 and CC 2.12 beta, in both cases the same situation occurred.
I'm working on Windows OS. Input point clouds are stored in LAS/LAZ format.

I attached a sample data so you can see how it looks like.

You can try this transformation matrix :

1.000000000000 0.000000000000 0.000000000000 607798.500000000000
0.000000000000 1.000000000000 0.000000000000 540818.937500000000
0.000000000000 0.000000000000 1.000000000000 111.369804382324
0.000000000000 0.000000000000 0.000000000000 1.000000000000

Thanks for any suggestions.
Attachments
test.7z
(428.66 KiB) Downloaded 508 times
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Point cloud accuracy loss after applying transformation matrix

Post by daniel »

Hum, that's weird. On my side, with version 2.12.0, I see:
globa_shift.jpg
globa_shift.jpg (66.03 KiB) Viewed 6050 times
Can you check that your 'File > Global Shift settings' dialog has the right values? (should be 10^4 for coordinates, and 10^6 for the diagonal).
Daniel, CloudCompare admin
cragoras
Posts: 6
Joined: Tue Feb 14, 2023 8:58 am

Re: Point cloud accuracy loss after applying transformation matrix

Post by cragoras »

I'll revive this post because i have a similar problem
When importing the point cloud with local coordinates (<1000), due to its size, there is the automated query to apply a global shift to the coordinates. This query is done again after the transformation.

The parameters of these shifts are then, as i understand it, saved and should be attached to the coordinates after export. However, i think there is a processing error when the shift is attached in both processing steps. In this case, CloudCompare uses only the last one applied, which results in incorrect coordinates (my result, maybe someone can verify?)
The option to apply the shift during import and not during the following transformation results in a loss of point density , probably because the translations are very large ? Here i get just the same result then the others, somehow its "rastered"
Unbenannt.PNG
Unbenannt.PNG (18.36 KiB) Viewed 5652 times
Only if no shift is applied during the import of the locally referenced point cloud, but during the transformation, correct results are obtained. There seems to be some kind of error i Cloud compare cause only the last shift is applied?

my matrix is
0.5694660473416330 -0.8220148544430920 0.000 404335.6047
0.8220148544430920 0.5694660473416330 0.000 5432579.8802
0.000 0.000 1.000 310.546
0.000 0.000 0.000 1.0000
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Point cloud accuracy loss after applying transformation matrix

Post by daniel »

Hi,

Which version are you using?

And could you provide us with the specific values that were used? (the first shift, then the transformation parameters, and last the second shift that was applied)?
Daniel, CloudCompare admin
cragoras
Posts: 6
Joined: Tue Feb 14, 2023 8:58 am

Re: Point cloud accuracy loss after applying transformation matrix

Post by cragoras »

Hey,
i am using v2.9.1, cant use any newer versions cause i'm working on university computers. My pointcloud is approx 500Million points.
Global shift settings are 10^4 and 10^6.

I have not entered any specific shifts myself and jsut used the numbers cloud compare provided automatically.
Matrix for every case is
0.5694660473416330 -0.8220148544430920 0.000 404335.6047
0.8220148544430920 0.5694660473416330 0.000 5432579.8802
0.000 0.000 1.000 310.546
0.000 0.000 0.000 1.0000

Import shift is the same for both and i press YES
Shift1.PNG
Shift1.PNG (19.13 KiB) Viewed 5614 times
then afterwards while applying the transformation there is this option
shift2 pre trafo.PNG
shift2 pre trafo.PNG (24.58 KiB) Viewed 5614 times
Now there are two cases

1) If i go NO for the transformation shift i get this which is just wrong
no for shift2.PNG
no for shift2.PNG (7.05 KiB) Viewed 5614 times



2) If i go YES for the Transformation shift i get this result for a random target which coordinates i know which is slightly wrong
yes for shift2.PNG
yes for shift2.PNG (150.83 KiB) Viewed 5614 times




as i said, only NO for the shift at the beginning(first picture) and yes at transformation right here gives a good result
no_thenhere_yes.PNG
no_thenhere_yes.PNG (58.38 KiB) Viewed 5614 times

correct result
correct_result.PNG
correct_result.PNG (171.31 KiB) Viewed 5614 times




Hope this was understandable
Thank you for your help
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Point cloud accuracy loss after applying transformation matrix

Post by daniel »

Version 2.9?! It has been released in 2016... I bet that's definitely a bug, and it has long been fixed since then.

Maybe you should make a request so that the university updates the SW.
Daniel, CloudCompare admin
Post Reply