Trying to understand matrices.

Feel free to ask any question here
Post Reply
MajorDomo
Posts: 5
Joined: Thu Apr 18, 2019 8:48 pm

Trying to understand matrices.

Post by MajorDomo »

Hi.
My math knowledge leaves a lot to be desired, nevertheless I am trying to understand how matrices transform the clouds.
My problem is that I can not get to the same numbers as CC does, and I know I'm missing something, I just don't know what!

I am using this PTX file:

Code: Select all

2
1
5.720491 2.051607 -0.066689
0.921670 -0.387975 -0.000111
0.387975 0.921670 -0.000027
0.000113 -0.000018 1
0.921670 -0.387975 -0.000111 0
0.387975 0.921670 -0.000027 0
0.000113 -0.000018 1.000000 0
5.720491 2.051607 -0.066689 1
-12.703384 19.466080 -0.777603 0.173709
100 200 300 0.500000
And on CC the coordinates for the (100;200;300) point after the matrix is applied are (175.516296;147.582657;299.916809) and for the life of me I can not figure out how CC get to that, even after reading the help on CC, and figuring out that the PTX's transformation matrix seems to be turned on it's side.

Many thanks, and apologies for posing such a basic question.
daniel
Site Admin
Posts: 7623
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Trying to understand matrices.

Post by daniel »

The 4 first lines correspond to the 'sensor' transformation:
  • The first line is the translation
  • And the 3 next ones are what would be the rotation matrix columns.
And then you have 4 new lines with the 'cloud/scan' transformation:
  • The 3 first lines are what would be the rotation matrix columns.
  • The 4th line is the translation
If you want to project the points in the world coordinates, you simply have to multiply them by the 'cloud' transformation.

P.S.: make sure to apply the 3x3 rotation matrix first, and then the translation.
Daniel, CloudCompare admin
MajorDomo
Posts: 5
Joined: Thu Apr 18, 2019 8:48 pm

Re: Trying to understand matrices.

Post by MajorDomo »

Thanks for taking the time to help me Daniel.
That did it! I had complicated the matter on my own head, after reading so much stuff over the last few days.

I just makes sense now!
Post Reply