Translation Matrix 4x4 to 3D Rotation and Translation

Feel free to ask any question here
Post Reply
haden
Posts: 5
Joined: Fri Jul 20, 2018 1:44 pm

Translation Matrix 4x4 to 3D Rotation and Translation

Post by haden »

Hello,

I hope not to repeat a question which is already out there, but I couldn't find an answer, so here I'll explain my situation:

in order to align many pointclouds to one reference cloud i want to batch the process of alignment in the fme software. After aligning one cloud in CC I save the 4x4 matrix as well as it's "Axis,Angle" values and try to move all the clouds as a batch process in the fme software in regards to these values.

The question now mainly is how to translate the 4x4 matrix values or the "Axis,Angle" values to the parameters which I can regulate in the batch process in the fme software. In this software basically I have a "Offsetter" which can take and X,Y,Z value and move the cloud and and a 3-D Rotater. Both you can see in the screenshots.

Useing the "Axis,Angle" Values, I get pretty close but still there is maybe a 3 Meter offset.
matrixtranslate.png
matrixtranslate.png (310.61 KiB) Viewed 3489 times

Thanks for your help.
daniel
Site Admin
Posts: 7479
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Translation Matrix 4x4 to 3D Rotation and Translation

Post by daniel »

Well, the way they are applied by a 4x4 matrix is always: first the rotation, then the translation. So basically you can apply first the (axis, angle) rotation with the "3DRotator", and then the translation with the "Offseter".
Daniel, CloudCompare admin
haden
Posts: 5
Joined: Fri Jul 20, 2018 1:44 pm

Re: Translation Matrix 4x4 to 3D Rotation and Translation

Post by haden »

hi daniel,

thanks for the quick response,

How you described it is the way I also did it in the screenshots, but somehow i'm still not able to reproduce the registration.
I also read online that the center of rotation in always 0,0,0 of the aligned cloud which I set according to that but still?!?

Could there be a problem with the units? meter, degree etc.?
daniel
Site Admin
Posts: 7479
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Translation Matrix 4x4 to 3D Rotation and Translation

Post by daniel »

Is it working at least on the cloud you used to produce the initial matrix?
Daniel, CloudCompare admin
haden
Posts: 5
Joined: Fri Jul 20, 2018 1:44 pm

Re: Translation Matrix 4x4 to 3D Rotation and Translation

Post by haden »

no, well basically it is one big cloud consisting of ca. 100 parts. which I'd like to keep as separated parts. Also I think it would be too big to load it all at once in CC, otherwise of course I could merge, register, and split by scanID or scalar field.
daniel
Site Admin
Posts: 7479
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Translation Matrix 4x4 to 3D Rotation and Translation

Post by daniel »

When you applied the registration process (I guess on one scan?), did you apply first a Global Shift? (i.e. has your cloud large coordinates?)
Daniel, CloudCompare admin
haden
Posts: 5
Joined: Fri Jul 20, 2018 1:44 pm

Re: Translation Matrix 4x4 to 3D Rotation and Translation

Post by haden »

to get a better registration i merged around 10 scans first, then proceeded with the registration. there was a global shift, which I did take into account when moving all other scans in the batch process. the aligned cloud takes over the global shift of the registered cloud right?
Post Reply