Herror ::affine_trans_point_3d (
    const HTuple &HomMat3D,
    const HTuple &Px,
    const HTuple &Py,
    const HTuple &Pz,
    double *Qx,
    double *Qy,
    double *Qz
)
Herror ::affine_trans_point_3d (
    const HTuple &HomMat3D,
    const HTuple &Px,
    const HTuple &Py,
    const HTuple &Pz,
    HTuple *Qx,
    HTuple *Qy,
    HTuple *Qz
)

Apply a homogeneous 3D transformation matrix to points.

::affine_trans_point_3d calculates the result of applying the affine transformation, given by the homogeneous 3D transformation matrix HomMat3D, to the input points (Px,Py ,Pz). The resulting points are returned in (Qx, Qy,Qz).

::affine_trans_point_3d is used to transform a 3D point (Px, Py, Pz) into a new coordinate system. The necessary translation and rotation is given by the 4x3 transformation matrix HomMat3D. The values are given as a tupel in the following order: The first three values of each row describe the three rows of the rotation matrix R and the last values of each row describe the translation T. During the transformation the 3D point is first rotated and subsequently translated:

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


Parameters

HomMat3D (input_control)
affine3d-array -> HTuple.double
Input transformation matrix.
Number of elements: 12

Px (input_control)
point3d.x(-array) -> HTuple.double / long
Input point (x coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024
Typical range of values: 0 <= Px <= 1024
Minimum increment: 1
Recommended increment: 10

Py (input_control)
point3d.y(-array) -> HTuple.double / long
Input point (y coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024
Typical range of values: 0 <= Py <= 1024
Minimum increment: 1
Recommended increment: 10

Pz (input_control)
point3d.z(-array) -> HTuple.double / long
Input point (z coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024
Typical range of values: 0 <= Pz <= 1024
Minimum increment: 1
Recommended increment: 10

Qx (output_control)
point3d.x(-array) -> (HTuple.) double *
Output point (x coordinate).

Qy (output_control)
point3d.y(-array) -> (HTuple.) double *
Output point (y coordinate).

Qz (output_control)
point3d.z(-array) -> (HTuple.) double *
Output point (z coordinate).


Result

::affine_trans_point_3d always returns H_MSG_TRUE.


Possible Predecessors

::hom_mat3d_translate, ::hom_mat3d_scale, ::hom_mat3d_rotate, ::pose_to_hom_mat3d


Possible Successors

::hom_mat3d_translate, ::hom_mat3d_scale, ::hom_mat3d_rotate, ::project_3d_point


Module

Basic operators



Copyright © 1996-2002 MVTec Software GmbH