hom_3d_trans ( : : X1, Y1, Z1, HomTransMat : X2, Y2, Z2 )

Transform a 3D point into new coordinate system.

hom_3d_trans is used to transform a 3D point (X1, Y1, Z1) into a new coordinate system. The necessary translation and rotation is given by the 4x3 transformation matrix HomTransMat. The values are given as a tupel in the following order: The first nine values describe the three columns of the rotation matrix R and the last three values describe the translation T. During the transform the 3D point is first rotated and subsequently translated:

/ x2 \     / x1 \
| y2 | = R | y1 | + T
\ z2 /     \ z1 /


Parameters

X1 (input_control)
real-array -> real
X-coordinate of the 3D point to be transformed.

Y1 (input_control)
real-array -> real
Y-coordinate of the 3D point to be transformed.

Z1 (input_control)
real-array -> real
Z-coordinate of the 3D point to be transformed.

HomTransMat (input_control)
affin3d-array -> real
Transformation matrix.
Number of elements: 12

X2 (output_control)
real-array -> real
X-coordinate of the transformed 3D point.

Y2 (output_control)
real-array -> real
Y-coordinate of the transformed 3D point.

Z2 (output_control)
real-array -> real
Z-coordinate of the transformed 3D point.


Example
/* read camera pose */
read_cam_pose(::'campose.dat':CamPose) >
/* transform pose to transformation matrix */
pose_to_hom_mat(::CamPose:HomTransMat) >
/* transform 3D Point from source into destination coordinatesystem */
hom_3d_trans(::3.0,4.6,5.9,HomTransMat:X2,Y2,Z2).

Result

hom_3d_trans returns TRUE if all parameter values are correct.


Possible Predecessors

pose_to_hom_mat


Possible Successors

project_3d_point


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