Skip to content

Concept – Poses🔗

A pose describes a rigid 3D transformation, i.e., a transformation consisting of an arbitrary translation and rotation. In HALCON, a pose is a tuple with 7 parameters: 3 parameters specifying the translation (TransXtransXtrans_x, TransYtransYtrans_y, and TransZtransZtrans_z), 3 parameters describing the rotation (RotXrotXrot_x, RotYrotYrot_y, and RotZrotZrot_z). The last parameter codes the order of the translations and the rotations (as well as the direction of rotation). Further information about these parameters can be found in the documentation of create_poseCreatePose and in the “Solution Guide III-C - 3D Vision”.

3D poses can be interpreted in two ways: First, to describe the position and orientation of one coordinate system relative to another (e.g., the pose of a part’s coordinate system relative to the camera coordinate system - in short: the pose of the part relative to the camera). Following the second interpretation, a pose describes how coordinates can be transformed between two coordinate systems (e.g., to transform points from part coordinates into camera coordinates).

A pose that transforms point coordinates from coordinate system 1 (cs1) to coordinate system 2 (cs2) is denoted as \(\mvPoseVar{{cs2}}{{cs1}}\). The corresponding transformation of a point given in cs1 (\(\mvVectorVar[cs1]{p}\)) into cs2 (\(\mvVectorVar[cs2]{p}\)) is denoted as

\[\begin{eqnarray*} \mvVectorVar[cs2]{p} = \mvPoseVar{cs2}{{cs1}} \cdot \mvVectorVar[cs1]{p} . \end{eqnarray*}\]

It should be noted that not the pose (as a tuple) but the transformation described by this pose is used for the multiplication and the above notation is only used for readability. Hence, the pose \(\mvPoseVar{{cs2}}{{cs1}}\) describes the rigid transformation that is represented by the homogeneous transformation matrix \(\mvHomMatrixVar{}{}(\mvPoseVar{{cs2}}{{cs1}}) = \mvHomMatrixVar{cs2}{cs1}\) (see, e.g., the documentation of create_poseCreatePose for further details)

\[\begin{eqnarray*} \mvVectorTwoD{\mvVectorVar[cs2]{p}}{1} = \mvHomMatrixVar{{cs}2}{{cs}1} \cdot \mvVectorTwoD{\mvVectorVar[cs1]{p}}{1} . \end{eqnarray*}\]

Consequently, the pose \(\mvPoseVar{{cs2}}{{cs1}}\) describes the transformation of points from cs1 into cs2. Furthermore, as mentioned above, it also describes the transformation of the coordinate system itself, however, in reverse order: Thus, \(\mvPoseVar{{cs2}}{{cs1}}\) describes how coordinate system 2 must be transformed to obtain coordinate system 1, and hence, the pose of coordinate system 2 relative to system 1.

With this notation, poses can easily concatenated like homogeneous matrices, e.g.,

\[\begin{eqnarray*} \mvPoseVar{{cs2}}{{cs0}} = \mvPoseVar{{cs2}}{{cs1}} \cdot \mvPoseVar{{cs1}}{{cs0}} . \end{eqnarray*}\]

Such a concatenation can be done using e.g., pose_composePoseCompose.