QuatEnum_EulerAnglesType
import { QuatEnum_EulerAnglesType } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods.
Enum of Euler angles type.
Without considering the possibility of using two different conversions for the definition of the rotation axes , there exists twelve possible sequences of rotation axes, divided into two groups:
- Proper Euler angles (Z-X-Z, X-Y-X, Y-Z-Y, Z-Y-Z, X-Z-X, Y-X-Y)
- Tait-Bryan angles (X-Y-Z, Y-Z-X, Z-X-Y, X-Z-Y, Z-Y-X, Y-X-Z).
The three elemental rotations may be extrinsic (rotations about the axes xyz of the original coordinate system, which is assumed to remain motionless), or intrinsic(rotations about the axes of the rotating coordinate system XYZ, solidary with the moving body, which changes its orientation after each elemental rotation).
Extrinsic and intrinsic rotations are relevant.
The definition of the Euler angles is as following,
\theta_1represents the first rotation angle,\theta_2represents the second rotation angle,\theta_3represents the third rotation angle.
For intrinsic rotations in the order of X-Y-Z, the rotation matrix R can be calculated by:
R =X(\theta_1) Y(\theta_2) Z(\theta_3)
For extrinsic rotations in the order of X-Y-Z, the rotation matrix R can be calculated by:
R =Z({\theta_3}) Y({\theta_2}) X({\theta_1})
where
X({\theta_1})={\begin{bmatrix}1&0&0\\0&\cos {\theta_1} &-\sin {\theta_1} \\0&\sin {\theta_1} &\cos {\theta_1} \\\end{bmatrix}},
Y({\theta_2})={\begin{bmatrix}\cos \theta_{2}&0&\sin \theta_{2}\\0&1 &0 \\\ -sin \theta_2& 0&\cos \theta_{2} \\\end{bmatrix}},
Z({\theta_3})={\begin{bmatrix}\cos\theta_{3} &-\sin \theta_3&0\\\sin \theta_3 &\cos \theta_3 &0\\0&0&1\\\end{bmatrix}}.
The function is designed according to this set of conventions:
Right handed reference frames are adopted, and the right hand rule is used to determine the sign of angles.
Each matrix is meant to represent an active rotation (the composing and composed matrices are supposed to act on the coordinates of vectors defined in the initial fixed reference frame and give as a result the coordinates of a rotated vector defined in the same reference frame).
For
\theta_1and\theta_3, the valid range is (−π, π].For
\theta_2, the valid range is [−π/2, π/2] or [0, π].For Tait-Bryan angles, the valid range of
\theta_2is [−π/2, π/2]. When transforming a quaternion to Euler angles, the solution of Euler angles is unique in condition of\theta_2 \in (−π/2, π/2). If\theta_2 = −π/2or\theta_2 = π/2, there are infinite solutions. The common name for this situation is gimbal lock. For Proper Euler angles,the valid range of\theta_2is in [0, π]. The solutions of Euler angles are unique in condition of\theta_2 \in (0, π). If\theta_2 =0or\theta_2 =π, there are infinite solutions and gimbal lock will occur.
Constructors and members
static INT_XYZ
Intrinsic rotations with the Euler angles type X-Y-Z
INT_XYZ: QuatEnum_EulerAnglesTypeValue<0>,static INT_XZY
Intrinsic rotations with the Euler angles type X-Z-Y
INT_XZY: QuatEnum_EulerAnglesTypeValue<1>,static INT_YXZ
Intrinsic rotations with the Euler angles type Y-X-Z
INT_YXZ: QuatEnum_EulerAnglesTypeValue<2>,static INT_YZX
Intrinsic rotations with the Euler angles type Y-Z-X
INT_YZX: QuatEnum_EulerAnglesTypeValue<3>,static INT_ZXY
Intrinsic rotations with the Euler angles type Z-X-Y
INT_ZXY: QuatEnum_EulerAnglesTypeValue<4>,static INT_ZYX
Intrinsic rotations with the Euler angles type Z-Y-X
INT_ZYX: QuatEnum_EulerAnglesTypeValue<5>,static INT_XYX
Intrinsic rotations with the Euler angles type X-Y-X
INT_XYX: QuatEnum_EulerAnglesTypeValue<6>,static INT_XZX
Intrinsic rotations with the Euler angles type X-Z-X
INT_XZX: QuatEnum_EulerAnglesTypeValue<7>,static INT_YXY
Intrinsic rotations with the Euler angles type Y-X-Y
INT_YXY: QuatEnum_EulerAnglesTypeValue<8>,static INT_YZY
Intrinsic rotations with the Euler angles type Y-Z-Y
INT_YZY: QuatEnum_EulerAnglesTypeValue<9>,static INT_ZXZ
Intrinsic rotations with the Euler angles type Z-X-Z
INT_ZXZ: QuatEnum_EulerAnglesTypeValue<10>,static INT_ZYZ
Intrinsic rotations with the Euler angles type Z-Y-Z
INT_ZYZ: QuatEnum_EulerAnglesTypeValue<11>,static EXT_XYZ
Extrinsic rotations with the Euler angles type X-Y-Z
EXT_XYZ: QuatEnum_EulerAnglesTypeValue<12>,static EXT_XZY
Extrinsic rotations with the Euler angles type X-Z-Y
EXT_XZY: QuatEnum_EulerAnglesTypeValue<13>,static EXT_YXZ
Extrinsic rotations with the Euler angles type Y-X-Z
EXT_YXZ: QuatEnum_EulerAnglesTypeValue<14>,static EXT_YZX
Extrinsic rotations with the Euler angles type Y-Z-X
EXT_YZX: QuatEnum_EulerAnglesTypeValue<15>,static EXT_ZXY
Extrinsic rotations with the Euler angles type Z-X-Y
EXT_ZXY: QuatEnum_EulerAnglesTypeValue<16>,static EXT_ZYX
Extrinsic rotations with the Euler angles type Z-Y-X
EXT_ZYX: QuatEnum_EulerAnglesTypeValue<17>,static EXT_XYX
Extrinsic rotations with the Euler angles type X-Y-X
EXT_XYX: QuatEnum_EulerAnglesTypeValue<18>,static EXT_XZX
Extrinsic rotations with the Euler angles type X-Z-X
EXT_XZX: QuatEnum_EulerAnglesTypeValue<19>,static EXT_YXY
Extrinsic rotations with the Euler angles type Y-X-Y
EXT_YXY: QuatEnum_EulerAnglesTypeValue<20>,static EXT_YZY
Extrinsic rotations with the Euler angles type Y-Z-Y
EXT_YZY: QuatEnum_EulerAnglesTypeValue<21>,static EXT_ZXZ
Extrinsic rotations with the Euler angles type Z-X-Z
EXT_ZXZ: QuatEnum_EulerAnglesTypeValue<22>,static EXT_ZYZ
Extrinsic rotations with the Euler angles type Z-Y-Z
EXT_ZYZ: QuatEnum_EulerAnglesTypeValue<23>,static EULER_ANGLES_MAX_VALUE
euler angles max value constant (24), defined by OpenCV for cv::QuatEnum.
EULER_ANGLES_MAX_VALUE: QuatEnum_EulerAnglesTypeValue<24>These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.