26#ifndef OPENCV_CORE_DUALQUATERNION_HPP
27#define OPENCV_CORE_DUALQUATERNION_HPP
29#include <opencv2/core/quaternion.hpp>
30#include <opencv2/core/affine.hpp>
36template <
typename _Tp>
class DualQuat;
37template <
typename _Tp> std::ostream& operator<<(std::ostream&,
const DualQuat<_Tp>&);
145template <
typename _Tp>
147 static_assert(std::is_floating_point<_Tp>::value,
"Dual quaternion only make sense with type of float or double");
148 using value_type = _Tp;
151 static constexpr _Tp CV_DUAL_QUAT_EPS = (_Tp)1.e-6;
158 DualQuat(
const _Tp w,
const _Tp x,
const _Tp y,
const _Tp z,
const _Tp w_,
const _Tp x_,
const _Tp y_,
const _Tp z_);
165 _Tp w, x, y, z, w_, x_, y_, z_;
247 static DualQuat<_Tp> createFromAffine3(
const Affine3<_Tp> &R);
301 template <
typename T>
407 template <
typename T>
438 template <
typename T>
465 template <
typename T>
485 template <
typename T>
500 template <
typename T>
609 static DualQuat<_Tp> gdqblend(InputArray dualquat, InputArray weights,
868 template <
typename T>
883 template <
typename T>
908 template <
typename T>
923 template <
typename T>
938 template <
typename T>
963 template <
typename T>
966 template <
typename S>
967 friend std::ostream& cv::operator<<(std::ostream&,
const DualQuat<S>&);
977#include "dualquaternion.inl.hpp"
Definition: dualquaternion.hpp:146
DualQuat(const _Tp w, const _Tp x, const _Tp y, const _Tp z, const _Tp w_, const _Tp x_, const _Tp y_, const _Tp z_)
create from eight same type numbers.
DualQuat(const Vec< _Tp, 8 > &q)
create from a double or float vector.
DualQuat< _Tp > operator/(const _Tp s) const
Division operator of a dual quaternions and a scalar. It divides left operand with the right operand ...
DualQuat< _Tp > power(const _Tp t, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT) const
return the value of where p is a dual quaternion. This could be calculated as:
DualQuat< _Tp > operator*=(const _Tp s)
Multiplication assignment operator of a quaternions and a scalar. It multiplies right operand with th...
static DualQuat< _Tp > gdqblend(const Vec< DualQuat< _Tp >, cn > &dualquat, InputArray weights, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
The generalized Dual Quaternion linear Blending works for more than two rigid transformations....
DualQuat< _Tp > operator/(const DualQuat< _Tp > &) const
Division operator of two dual quaternions p and q. Divides left hand operand by right hand operand.
Quat< _Tp > & operator/=(const _Tp s)
Division assignment operator of a dual quaternions and a scalar. It divides left operand with the rig...
DualQuat< _Tp > operator-(const DualQuat< _Tp > &) const
Subtraction operator of two dual quaternions p and q. It returns a new dual quaternion that each valu...
DualQuat< _Tp > & operator*=(const DualQuat< _Tp > &)
Multiplication assignment operator of two quaternions. It multiplies right operand with the left oper...
DualQuat< _Tp > power(const DualQuat< _Tp > &q, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT) const
return the value of where p and q are dual quaternions. This could be calculated as:
DualQuat< _Tp > & operator/=(const DualQuat< _Tp > &)
Division assignment operator of two dual quaternions p and q; It divides left operand with the right ...
Template class for small matrices whose type and size are known at compilation time
Definition: matx.hpp:100
Definition: quaternion.hpp:211
Template class for short numerical vectors, a partial case of Matx
Definition: matx.hpp:342
CV_EXPORTS_W void exp(InputArray src, OutputArray dst)
Calculates the exponent of every array element.
CV_EXPORTS_W double norm(InputArray src1, int normType=NORM_L2, InputArray mask=noArray())
Calculates the absolute norm of an array.
CV_EXPORTS_W void log(InputArray src, OutputArray dst)
Calculates the natural logarithm of every array element.
CV_EXPORTS_W void normalize(InputArray src, InputOutputArray dst, double alpha=1, double beta=0, int norm_type=NORM_L2, int dtype=-1, InputArray mask=noArray())
Normalizes the norm or value range of an array.
QuatAssumeType
Unit quaternion flag
Definition: quaternion.hpp:39
@ QUAT_ASSUME_NOT_UNIT
Definition: quaternion.hpp:46
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75
DualQuat< T > inv(const DualQuat< T > &dq, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
Definition: dualquaternion.inl.hpp:187
DualQuat< T > conjugate(const DualQuat< T > &dq)
Definition: dualquaternion.inl.hpp:125
DualQuat< T > power(const DualQuat< T > &dq, const T t, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
Definition: dualquaternion.inl.hpp:358