hom_mat_translate ( : : HomTransMatOrg, Delta, Axis : HomTransMatTransl )

Translate the destination coordinate system.

The homogeneous 4x3 transformation matrix HomTransMatOrg describes the transformation of a 3D point from the source coordinate system into the destination coordinate system. hom_mat_translate is used to generate a new 4x3 transformation matrix HomTransMatTransl by translating the origin of HomTransMatOrg along the Axis-axis by Delta (in meter).

If you want to translate the source coordinate system, you have to invert the transformation matrix using hom_mat_invert, translate it using hom_mat_translate, and invert it back again.

The transformation of a 3D point (given in the source coordinate system) into a destination coordinate system ist given by a rotation R and a translation T (see hom_3d_trans). Thus, the following holds:

/ x2 \           / x1 \
| y2 | = R_trans | y1 | + T_trans
\ z2 /           \ z1 /

               / x2 \   
       = R_org | y2 | + ( T_org + T_delta)
               \ z2 /
with
          / -delta \
T_delta = |    0   |  Translation along the x-axis
          \    0   /

          /    0   \
T_delta = | -delta |  Translation along the y-axis
          \    0   /

          /    0   \
T_delta = |    0   |  Translation along the z-axis
          \ -delta /


Parameters

HomTransMatOrg (input_control)
affin3d-array -> real
Original transformation matrix.
Number of elements: 12

Delta (input_control)
real -> real
Translation value in meter.
Default value: 0.1
Suggested values: -1.0, -0.75, -0.5, -0.25, -0.2, -0.1, -0.5, -0.25, -0.125, -0.01, 0, 0.01, 0.125, 0.25, 0.5, 0.1, 0.2, 0.25, 0.5, 0.75, 1.0
Range of values: 0.05 <= Delta
Recommended increment: 0.05

Axis (input_control)
string -> string
Axis, to be translated along.
Default value: ''x''
Suggested values: ''x'', ''y'', ''z''

HomTransMatTransl (output_control)
affin3d-array -> real
New transformation matrix.
Number of elements: 12


Example
/* read camera pose */
read_cam_pose(::'campose.dat':CamPose) >
/* transform pose to transformation matrix */
pose_to_hom_mat(::CamPose:HomTransMat) >
/* translate destination coordinate along x-axis by 0.4 m */
hom_mat_translate(::HomTransMat,0.4,'x':HomTransMatTransl) >
/* translate source coordinate along y-axis by -0.03 m */
hom_mat_invert(::HomTransMat:HomTransMatInv) >
hom_mat_translate(::HomTransMatInv,-0.03,'y':HomTransMatTransl2) >
hom_mat_invert(::HomTransMatTransl2:HomTransMat2).

Result

hom_mat_translate returns TRUE if all parameter values are correct.


See also

hom_mat_invert, hom_mat_ident, hom_mat_rot, hom_mat_translate, pose_to_hom_mat, hom_mat_to_pose, hom_mat_mult, hom_mat_values



Copyright © 1996-1997 MVTec Software GmbH