Hey !
Based on previous topic (
https://www.agisoft.com/forum/index.php?topic=11167.msg50189#msg50189), we found how we can get 3*3 rotation matrix and then yaw/pitch/roll values from 4*4 transformation matrix of an aligned images.
Using same function but with .translation() instead of .rotation(), we can easily get 3*1 translation matrix and so X,Y,Z coordinates.
But now for special test we would like to invert the process :
Based on 3*3 rotation and 3*1 translation matrix, we would like to get the 4*4 transformation matrix in metashape system.
Translation part is easy as X, Y and Z can be directly put in the 4*4 matrix like this :
[[*, *, *, X],
[*, *, *, Y],
[*, *, *, Z],
[0, 0, 0, 1]]
But for the rotation part, it looks .rotation() apply a calculation from the "star part" on the above matrix ([[*, *, ...]]) to the 3*3 rotation matrix.
So we would like to invert this function to create our own 4*4 matrix based on 3*3 rotation and 3*1 translation matrix.
Note : We get our 3*3 rotation matrix from yaw/pitch/roll values using ypr2mat() function
Hope it's clear enough
Regards