Compose two homogeneous 3D transformation matrices.
::hom_mat3d_compose composes a new 3D transformation matrix from the two input matrices. The transformation given by HomMat3DFirst is applied first, followed by the transformation given by HomMat3DSecond, i.e., with HomMat3DFirst = H_1, HomMat3DSecond = H_2, and HomMat3DCompose = H_c is:
H_c = H_2 H_1A homogeneous 4x3 transformation matrix describes the transformation of a 3D point from the source coordinate system into the destination coordinate system. In this sight the following holds are usable:
/ x3 \ / x1 \ / x1 \
| y3 | = H_g | y1 | = H_2 H_1 | y1 |
\ z3 / \ z1 / \ z1 /
/ x2 \
= H_2 | y2 |
\ z2 /
with:
/ x2 \ / x1 \ / x1 \
| y2 | = H_1 | y1 | = R_1 | y1 | + T_1.
\ z2 / \ z1 / \ z1 /
therefore:
/ x3 \ / x2 \ / / x1 \ \
| y3 | = R_2 | y2 | + T_2 = R_2 | R_1 | y1 | + T_1 | + T_2
\ z3 / \ z2 / \ \ z1 / /
/ x1 \
= R_2 R_1 | y1 | + R_2 T_1 + T_2
\ z1 /
/ x1 \
= R_c | y1 | + T_c
\ z1 /
with:
Rotation R_c = R_1 R_2 and
Translation T_c = R_2 T_1 + T_2
|
HomMat3DSecond (input_control) |
affine3d-array -> HTuple.double |
| Second input transformation matrix. | |
| Number of elements: 12 | |
|
HomMat3DFirst (input_control) |
affine3d-array -> HTuple.double |
| First input transformation matrix. | |
| Number of elements: 12 | |
|
HomMat3DCompose (output_control) |
affine3d-array -> HTuple.double * |
| Output transformation matrix. | |
| Number of elements: 12 | |
HTuple Pose, HomTransMat1, HomTransMat2, HomTransMatMult ;
// read camera pose
::read_pose("campose.dat",&CamPose);
// transform pose to transformation matrix
::pose_to_hom_mat3d(CamPose,&HomTransMat1);
// multiply transformation matrices
::hom_mat3d_compose(HomTransMat2, HomTransMat1, &HomTransMatMult);
::hom_mat3d_compose always returns H_MSG_TRUE.
::hom_mat3d_identity, ::hom_mat3d_translate, ::hom_mat3d_scale, ::hom_mat3d_rotate, ::pose_to_hom_mat3d
::hom_mat3d_translate, ::hom_mat3d_scale, ::hom_mat3d_rotate
::affine_trans_point_3d, ::hom_mat3d_identity, ::hom_mat3d_rotate, ::hom_mat3d_translate, ::pose_to_hom_mat3d, ::hom_mat3d_to_pose
Basic operators