Save point cloud as ASCII after applying translation matrix

Feel free to ask any question here
Nathalie Morin
Posts: 16
Joined: Wed Nov 27, 2013 3:39 pm
Location: Strasbourg, France

Save point cloud as ASCII after applying translation matrix

Post by Nathalie Morin »

Hello,

I loaded in Cloud Compare (CC) a georeferenced Terrestrial Laser Scanning (TLS) point cloud with a center of xyz coordinates in UTM Zone 19 N (633170.05 ; 5 388 211.63 ; 107.38)
When I'm asked to recenter the cloud because the coordinates are too big, I said "Yes to all" and this is what I obtained :
Box center :
X: -0.04
Y: 0.0500002
Z: 117.285
Global shift : (-633170.05;-5388211.59;0.00)

I applied a slight translation matrix in the horizontal xy plane with the function of the Menu Edit / Apply Transformation :
1.000000000000 0.000000000000 0.000000000000 1.359704971313
0.000000000000 1.000000000000 0.000000000000 -0.119908630848
0.000000000000 0.000000000000 1.000000000000 0.000000000000
0.000000000000 0.000000000000 0.000000000000 1.000000000000

=> So with a shift of + 1.36 and - 0.12, respectivelly in the x and y directions, the new xy coordinates should be (633171.41 ; 5388211.51)

My problem is when I save in ASCII format, the translation is not applied to the point cloud. It is applied only when I save in BIN CC native format, but I need it in ASCII format for processing in other programs.

When I use another equivalent function in Menu Edit / Edit Global Shift and then save in ASCII format, the translation is not applied either !?
The only way to keep it is through Apply Transformation and save in BIN CC format

A hint is that I should probably change the box center ? How can I do that ?
-> After Edit / Apply Transformation and save as Bin CC format
Box center :
X: 1.31971
Y: -0.0699091
Z: 117.285
Global shift : (-633170.05;-5388211.59;0.00)

-> After Edit global shift and save as ASCII format
Box center :
X: -0.04
Y: 0.0500002
Z: 117.285
Global shift : (-633171.41;-5388211.47;0.00)

Thanks in advance for your help
Cheers !
Nathalie
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Save point cloud as ASCII after applying translation mat

Post by daniel »

Hi,

That's odd because global shift/scale information should be applied for almost all file formats (ASCII, etc.).

What version are you using?
Daniel, CloudCompare admin
Nathalie Morin
Posts: 16
Joined: Wed Nov 27, 2013 3:39 pm
Location: Strasbourg, France

Re: Save point cloud as ASCII after applying translation mat

Post by Nathalie Morin »

Hi,

Thanks for your prompt answer !

I just uploaded the latest version yesterday : Version: 2.5.4.1 [Windows 64 bits]
Nathalie Morin
Posts: 16
Joined: Wed Nov 27, 2013 3:39 pm
Location: Strasbourg, France

Re: Save point cloud as ASCII after applying translation mat

Post by Nathalie Morin »

Hello again,

In fact, precisely, when I apply the inverse of the xy translation matrix to the georeferenced TLS point cloud via global shift x = - 1.36 ; y = + 0,12, then save in ASCII, it works, but I loose the UTM coordinates !

Worst, if I go back to the original non-georeferenced point cloud in xyz cartesian local coordinates, and apply directly the global shift of the UTM coordinates + shift in xy
x : 633 170.05 + 1,36 = 633171.41
y : 5 388 211.63 - 0,12 = 5388211.51
z : 107,38 (no shift)
then save in ASCII, the shift does not happen either !

It seems the problem comes from too big coordinates ?
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Save point cloud as ASCII after applying translation mat

Post by daniel »

I can't reproduce the bug...

We have made a lot of changes to the global shift & scale mechanism recently. Can you test with this version:
http://www.cloudcompare.org/release/Clo ... in_x64.zip
Daniel, CloudCompare admin
Nathalie Morin
Posts: 16
Joined: Wed Nov 27, 2013 3:39 pm
Location: Strasbourg, France

Re: Save point cloud as ASCII after applying translation mat

Post by Nathalie Morin »

Ok thanks, I'm downloading this new beta version now (it's not available on your official website I think ?) I will try it and get back to you...
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Save point cloud as ASCII after applying translation mat

Post by daniel »

not yet ;)
Daniel, CloudCompare admin
Nathalie Morin
Posts: 16
Joined: Wed Nov 27, 2013 3:39 pm
Location: Strasbourg, France

Re: Save point cloud as ASCII after applying translation mat

Post by Nathalie Morin »

GOOD NEWS :-)))! It works in this latest beta version... that is to say, applying xy translation matrix via "Edit / Apply Transformation", then save as ASCII, then reload the file in CC or other TLS processing software, and the xy translation is being taken into account.

The only thing, no rainbow color ramp in this beta version, but I won't be too demanding, the essential is there the export in ASCII format after transformation.

You made my day :-)!
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Save point cloud as ASCII after applying translation mat

Post by daniel »

What do you mean by "no rainbow color ramp"? Where exactly?
Daniel, CloudCompare admin
Nathalie Morin
Posts: 16
Joined: Wed Nov 27, 2013 3:39 pm
Location: Strasbourg, France

Re: Save point cloud as ASCII after applying translation mat

Post by Nathalie Morin »

I mean in Properties / Color Scale / Current / Blue > Green > Yellow > Red as an example

I think the other color ramps do not work either in this beta version. It was useful to distinguish 2 different point clouds during co-registration.
Post Reply