affine_trans_point_3d ( : : HomMat3D, Px, Py, Pz : Qx, Qy, Qz )

Apply an arbitrary affine 3D transformation to points.

affine_trans_point_3d applies an arbitrary affine 3D transformation, i.e., scaling, rotation, and translation, to the input points (Px,Py,Pz) and returns the resulting points in (Qx, Qy,Qz). The affine transformation is described by the homogeneous transformation matrix given in HomMat3D. This corresponds to the following equation (input and output points as homogeneous vectors):

  / Qx \              / Px \
  | Qy | = HomMat3D * | Py |
  | Qz |              | Pz |
  \ 1  /              \ 1  /

The transformation matrix can be created using the operators hom_mat3d_identity, hom_mat3d_scale, hom_mat3d_rotate, hom_mat3d_translate, etc., or be the result of pose_to_hom_mat3d.

For example, if HomMat3D corresponds to a rigid transformation, i.e., if it consists of a rotation and a translation, the points are transformed as follows:

  / Qx \     /          \   / Px \     /   / Px \     \
  | Qy |  =  |   R    t | * | Py |  =  | R*| Py | + t |
  | Qz |     |          |   | Pz |     |   \ Pz /     |
  \ 1  /     \ 0 0 0  1 /   \ 1  /     \      1       /


Parameters

HomMat3D (input_control)
hom_mat3d-array -> real
Input transformation matrix.

Px (input_control)
point3d.x(-array) -> real / integer
Input point(s) (x coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024

Py (input_control)
point3d.y(-array) -> real / integer
Input point(s) (y coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024

Pz (input_control)
point3d.z(-array) -> real / integer
Input point(s) (z coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024

Qx (output_control)
point3d.x(-array) -> real
Output point(s) (x coordinate).

Qy (output_control)
point3d.y(-array) -> real
Output point(s) (y coordinate).

Qz (output_control)
point3d.z(-array) -> real
Output point(s) (z coordinate).


Result

If the parameters are valid, the operator affine_trans_point_3d returns 2 (H_MSG_TRUE). If necessary, an exception is raised.


Parallelization Information

affine_trans_point_3d is reentrant and processed without parallelization.


Possible Predecessors

hom_mat3d_translate, hom_mat3d_translate_local, hom_mat3d_scale, hom_mat3d_scale_local, hom_mat3d_rotate, hom_mat3d_rotate_local


Possible Successors

hom_mat3d_translate, hom_mat3d_translate_local, hom_mat3d_scale, hom_mat3d_scale_local, hom_mat3d_rotate, hom_mat3d_rotate_local


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH