Dual Quaternions

List of Operators ↓

This chapter contains operators for handling dual quaternions.

Introduction to Dual Quaternions

A dual quaternion consists of the two quaternions and , where is the real part, is the dual part, and is the dual unit number ( ). Each quaternion consists of the scalar part and the vector part , where are the basis elements of the quaternion vector space.

Representing Dual Quaternions in HALCON

In HALCON, a dual quaternion is represented by a tuple with eight values , where and are the scalar and the vector part of the real part and and are the scalar and the vector part of the dual part.

Unit Dual Quaternions, Rigid 3D Transformations, and Screws

In contrast to unit quaternions, which are able to represent 3D rotations, a unit dual quaternion is able to represent a full 3D rigid transformation, i.e., a 3D rotation and a 3D translation. Hence, unit dual quaternions are an alternative representation to 3D poses and 3D homogeneous transformation matrices for 3D rigid transformations. In comparison to transformation matrices with 12 elements, dual quaternions with 8 elements are a more compact representation. Similar to transformation matrices, dual quaternions can be combined easily to concatenate multiple transformations. Furthermore, they allow a smooth interpolation between two 3D rigid transformations and an efficient transformation of 3D lines. Each 3D rigid transformation can be represented as a screw:

image/svg+xml (L,M) d θ (L,M) a) b)
a) A 3D rigid transformation... b) can be represented as a screw.
image/svg+xml (L,M) P0 y x P1 L=P1-P0 M z L
Moment of the screw axis.

The parameters that fully describe the screw are:

A screw is composed of a rotation about the screw axis given by and , by the angle , and a translation by along this axis. The position of the screw axis is defined by its moment with respect to the origin of the coordinate system. is a vector that is perpendicular to the direction of the screw axis and perpendicular to a vector from the origin to a point on the screw axis. It is calculated by the vector product Hence, is the normal vector of the plane that is spanned by the screw axis and the origin. Note that is the point on the screw axis with the shortest distance to the origin of the coordinate system.

The elements of a unit dual quaternion are related to the screw parameters of the 3D rigid transformation as:

Note that and represent the same 3D rigid transformation. Further note that the inverse of a unit dual quaternion is its conjugate, i.e., (see dual_quat_conjugatedual_quat_conjugateDualQuatConjugateDualQuatConjugateDualQuatConjugatedual_quat_conjugate for detailed information about the conjugate of a dual quaternion).

3D Lines and Plücker Coordinates

Lines in 3D can be represented by dual unit vectors. A dual unit vector can be interpreted as a dual quaternion with 0 scalar parts. The 3D rigid transformation that is represented by a unit dual quaternion is easily related to the corresponding screw around a screw axis. As described above, the screw axis is defined by its direction with and its moment with respect to the origin of the coordinate system with . In the same way, a 3D line can be represented by its direction with and its moment . The six parameters of and are called the Plücker coordinates of the line.

Consequently, a line that is represented by a dual quaternion with 0 scalar part is


List of Operators

deserialize_dual_quatDeserializeDualQuatdeserialize_dual_quatDeserializeDualQuatdeserialize_dual_quat
Deserialize a serialized dual quaternion.
dual_quat_composeDualQuatComposedual_quat_composeDualQuatComposedual_quat_compose
Multiply two dual quaternions.
dual_quat_conjugateDualQuatConjugatedual_quat_conjugateDualQuatConjugatedual_quat_conjugate
Conjugate a dual quaternion.
dual_quat_interpolateDualQuatInterpolatedual_quat_interpolateDualQuatInterpolatedual_quat_interpolate
Interpolate two dual quaternions.
dual_quat_normalizeDualQuatNormalizedual_quat_normalizeDualQuatNormalizedual_quat_normalize
Normalize a dual quaternion.
dual_quat_to_hom_mat3dDualQuatToHomMat3ddual_quat_to_hom_mat3dDualQuatToHomMat3ddual_quat_to_hom_mat3d
Convert a unit dual quaternion into a homogeneous transformation matrix.
dual_quat_to_screwDualQuatToScrewdual_quat_to_screwDualQuatToScrewdual_quat_to_screw
Convert a unit dual quaternion into a screw.
dual_quat_trans_line_3dDualQuatTransLine3ddual_quat_trans_line_3dDualQuatTransLine3ddual_quat_trans_line_3d
Transform a 3D line with a unit dual quaternion.
screw_to_dual_quatScrewToDualQuatscrew_to_dual_quatScrewToDualQuatscrew_to_dual_quat
Convert a screw into a dual quaternion.
serialize_dual_quatSerializeDualQuatserialize_dual_quatSerializeDualQuatserialize_dual_quat
Serialize a dual quaternion.