Computing single transformation matrix from multiple transformations

Feel free to ask any question here
Post Reply
ashenkin
Posts: 11
Joined: Thu May 25, 2017 3:29 pm

Computing single transformation matrix from multiple transformations

Post by ashenkin »

Hello,

As I'm aligning one pointcloud with another, I'll go through multiple transformation steps. For example, manually translate a cloud a couple times, then point-to-point, then maybe ICP, etc. This results in a number of rotate/translate and scaling operations. I would like to produce a single 4x4 matrix for the resulting transformation. If it were just rotation, then I think matrix multiplication of the chain of 3x3 matrices would work. If it were just translation, then I think addition of the chain of translation vectors would work. If it were just scaling, then multiplication of the scaling factors would work. But chaining all of those together to produce a single 4x4 matrix with scaling... any thoughts on how to do that?

One further question: when one transforms and scales (e.g. by clicking the 'scale' box in the point-to-point registration tool), does the scaling occur at the center point of the bounding box? If so, then the order of operation (i.e. transformation then scaling vs. scaling then transformation) wouldn't matter. Otherwise, I think it would...

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

Re: Computing single transformation matrix from multiple transformations

Post by daniel »

You can look at the 'transformation history' matrix in the entity properties (it's the composition of all transformation matrices since the entity was loaded).

Otherwise the scale is always applied after the rotation and before the translation:

Code: Select all

P' = s.R.P + T
Daniel, CloudCompare admin
ashenkin
Posts: 11
Joined: Thu May 25, 2017 3:29 pm

Re: Computing single transformation matrix from multiple transformations

Post by ashenkin »

excellent - thank you.
Post Reply