EstervQrCode 1.1.1
Library for qr code manipulation
Modules | Classes | Typedefs | Enumerations | Functions
Core functionality

Modules

 Basic structures
 
 Operations on arrays
 
 Asynchronous API
 
 XML/YAML Persistence
 
 Clustering
 
 Utility and system functions and macros
 
 OpenGL interoperability
 
 Intel IPP Asynchronous C/C++ Converters
 
 Optimization Algorithms
 
 DirectX interoperability
 
 Eigen support
 
 OpenCL support
 
 Intel VA-API/OpenCL (CL-VA) interoperability
 
 Hardware Acceleration Layer
 
 Parallel Processing
 

Classes

class  cv::BufferPoolController
 
class  cv::DualQuat< _Tp >
 
class  cv::QuatEnum
 
class  cv::Quat< _Tp >
 

Typedefs

using cv::DualQuatd = DualQuat< double >
 
using cv::DualQuatf = DualQuat< float >
 
using cv::Quatd = Quat< double >
 
using cv::Quatf = Quat< float >
 

Enumerations

enum  cv::QuatAssumeType { cv::QUAT_ASSUME_NOT_UNIT , cv::QUAT_ASSUME_UNIT }
 Unit quaternion flag. More...
 
enum  cv::CovarFlags {
  cv::COVAR_SCRAMBLED = 0 , cv::COVAR_NORMAL = 1 , cv::COVAR_USE_AVG = 2 , cv::COVAR_SCALE = 4 ,
  cv::COVAR_ROWS = 8 , cv::COVAR_COLS = 16
}
 Covariation flags. More...
 

Functions

template<typename _Tp >
std::ostreamcv::operator<< (std::ostream &, const DualQuat< _Tp > &)
 
template<typename _Tp >
std::ostreamcv::operator<< (std::ostream &, const Quat< _Tp > &)
 
template<typename T >
Quat< Tcv::inv (const Quat< T > &q, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
 
template<typename T >
Quat< Tcv::sinh (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::cosh (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::tanh (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::sin (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::cos (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::tan (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::asinh (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::acosh (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::atanh (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::asin (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::acos (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::atan (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::power (const Quat< T > &q, const Quat< T > &p, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
 
template<typename T >
Quat< Tcv::exp (const Quat< T > &q)
 
template<typename T >
Quat< Tcv::log (const Quat< T > &q, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
 
template<typename T >
Quat< Tcv::power (const Quat< T > &q, const T x, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
 
template<typename T >
Quat< Tcv::crossProduct (const Quat< T > &p, const Quat< T > &q)
 
template<typename S >
Quat< S > cv::sqrt (const Quat< S > &q, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
 
template<typename T >
Quat< Tcv::operator* (const T, const Quat< T > &)
 
template<typename T >
Quat< Tcv::operator* (const Quat< T > &, const T)
 
template<typename S >
std::ostreamcv::operator<< (std::ostream &, const Quat< S > &)
 
CV_EXPORTS void cv::swap (Mat &a, Mat &b)
 Swaps two matrices. More...
 
CV_EXPORTS void cv::swap (UMat &a, UMat &b)
 

Detailed Description

Typedef Documentation

◆ DualQuatd

using cv::DualQuatd = typedef DualQuat<double>

◆ DualQuatf

using cv::DualQuatf = typedef DualQuat<float>

◆ Quatd

using cv::Quatd = typedef Quat<double>

◆ Quatf

using cv::Quatf = typedef Quat<float>

Enumeration Type Documentation

◆ CovarFlags

Covariation flags.

Enumerator
COVAR_SCRAMBLED 

The output covariance matrix is calculated as:

\[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...],\]

The covariance matrix will be nsamples x nsamples. Such an unusual covariance matrix is used for fast PCA of a set of very large vectors (see, for example, the EigenFaces technique for face recognition). Eigenvalues of this "scrambled" matrix match the eigenvalues of the true covariance matrix. The "true" eigenvectors can be easily calculated from the eigenvectors of the "scrambled" covariance matrix.

COVAR_NORMAL 

The output covariance matrix is calculated as:

\[\texttt{scale} \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...] \cdot [ \texttt{vects} [0]- \texttt{mean} , \texttt{vects} [1]- \texttt{mean} ,...]^T,\]

covar will be a square matrix of the same size as the total number of elements in each input vector. One and only one of COVAR_SCRAMBLED and COVAR_NORMAL must be specified.

COVAR_USE_AVG 

If the flag is specified, the function does not calculate mean from the input vectors but, instead, uses the passed mean vector. This is useful if mean has been pre-calculated or known in advance, or if the covariance matrix is calculated by parts. In this case, mean is not a mean vector of the input sub-set of vectors but rather the mean vector of the whole set.

COVAR_SCALE 

If the flag is specified, the covariance matrix is scaled. In the "normal" mode, scale is 1./nsamples . In the "scrambled" mode, scale is the reciprocal of the total number of elements in each input vector. By default (if the flag is not specified), the covariance matrix is not scaled ( scale=1 ).

COVAR_ROWS 

If the flag is specified, all the input vectors are stored as rows of the samples matrix. mean should be a single-row vector in this case.

COVAR_COLS 

If the flag is specified, all the input vectors are stored as columns of the samples matrix. mean should be a single-column vector in this case.

◆ QuatAssumeType

Unit quaternion flag.

Enumerator
QUAT_ASSUME_NOT_UNIT 

This flag is specified by default. If this flag is specified, the input quaternions are assumed to be not unit quaternions. It can guarantee the correctness of the calculations, although the calculation speed will be slower than the flag QUAT_ASSUME_UNIT.

QUAT_ASSUME_UNIT 

If this flag is specified, the input quaternions are assumed to be unit quaternions which will save some computations. However, if this flag is specified without unit quaternion, the program correctness of the result will not be guaranteed.

Function Documentation

◆ acos()

template<typename T >
Quat<T> cv::acos ( const Quat< T > &  q)

\[\arccos(q) = -\frac{\boldsymbol{v}}{||\boldsymbol{v}||}arccosh(q)\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
acos(q);
Quat< T > acos(const Quat< T > &q)
Quat< double > Quatd
Definition: quaternion.hpp:1688

◆ acosh()

template<typename T >
Quat<T> cv::acosh ( const Quat< T > &  q)

\[arccosh(q) = \ln(q + \sqrt{q^2 - 1})\]

.

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
acosh(q);
Quat< T > acosh(const Quat< T > &q)

◆ asin()

template<typename T >
Quat<T> cv::asin ( const Quat< T > &  q)

\[\arcsin(q) = -\frac{\boldsymbol{v}}{||\boldsymbol{v}||}arcsinh(q\frac{\boldsymbol{v}}{||\boldsymbol{v}||})\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
asin(q);
Quat< T > asin(const Quat< T > &q)

◆ asinh()

template<typename T >
Quat<T> cv::asinh ( const Quat< T > &  q)

\[arcsinh(q) = \ln(q + \sqrt{q^2 + 1})\]

.

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
asinh(q);
Quat< T > asinh(const Quat< T > &q)

◆ atan()

template<typename T >
Quat<T> cv::atan ( const Quat< T > &  q)

\[\arctan(q) = -\frac{\boldsymbol{v}}{||\boldsymbol{v}||}arctanh(q\frac{\boldsymbol{v}}{||\boldsymbol{v}||})\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
atan(q);
Quat< T > atan(const Quat< T > &q)

◆ atanh()

template<typename T >
Quat<T> cv::atanh ( const Quat< T > &  q)

\[arctanh(q) = \frac{\ln(q + 1) - \ln(1 - q)}{2}\]

.

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
atanh(q);
Quat< T > atanh(const Quat< T > &q)

◆ cos()

template<typename T >
Quat<T> cv::cos ( const Quat< T > &  q)

\[\cos(p) = \cos(w) * \cosh(||\boldsymbol{v}||) - \sin(w)\frac{\boldsymbol{v}}{||\boldsymbol{v}||}\sinh(||\boldsymbol{v}||)\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
cos(q);
Quat< T > cos(const Quat< T > &q)

◆ cosh()

template<typename T >
Quat<T> cv::cosh ( const Quat< T > &  q)

\[\cosh(p) = \cosh(w) * \cos(||\boldsymbol{v}||) + \sinh(w)\frac{\boldsymbol{v}}{||\boldsymbol{v}||}\sin(||\boldsymbol{v}||)\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
cosh(q);
Quat< T > cosh(const Quat< T > &q)

◆ crossProduct()

template<typename T >
Quat<T> cv::crossProduct ( const Quat< T > &  p,
const Quat< T > &  q 
)

\[p \times q = \frac{pq- qp}{2}\]

\[p \times q = \boldsymbol{u} \times \boldsymbol{v}\]

\[p \times q = (cz-dy)i + (dx-bz)j + (by-xc)k \]

For example

Quatd q{1,2,3,4};
Quatd p{5,6,7,8};
Quat< T > crossProduct(const Quat< T > &p, const Quat< T > &q)

◆ exp()

template<typename T >
Quat<T> cv::exp ( const Quat< T > &  q)

\[\exp(q) = e^w (\cos||\boldsymbol{v}||+ \frac{v}{||\boldsymbol{v}||})\sin||\boldsymbol{v}||\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example:

Quatd q{1,2,3,4};
cout << exp(q) << endl;
DualQuat< T > exp(const DualQuat< T > &dq)
Definition: dualquaternion.inl.hpp:312
QTextStream & endl(QTextStream &stream)

◆ inv()

template<typename T >
Quat<T> cv::inv ( const Quat< T > &  q,
QuatAssumeType  assumeUnit = QUAT_ASSUME_NOT_UNIT 
)
Parameters
qa quaternion.
assumeUnitif QUAT_ASSUME_UNIT, quaternion q assume to be a unit quaternion and this function will save some computations.

For example

Quatd q(1,2,3,4);
inv(q);
q = q.normalize();
inv(q, assumeUnit);//This assumeUnit means p is a unit quaternion
QuatAssumeType
Unit quaternion flag.
Definition: quaternion.hpp:39
@ QUAT_ASSUME_UNIT
Definition: quaternion.hpp:52
DualQuat< T > inv(const DualQuat< T > &dq, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
Definition: dualquaternion.inl.hpp:187

◆ log()

template<typename T >
Quat<T> cv::log ( const Quat< T > &  q,
QuatAssumeType  assumeUnit = QUAT_ASSUME_NOT_UNIT 
)

\[\ln(q) = \ln||q|| + \frac{\boldsymbol{v}}{||\boldsymbol{v}||}\arccos\frac{w}{||q||}.\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.
assumeUnitif QUAT_ASSUME_UNIT, q assume to be a unit quaternion and this function will save some computations.

For example

Quatd q1{1,2,3,4};
cout << log(q1) << endl;
DualQuat< T > log(const DualQuat< T > &dq, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
Definition: dualquaternion.inl.hpp:344

◆ operator*() [1/2]

template<typename T >
Quat<T> cv::operator* ( const Quat< T > &  ,
const  T 
)

◆ operator*() [2/2]

template<typename T >
Quat<T> cv::operator* ( const  T,
const Quat< T > &   
)

◆ operator<<() [1/3]

template<typename _Tp >
std::ostream& cv::operator<< ( std::ostream ,
const DualQuat< _Tp > &   
)

◆ operator<<() [2/3]

template<typename _Tp >
std::ostream& cv::operator<< ( std::ostream ,
const Quat< _Tp > &   
)

◆ operator<<() [3/3]

template<typename S >
std::ostream& cv::operator<< ( std::ostream ,
const Quat< S > &   
)

◆ power() [1/2]

template<typename T >
Quat<T> cv::power ( const Quat< T > &  q,
const Quat< T > &  p,
QuatAssumeType  assumeUnit = QUAT_ASSUME_NOT_UNIT 
)

\[p^q = e^{q\ln(p)}.\]

Parameters
pbase quaternion of power function.
qindex quaternion of power function.
assumeUnitif QUAT_ASSUME_UNIT, quaternion $p$ assume to be a unit quaternion and this function will save some computations.

For example

Quatd p(1,2,3,4);
Quatd q(5,6,7,8);
power(p, q);
p = p.normalize();
power(p, q, assumeUnit); //This assumeUnit means p is a unit quaternion
DualQuat< T > power(const DualQuat< T > &dq, const T t, QuatAssumeType assumeUnit=QUAT_ASSUME_NOT_UNIT)
Definition: dualquaternion.inl.hpp:358

◆ power() [2/2]

template<typename T >
Quat<T> cv::power ( const Quat< T > &  q,
const T  x,
QuatAssumeType  assumeUnit = QUAT_ASSUME_NOT_UNIT 
)

\[q^x = ||q||(cos(x\theta) + \boldsymbol{u}sin(x\theta))).\]

Parameters
qa quaternion.
xindex of exponentiation.
assumeUnitif QUAT_ASSUME_UNIT, quaternion q assume to be a unit quaternion and this function will save some computations.

For example

Quatd q(1,2,3,4);
power(q, 2.0);
double angle = CV_PI;
Vec3d axis{0, 0, 1};
Quatd q1 = Quatd::createFromAngleAxis(angle, axis); //generate a unit quat by axis and angle
power(q1, 2.0, assumeUnit);//This assumeUnit means q1 is a unit quaternion.
static Quat< _Tp > createFromAngleAxis(const _Tp angle, const Vec< _Tp, 3 > &axis)
from an angle, axis. Axis will be normalized in this function. And it generates
Vec< double, 3 > Vec3d
Definition: matx.hpp:464
const CvArr * angle
Definition: core_c.h:1194
#define CV_PI
Definition: cvdef.h:380
Note
the type of the index should be the same as the quaternion.

◆ sin()

template<typename T >
Quat<T> cv::sin ( const Quat< T > &  q)

\[\sin(p) = \sin(w) * \cosh(||\boldsymbol{v}||) + \cos(w)\frac{\boldsymbol{v}}{||\boldsymbol{v}||}\sinh(||\boldsymbol{v}||)\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
sin(q);
Quat< T > sin(const Quat< T > &q)

◆ sinh()

template<typename T >
Quat<T> cv::sinh ( const Quat< T > &  q)

\[\sinh(p) = \sin(w)\cos(||\boldsymbol{v}||) + \cosh(w)\frac{v}{||\boldsymbol{v}||}\sin||\boldsymbol{v}||\]

where $\boldsymbol{v} = [x, y, z].$

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
sinh(q);
Quat< T > sinh(const Quat< T > &q)

◆ sqrt()

template<typename S >
Quat<S> cv::sqrt ( const Quat< S > &  q,
QuatAssumeType  assumeUnit = QUAT_ASSUME_NOT_UNIT 
)

◆ swap() [1/2]

CV_EXPORTS void cv::swap ( Mat a,
Mat b 
)

Swaps two matrices.

◆ swap() [2/2]

CV_EXPORTS void cv::swap ( UMat a,
UMat b 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ tan()

template<typename T >
Quat<T> cv::tan ( const Quat< T > &  q)

\[\tan(q) = \frac{\sin(q)}{\cos(q)}.\]

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
tan(q);
Quat< T > tan(const Quat< T > &q)

◆ tanh()

template<typename T >
Quat<T> cv::tanh ( const Quat< T > &  q)

\[ \tanh(q) = \frac{\sinh(q)}{\cosh(q)}.\]

Parameters
qa quaternion.

For example

Quatd q(1,2,3,4);
tanh(q);
Quat< T > tanh(const Quat< T > &q)
See also
sinh, cosh