Remove global coordinates from pointclouds

Feel free to ask any question here
Darius_bd
Posts: 45
Joined: Fri Feb 08, 2019 10:28 am

Remove global coordinates from pointclouds

Post by Darius_bd »

.
I feel I'm doing something stupid because in theory this shouldn't be difficult.

I have pointclouds with global coordinates and CC complains about it when I load the E57. Indeed I want them removed, so I unclick the "preserve global shift on save". The blue informative text on top disappears. And I used the suggested value which removes much of the crazy amount of numbers from the coordinates (something like from X=3575131.80 to X=31.80) for all the scans.

After they load, I click on all the loaded clouds and I click on save and select the E57 format hoping that now they will all have the stripped down coordinates and that the global shift wont be "put back" on them.

Yet after saving, if I open the new E57 with the shifted pointclouds inside, CC still will complain that the coordinates are too big and it will suggest the same shift as before.

So, what's the correct way to save a new E57 file without this huge global coordinates?

Thanks!
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Remove global coordinates from pointclouds

Post by daniel »

This looks like the right way to do it. Which version did you use?

And in the properties of your (loaded) clouds, do you see any values different from 0 in the 'Global shift' section?
Daniel, CloudCompare admin
Darius_bd
Posts: 45
Joined: Fri Feb 08, 2019 10:28 am

Re: Remove global coordinates from pointclouds

Post by Darius_bd »

.
Hi Daniel

I'm using v2.11 Anoia.

So, I went to check what you told me and only the first cloud (out of 50) had the "global shift" value to be "(0.00;0.00;0.00)". The second and subsequent clouds all have the big coordinates still on them in the global shift property.

Then I closed CC and reopened the file, but this time I didn't click on "yes to all" but rather "yes" the 50 times it takes.

Now all the clouds have 0.00;0.00;0.00 as the global shift.

(as an added bonus, now I can see the clouds after it finished loading, before I couldn't. I guess because the first cloud was in a different place than the 49 others so CC tried to zoom out to have everything on screen)

The console output is the same when I click on "yes" one by one (the second time I loaded the file) as when I clicked on the "yes to all" (as I was doing up til now). Take the last cloud as an example:

[21:53:02] [E57] Reading new scan node (49)
[21:53:02] [E57Filter::loadFile] Cloud 0000000000000032 has been recentered! Translation: (-3575100.00 ; -5933900.00 ; 0.00)

I guess there's a bug somewhere?
Darius_bd
Posts: 45
Joined: Fri Feb 08, 2019 10:28 am

Re: Remove global coordinates from pointclouds

Post by Darius_bd »

.
Meh, I saved the clouds as an new E57 after they all show 0 as global shift and still when opening it in CC it still complains about large coordinates ;/
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Remove global coordinates from pointclouds

Post by daniel »

Really? Are you sure that's the right file?

For the 'Apply all' issue, I guess it's a bug indeed!
Daniel, CloudCompare admin
Darius_bd
Posts: 45
Joined: Fri Feb 08, 2019 10:28 am

Re: Remove global coordinates from pointclouds

Post by Darius_bd »

.
Yeah, I'm completely sure. I tried saving the new E57 by selecting all the shifted clouds and also by selecting the parent folder, but I get the same result.

I mentioned before that I can see the pointclouds now. The thing with them is, even though their global shift is 0, they look like I haven't applied the global shift to remove the global coordinates. When opening a pointcloud with huge coordinates they look like the points are falling into a ordering grid, because of the lost precision, right? The same is happening here with these clouds, even though they were shifted.

Attached a screenshot of CC
Attachments
Global Shift.png
Global Shift.png (423.56 KiB) Viewed 5980 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Remove global coordinates from pointclouds

Post by daniel »

Oh actually we can see here that they are just not shifted at all! The global shift is (0, 0, 0) but the shifted coordinates are still very large. That explains why...

What does the Global Shift dialog look like when you validate it?

On my side it looks like that:
global_shift.jpg
global_shift.jpg (40.77 KiB) Viewed 5937 times
Daniel, CloudCompare admin
Darius_bd
Posts: 45
Joined: Fri Feb 08, 2019 10:28 am

Re: Remove global coordinates from pointclouds

Post by Darius_bd »

.
I'd say on my side it looks the same:
Attachments
CCdialog.png
CCdialog.png (24.93 KiB) Viewed 5841 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Remove global coordinates from pointclouds

Post by daniel »

And with this dialog you get the cloud that we saw on the capture?! Even on the first cloud?
Daniel, CloudCompare admin
Darius_bd
Posts: 45
Joined: Fri Feb 08, 2019 10:28 am

Re: Remove global coordinates from pointclouds

Post by Darius_bd »

.
Yup.

This is what I get if I click "Yes to all" in the previous dialog. (CC1.jpg: First pointcloud / CC2.jpg: Second and the rest) (if I click on "yes to all" the clouds are not visible because apparently the first cloud is moved, the rest stay behind, so there's a zoom-out applied)
Attachments
CC2.jpg
CC2.jpg (176.72 KiB) Viewed 5677 times
CC1.jpg
CC1.jpg (175.34 KiB) Viewed 5677 times
Post Reply