Invert a homogeneous 3D transformation matrix.
::hom_mat3d_invert inverts the homogeneous 3D transformation matrix given by HomMat3D. The resulting matrix is returned in HomMat3DInvert.
A 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 inverted transformation matrix HomMat3DInvert describes the transformation from the original destination coordinate system to the original source coordinate system. The transformation of a 3D point (given in the source coordinate system) into a destination coordinate system is given by a rotation R and a translation T (see ::affine_trans_point_3d). Thus, the following holds:
/ x2 \ / x1 \
| y2 | = R_org | y1 | + T_org
\ z2 / \ z1 /
/ x1 \ -1 / / x1 \ \
| y1 | = R_org | | y1 | - T_org |
\ z1 / \ \ z1 / /
-1
with R_inv = R_org and T_inv = - T_org:
/ x1 \ / x2 \
| y1 | = R_inv | y2 | + T_inv
\ z1 / \ z2 /
|
HomMat3D (input_control) |
affine3d-array -> HTuple.double |
| Input transformation matrix. | |
| Number of elements: 12 | |
|
HomMat3DInvert (output_control) |
affine3d-array -> HTuple.double * |
| Output transformation matrix. | |
| Number of elements: 12 | |
HTuple CamPose, HomTransMat, HomTransMatInv;
// read camera pose
::read_pose("campose.dat",&CamPose);
// transform pose to transformation matrix
pose_to_hom_mat3d(CamPose,&HomTransMat);
// invert transformation matrix
::hom_mat3d_invert(HomTransMat,&HomTransMatInv);
::hom_mat3d_invert returns H_MSG_TRUE if the input matrix is invertible.
::hom_mat3d_translate, ::hom_mat3d_scale, ::hom_mat3d_rotate, ::pose_to_hom_mat3d
::hom_mat3d_translate, ::hom_mat3d_scale, ::hom_mat3d_rotate, ::hom_mat3d_to_pose
::affine_trans_point_3d, ::hom_mat3d_identity, ::hom_mat3d_rotate, ::hom_mat3d_translate, ::pose_to_hom_mat3d, ::hom_mat3d_to_pose, ::hom_mat3d_compose
Basic operators