Visual Servoing Platform
version 3.3.0 under development (2020-02-17)
|
#include <visp3/core/vpRotationMatrix.h>
Public Member Functions | |
vpRotationMatrix () | |
vpRotationMatrix (const vpRotationMatrix &R) | |
vpRotationMatrix (const vpHomogeneousMatrix &M) | |
vpRotationMatrix (const vpThetaUVector &r) | |
vpRotationMatrix (const vpPoseVector &p) | |
vpRotationMatrix (const vpRzyzVector &r) | |
vpRotationMatrix (const vpRxyzVector &r) | |
vpRotationMatrix (const vpRzyxVector &r) | |
vpRotationMatrix (const vpQuaternionVector &q) | |
vpRotationMatrix (const vpMatrix &R) | |
vpRotationMatrix (double tux, double tuy, double tuz) | |
vpRotationMatrix (const std::initializer_list< double > &list) | |
virtual | ~vpRotationMatrix () |
vpRotationMatrix | buildFrom (const vpHomogeneousMatrix &M) |
vpRotationMatrix | buildFrom (const vpThetaUVector &v) |
vpRotationMatrix | buildFrom (const vpPoseVector &p) |
vpRotationMatrix | buildFrom (const vpRzyzVector &v) |
vpRotationMatrix | buildFrom (const vpRxyzVector &v) |
vpRotationMatrix | buildFrom (const vpRzyxVector &v) |
vpRotationMatrix | buildFrom (const vpQuaternionVector &q) |
vpRotationMatrix | buildFrom (double tux, double tuy, double tuz) |
void | eye () |
vpColVector | getCol (unsigned int j) const |
vpThetaUVector | getThetaUVector () |
vpRotationMatrix | inverse () const |
void | inverse (vpRotationMatrix &R) const |
bool | isARotationMatrix () const |
vpRotationMatrix & | operator= (const vpRotationMatrix &R) |
vpRotationMatrix & | operator= (const vpMatrix &M) |
vpRotationMatrix & | operator= (const std::initializer_list< double > &list) |
vpTranslationVector | operator* (const vpTranslationVector &tv) const |
vpRotationMatrix | operator* (const vpRotationMatrix &R) const |
vpMatrix | operator* (const vpMatrix &M) const |
vpColVector | operator* (const vpColVector &v) const |
vpRotationMatrix | operator* (double x) const |
vpRotationMatrix & | operator*= (double x) |
vpRotationMatrix & | operator<< (double val) |
vpRotationMatrix & | operator, (double val) |
void | printVector () |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true) |
vpRotationMatrix | t () const |
bool | operator== (const vpArray2D< float > &A) const |
Deprecated functions | |
vp_deprecated void | init () |
vp_deprecated void | setIdentity () |
Inherited functionalities from vpArray2D | |
unsigned int | getCols () const |
double | getMaxValue () const |
double | getMinValue () const |
unsigned int | getRows () const |
unsigned int | size () const |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true) |
void | reshape (unsigned int nrows, unsigned int ncols) |
bool | operator== (const vpArray2D< double > &A) const |
bool | operator!= (const vpArray2D< double > &A) const |
double * | operator[] (unsigned int i) |
double * | operator[] (unsigned int i) const |
vpArray2D< double > | hadamard (const vpArray2D< double > &m) const |
Static Public Member Functions | |
static vpRotationMatrix | mean (const std::vector< vpHomogeneousMatrix > &vec_M) |
static vpRotationMatrix | mean (const std::vector< vpRotationMatrix > &vec_R) |
Inherited I/O from vpArray2D with Static Public Member Functions | |
static bool | load (const std::string &filename, vpArray2D< double > &A, bool binary=false, char *header=NULL) |
static bool | loadYAML (const std::string &filename, vpArray2D< double > &A, char *header=NULL) |
static bool | save (const std::string &filename, const vpArray2D< double > &A, bool binary=false, const char *header="") |
static bool | saveYAML (const std::string &filename, const vpArray2D< double > &A, const char *header="") |
Public Attributes | |
double * | data |
Protected Attributes | |
unsigned int | m_index |
unsigned int | rowNum |
unsigned int | colNum |
double ** | rowPtrs |
unsigned int | dsize |
Related Functions | |
(Note that these are not member functions.) | |
enum | vpGEMMmethod |
void | vpGEMM (const vpArray2D< double > &A, const vpArray2D< double > &B, const double &alpha, const vpArray2D< double > &C, const double &beta, vpArray2D< double > &D, const unsigned int &ops=0) |
Implementation of a rotation matrix and operations on such kind of matrices.
The vpRotationMatrix considers the particular case of a rotation matrix.
The vpRotationMatrix class is derived from vpArray2D<double>.
The code below shows how to create a rotation matrix, set the element values and access them:
Once build, this previous code produces the following output:
You can also use operator<< to initialize a rotation matrix as previously:
If ViSP is build with c++11 enabled, you can do the same using:
Definition at line 122 of file vpRotationMatrix.h.
vpRotationMatrix::vpRotationMatrix | ( | ) |
Default constructor that initialise a 3-by-3 rotation matrix to identity.
Definition at line 441 of file vpRotationMatrix.cpp.
References eye().
vpRotationMatrix::vpRotationMatrix | ( | const vpRotationMatrix & | M | ) |
Copy contructor that construct a 3-by-3 rotation matrix from another rotation matrix.
Definition at line 447 of file vpRotationMatrix.cpp.
|
explicit |
Construct a 3-by-3 rotation matrix from an homogeneous matrix.
Definition at line 451 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from angle representation.
Definition at line 457 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from a pose vector.
Definition at line 462 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from Euler angle representation.
Definition at line 468 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from Euler angle representation.
Definition at line 474 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from Euler angle representation.
Definition at line 480 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from quaternion angle representation.
Definition at line 499 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from a matrix that contains values corresponding to a rotation matrix.
Definition at line 485 of file vpRotationMatrix.cpp.
vpRotationMatrix::vpRotationMatrix | ( | double | tux, |
double | tuy, | ||
double | tuz | ||
) |
Construct a 3-by-3 rotation matrix from angle representation.
Definition at line 491 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a rotation matrix from a list of 9 double values.
list | : List of double. The following code shows how to use this constructor to initialize a rotation matrix: #include <visp3/core/vpRotationMatrix.h> int main() { #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) vpRotationMatrix R{ 0, 0, -1, 0, -1, 0, -1, 0, 0 }; std::cout << "R:\n" << R << std::endl; #endif } R: 0 0 -1 0 -1 0 -1 0 0 |
Definition at line 525 of file vpRotationMatrix.cpp.
References vpException::fatalError, and isARotationMatrix().
|
inlinevirtual |
Destructor.
Definition at line 144 of file vpRotationMatrix.h.
References operator*(), vpArray2D< Type >::operator<<, and vpArray2D< Type >::operator=().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpHomogeneousMatrix & | M | ) |
Build a rotation matrix from an homogeneous matrix.
Definition at line 638 of file vpRotationMatrix.cpp.
Referenced by buildFrom(), vpRxyzVector::buildFrom(), vpRzyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpExponentialMap::direct(), vpPoseVector::extract(), vpRobotAfma6::setPosition(), and vpRotationMatrix().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpThetaUVector & | v | ) |
Transform a angle representation into a rotation matrix.
The rotation is computed using :
Definition at line 606 of file vpRotationMatrix.cpp.
References vpMath::mcosc(), and vpMath::sinc().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpPoseVector & | p | ) |
Build a rotation matrix from a pose vector.
Definition at line 652 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpRzyzVector & | v | ) |
Transform a vector representing the Euler angle into a rotation matrix. Rzyz( ) = Rot( ) Rot( ) Rot( )
Definition at line 665 of file vpRotationMatrix.cpp.
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpRxyzVector & | v | ) |
Transform a vector representing the Rxyz angle into a rotation matrix. Rxyz( ) = Rot( ) Rot( ) Rot( )
Definition at line 697 of file vpRotationMatrix.cpp.
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpRzyxVector & | v | ) |
Transform a vector representing the Rzyx angle into a rotation matrix. Rxyz( ) = Rot( ) Rot( )Rot( )
Definition at line 727 of file vpRotationMatrix.cpp.
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpQuaternionVector & | q | ) |
Construct a 3-by-3 rotation matrix from a quaternion representation.
Definition at line 767 of file vpRotationMatrix.cpp.
References vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), operator*(), vpQuaternionVector::w(), vpQuaternionVector::x(), vpQuaternionVector::y(), and vpQuaternionVector::z().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | double | tux, |
double | tuy, | ||
double | tuz | ||
) |
Construct a 3-by-3 rotation matrix from angle representation.
Definition at line 757 of file vpRotationMatrix.cpp.
References buildFrom().
void vpRotationMatrix::eye | ( | ) |
Initialize the rotation matrix as identity.
Definition at line 64 of file vpRotationMatrix.cpp.
Referenced by vpHomography::computeDisplacement(), setIdentity(), and vpRotationMatrix().
vpColVector vpRotationMatrix::getCol | ( | unsigned int | j | ) | const |
Extract a column vector from a rotation matrix.
j | : Index of the column to extract. If j=0, the first column is extracted. |
The following example shows how to use this function:
It produces the following output:
Definition at line 842 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpArray2D< double >::getCols(), and vpArray2D< double >::getRows().
|
inlineinherited |
Return the number of columns of the 2D array.
Definition at line 279 of file vpArray2D.h.
References vpArray2D< Type >::colNum, vpArray2D< Type >::getMaxValue(), and vpArray2D< Type >::getMinValue().
Referenced by vpMatrix::cond(), vpRowVector::cppPrint(), vpMatrix::cppPrint(), vpRowVector::csvPrint(), vpMatrix::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), getCol(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), isARotationMatrix(), vpMatrix::kernel(), vpRowVector::maplePrint(), vpMatrix::maplePrint(), vpRowVector::matlabPrint(), vpMatrix::matlabPrint(), vpRowVector::operator*(), vpRowVector::operator+(), vpRowVector::operator+=(), vpRowVector::operator-(), vpRowVector::operator-=(), vpForceTwistMatrix::print(), vpVelocityTwistMatrix::print(), vpRowVector::print(), vpMatrix::print(), vpMatrix::pseudoInverse(), vpMatrix::row(), vpMatrix::svdEigen3(), vpMatrix::svdGsl(), vpMatrix::svdLapack(), and vpMatrix::svdOpenCV().
|
inherited |
Return the array max value.
Definition at line 913 of file vpArray2D.h.
References vpArray2D< Type >::data.
|
inherited |
Return the array min value.
Definition at line 896 of file vpArray2D.h.
References vpArray2D< Type >::data.
|
inlineinherited |
Return the number of rows of the 2D array.
Definition at line 289 of file vpArray2D.h.
References vpArray2D< Type >::rowNum.
Referenced by vpMatrix::column(), vpMatrix::cond(), vpColVector::cppPrint(), vpMatrix::cppPrint(), vpColVector::csvPrint(), vpMatrix::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), getCol(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), isARotationMatrix(), vpMatrix::kernel(), vpColVector::maplePrint(), vpMatrix::maplePrint(), vpColVector::matlabPrint(), vpMatrix::matlabPrint(), vpColVector::operator+(), vpColVector::operator+=(), vpColVector::operator-(), vpColVector::operator-=(), vpForceTwistMatrix::print(), vpVelocityTwistMatrix::print(), vpPoseVector::print(), vpColVector::print(), vpMatrix::print(), vpMatrix::pseudoInverse(), vpMatrix::svdEigen3(), vpMatrix::svdGsl(), vpMatrix::svdLapack(), and vpMatrix::svdOpenCV().
vpThetaUVector vpRotationMatrix::getThetaUVector | ( | ) |
Return the vector that corresponds to the rotation matrix.
Definition at line 808 of file vpRotationMatrix.cpp.
References vpThetaUVector::buildFrom().
Referenced by vpRobotBebop2::setPosition().
Compute the Hadamard product (element wise matrix multiplication).
m | : Second matrix; |
Definition at line 933 of file vpArray2D.h.
References vpArray2D< Type >::colNum, vpArray2D< Type >::data, vpException::dimensionError, vpArray2D< Type >::dsize, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpArray2D< Type >::resize().
|
inline |
Definition at line 217 of file vpRotationMatrix.h.
vpRotationMatrix vpRotationMatrix::inverse | ( | ) | const |
Return the rotation matrix inverse which is also the transpose of the rotation matrix.
Definition at line 557 of file vpRotationMatrix.cpp.
References t().
Referenced by vpViper::get_eJe(), and inverse().
void vpRotationMatrix::inverse | ( | vpRotationMatrix & | R | ) | const |
Inverse the rotation matrix.
R | (output): Inverted rotation matrix. |
Definition at line 581 of file vpRotationMatrix.cpp.
References inverse().
bool vpRotationMatrix::isARotationMatrix | ( | ) | const |
Test if the rotation matrix is really a rotation matrix.
Definition at line 399 of file vpRotationMatrix.cpp.
References vpArray2D< double >::getCols(), vpArray2D< double >::getRows(), vpMath::sqr(), and t().
Referenced by vpHomography::computeDisplacement(), vpHomogeneousMatrix::isAnHomogeneousMatrix(), operator=(), and vpRotationMatrix().
|
inlinestaticinherited |
Load a matrix from a file.
filename | : Absolute file name. |
A | : Array to be loaded |
binary | : If true the matrix is loaded from a binary file, else from a text file. |
header | : Header of the file is loaded in this parameter. |
Definition at line 541 of file vpArray2D.h.
References vpException::badValue, and vpArray2D< Type >::resize().
|
inlinestaticinherited |
Load an array from a YAML-formatted file.
filename | : absolute file name. |
A | : array to be loaded from the file. |
header | : header of the file is loaded in this parameter. |
Definition at line 653 of file vpArray2D.h.
References vpArray2D< Type >::resize().
|
static |
Compute the Euclidean mean of the rotation matrices extracted from a vector of homogeneous matrices following Moakher's method (SIAM 2002).
[in] | vec_M | : Set of homogeneous matrices. |
Definition at line 861 of file vpRotationMatrix.cpp.
References vpMatrix::pseudoInverse(), and vpMatrix::t().
|
static |
Compute the Euclidean mean of the rotation matrices following Moakher's method (SIAM 2002).
[in] | vec_R | : Set of rotation matrices. |
Definition at line 898 of file vpRotationMatrix.cpp.
References vpMatrix::pseudoInverse(), and vpMatrix::t().
Not equal to comparison operator of a 2D array.
Definition at line 994 of file vpArray2D.h.
vpTranslationVector vpRotationMatrix::operator* | ( | const vpTranslationVector & | tv | ) | const |
Multiply a rotation matrix by a translation vector and return the resulting translation vector.
Definition at line 350 of file vpRotationMatrix.cpp.
References vpArray2D< double >::rowPtrs.
Referenced by buildFrom().
vpRotationMatrix vpRotationMatrix::operator* | ( | const vpRotationMatrix & | R | ) | const |
Compute the product between two rotation matrices.
Definition at line 250 of file vpRotationMatrix.cpp.
References vpArray2D< double >::rowPtrs, and vpArray2D< Type >::rowPtrs.
Operator that allows to multiply a rotation matrix by a 3-by-3 matrix. Allows for example to multiply a rotation matrix by a skew matrix.
vpException::dimensionError | : If M is not a 3-by-3 dimension matrix. |
Definition at line 278 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
vpColVector vpRotationMatrix::operator* | ( | const vpColVector & | v | ) | const |
Operator that allows to multiply a rotation matrix by a 3 dimension column vector.
v | : Three dimension column vector. |
vpException::dimensionError | If the column vector v is not a 3 dimension vector. |
The code below shows how to use this operator.
Definition at line 326 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getRows(), vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
vpRotationMatrix vpRotationMatrix::operator* | ( | double | x | ) | const |
Operator that allows to multiply all the elements of a rotation matrix by a scalar.
Definition at line 370 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
vpRotationMatrix & vpRotationMatrix::operator*= | ( | double | x | ) |
Operator that allows to multiply all the elements of a rotation matrix by a scalar.
Definition at line 385 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
vpRotationMatrix & vpRotationMatrix::operator, | ( | double | val | ) |
Set the second and next element of the rotation matrix.
val | : Value of the matrix second or next element. |
The following example shows how to initialize a rotation matrix using this operator.
It produces the following printings:
Definition at line 237 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, m_index, and vpArray2D< double >::size().
vpRotationMatrix & vpRotationMatrix::operator<< | ( | double | val | ) |
Set the first element of the rotation matrix.
val | : Value of the matrix first element. |
The following example shows how to initialize a rotation matrix using this operator.
It produces the following printings:
Definition at line 203 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, and m_index.
vpRotationMatrix & vpRotationMatrix::operator= | ( | const vpRotationMatrix & | R | ) |
Set the current rotation matrix from a rotation matrix R.
R | : Rotation matrix. vpRotationMatrix R2 = R1; |
Definition at line 85 of file vpRotationMatrix.cpp.
References vpArray2D< double >::rowPtrs, and vpArray2D< Type >::rowPtrs.
vpRotationMatrix & vpRotationMatrix::operator= | ( | const vpMatrix & | M | ) |
Converts a 3-by-3 matrix into a rotation matrix.
M | : Input matrix. |
vpException::fatalError | If the input matrix is not a rotation matrix. |
Definition at line 154 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpException::fatalError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and isARotationMatrix().
vpRotationMatrix & vpRotationMatrix::operator= | ( | const std::initializer_list< double > & | list | ) |
Set a rotation matrix from a list of 9 double values.
list | : List of double. The following code shows how to use this constructor to initialize a rotation matrix: #include <visp3/core/vpRotationMatrix.h> int main() { #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) R = { 0, 0, -1, 0, -1, 0, -1, 0, 0 }; std::cout << "R:\n" << R << std::endl; #endif } R: 0 0 -1 0 -1 0 -1 0 0 |
Definition at line 122 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, vpArray2D< double >::dsize, vpException::fatalError, and isARotationMatrix().
Equal to comparison operator of a 2D array.
Definition at line 949 of file vpArray2D.h.
References vpArray2D< Type >::colNum, vpArray2D< Type >::data, vpArray2D< Type >::operator==(), vpArray2D< Type >::rowNum, and vpArray2D< Type >::size().
Definition at line 979 of file vpArray2D.h.
References vpArray2D< Type >::colNum, vpArray2D< Type >::data, vpArray2D< Type >::rowNum, and vpArray2D< Type >::size().
|
inlineinherited |
Set element using A[i][j] = x.
Definition at line 485 of file vpArray2D.h.
|
inlineinherited |
Get element using x = A[i][j].
Definition at line 487 of file vpArray2D.h.
void vpRotationMatrix::printVector | ( | ) |
Print to std::cout the rotation matrix as a angle representation vector.
Definition at line 587 of file vpRotationMatrix.cpp.
|
inlineinherited |
Definition at line 380 of file vpArray2D.h.
References vpException::dimensionError, vpArray2D< Type >::dsize, vpArray2D< Type >::operator!=(), vpArray2D< Type >::operator==(), vpArray2D< Type >::resize(), and vpArray2D< Type >::rowPtrs.
|
inline |
This function is not applicable to a rotation matrix that is always a 3-by-3 matrix.
vpException::fatalError | When this function is called. |
Definition at line 194 of file vpRotationMatrix.h.
References vpException::fatalError.
|
inlineinherited |
Set the size of the array and initialize all the values to zero.
nrows | : number of rows. |
ncols | : number of column. |
flagNullify | : if true, then the array is re-initialized to 0 after resize. If false, the initial values from the common part of the array (common part between old and new version of the array) are kept. Default value is true. |
recopy_ | : if true, will perform an explicit recopy of the old data if needed and if flagNullify is set to false. |
Definition at line 305 of file vpArray2D.h.
References vpArray2D< Type >::colNum, vpArray2D< Type >::dsize, vpException::memoryAllocationError, vpArray2D< Type >::rowNum, and vpArray2D< Type >::rowPtrs.
Referenced by vpMatrix::diag(), vpMatrix::eye(), vpMatrix::init(), vpMatrix::operator,(), vpMatrix::operator<<(), vpMatrix::operator=(), vpMatrix::stack(), and vpMatrix::svdOpenCV().
|
inlinestaticinherited |
Save a matrix to a file.
filename | : Absolute file name. |
A | : Array to be saved. |
binary | : If true the matrix is saved in a binary file, else a text file. |
header | : Optional line that will be saved at the beginning of the file. |
Warning : If you save the matrix as in a text file the precision is less than if you save it in a binary file.
Definition at line 738 of file vpArray2D.h.
References vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
|
inlinestaticinherited |
Save an array in a YAML-formatted file.
filename | : absolute file name. |
A | : array to be saved in the file. |
header | : optional lines that will be saved at the beginning of the file. Should be YAML-formatted and will adapt to the indentation if any. |
Here is an example of outputs.
Content of matrix.yml:
Content of matrixIndent.yml:
Definition at line 831 of file vpArray2D.h.
References vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
void vpRotationMatrix::setIdentity | ( | ) |
Initializes the rotation matrix as identity.
Definition at line 935 of file vpRotationMatrix.cpp.
References eye().
|
inlineinherited |
Return the number of elements of the 2D array.
Definition at line 291 of file vpArray2D.h.
References vpArray2D< Type >::rowNum.
Referenced by vpRowVector::insert(), vpColVector::insert(), vpColVector::operator*(), vpRotationVector::operator,(), vpTranslationVector::operator,(), operator,(), vpQuaternionVector::operator=(), vpTranslationVector::operator=(), vpRxyzVector::operator=(), vpRzyzVector::operator=(), vpRzyxVector::operator=(), vpThetaUVector::operator=(), vpMatrix::stack(), vpRotationVector::toStdVector(), vpRowVector::toStdVector(), and vpColVector::toStdVector().
vpRotationMatrix vpRotationMatrix::t | ( | ) | const |
Return the rotation matrix transpose which is also the inverse of the rotation matrix.
Definition at line 539 of file vpRotationMatrix.cpp.
Referenced by vpHomography::computeDisplacement(), vpVelocityTwistMatrix::extract(), inverse(), vpHomogeneousMatrix::inverse(), vpVelocityTwistMatrix::inverse(), isARotationMatrix(), and vpSimulatorAfma6::setPosition().
|
related |
This function performs generalized matrix multiplication: D = alpha*op(A)*op(B) + beta*op(C), where op(X) is X or X^T. Operation on A, B and C matrices is described by enumeration vpGEMMmethod().
For example, to compute D = alpha*A^T*B^T+beta*C we need to call :
If C is not used, vpGEMM must be called using an empty array null. Thus to compute D = alpha*A^T*B, we have to call:
vpException::incorrectMatrixSizeError | if the sizes of the matrices do not allow the operations. |
A | : An array that could be a vpMatrix. |
B | : An array that could be a vpMatrix. |
alpha | : A scalar. |
C | : An array that could be a vpMatrix. |
beta | : A scalar. |
D | : The resulting array that could be a vpMatrix. |
ops | : A scalar describing operation applied on the matrices. Possible values are the one defined in vpGEMMmethod(): VP_GEMM_A_T, VP_GEMM_B_T, VP_GEMM_C_T. |
Definition at line 393 of file vpGEMM.h.
References vpException::functionNotImplementedError.
|
related |
Enumeration of the operations applied on matrices in vpGEMM() function.
Operations are :
|
protectedinherited |
Number of columns in the array.
Definition at line 137 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpColVector::clear(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLUGsl(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::expm(), vpMatrix::eye(), vpMatrix::getDiag(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpRowVector::insert(), vpMatrix::insert(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLUGsl(), vpMatrix::inverseByLULapack(), vpMatrix::inverseByLUOpenCV(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), operator*(), vpRowVector::operator*(), vpMatrix::operator*(), operator*=(), vpRowVector::operator*=(), vpMatrix::operator*=(), vpRowVector::operator+(), vpRowVector::operator+=(), vpMatrix::operator+=(), vpRowVector::operator,(), vpMatrix::operator,(), vpRowVector::operator-(), vpRowVector::operator-=(), vpMatrix::operator-=(), vpRowVector::operator/(), vpMatrix::operator/(), vpRowVector::operator/=(), vpMatrix::operator/=(), vpMatrix::operator<<(), vpColVector::operator<<(), vpSubRowVector::operator=(), vpSubMatrix::operator=(), vpRowVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpRowVector::operator==(), vpColVector::operator==(), vpMatrix::qr(), vpMatrix::qrPivot(), vpRowVector::reshape(), vpMatrix::setIdentity(), vpMatrix::solveByQR(), vpMatrix::solveBySVD(), vpMatrix::stack(), vpRowVector::stack(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpRowVector::sum(), vpMatrix::sum(), vpRowVector::sumSquare(), vpMatrix::sumSquare(), vpRowVector::t(), vpMatrix::transpose(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().
|
inherited |
Address of the first element of the data array.
Definition at line 145 of file vpArray2D.h.
Referenced by vpMatrix::AtA(), vpQuaternionVector::buildFrom(), vpHomogeneousMatrix::buildFrom(), vpThetaUVector::buildFrom(), vpRzyzVector::buildFrom(), vpRxyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpSubColVector::checkParentStatus(), vpSubRowVector::checkParentStatus(), vpSubMatrix::checkParentStatus(), vpColVector::clear(), vpHomogeneousMatrix::convert(), vpMatrix::detByLUEigen3(), vpMatrix::detByLUOpenCV(), vpMatrix::expm(), vpThetaUVector::extract(), vpMatrix::frobeniusNorm(), vpMatrix::getRow(), vpThetaUVector::getTheta(), vpThetaUVector::getU(), vpColVector::hadamard(), vpMatrix::hadamard(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpColVector::insert(), vpMatrix::insert(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLUOpenCV(), vpTranslationVector::operator*(), vpRowVector::operator*(), vpHomography::operator*(), vpColVector::operator*(), vpMatrix::operator*(), vpRotationVector::operator,(), vpTranslationVector::operator,(), operator,(), vpRowVector::operator,(), vpColVector::operator,(), vpTranslationVector::operator-(), vpRowVector::operator-(), vpColVector::operator-(), vpTranslationVector::operator/(), vpRowVector::operator/(), vpHomography::operator/(), vpColVector::operator/(), vpHomography::operator/=(), vpRotationVector::operator<<(), vpTranslationVector::operator<<(), operator<<(), vpRowVector::operator<<(), vpColVector::operator<<(), vpSubColVector::operator=(), vpSubRowVector::operator=(), vpQuaternionVector::operator=(), vpTranslationVector::operator=(), operator=(), vpRxyzVector::operator=(), vpRzyzVector::operator=(), vpRzyxVector::operator=(), vpRowVector::operator=(), vpThetaUVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpRowVector::operator==(), vpColVector::operator==(), vpColVector::operator[](), vpMatrix::qr(), vpMatrix::qrPivot(), vpRowVector::reshape(), vpColVector::reshape(), vpQuaternionVector::set(), vpMatrix::stack(), vpMatrix::stackRows(), vpColVector::sum(), vpColVector::sumSquare(), vpMatrix::svdEigen3(), vpMatrix::svdGsl(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpRotationVector::t(), vpTranslationVector::t(), vpPoseVector::t(), vpRowVector::t(), vpColVector::t(), vpRotationVector::toStdVector(), vpRowVector::toStdVector(), vpColVector::toStdVector(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), vpRowVector::vpRowVector(), vpQuaternionVector::w(), vpQuaternionVector::x(), vpQuaternionVector::y(), vpQuaternionVector::z(), vpSubColVector::~vpSubColVector(), vpSubMatrix::~vpSubMatrix(), and vpSubRowVector::~vpSubRowVector().
|
protectedinherited |
Current array size (rowNum * colNum)
Definition at line 141 of file vpArray2D.h.
Referenced by vpColVector::clear(), vpMatrix::frobeniusNorm(), vpColVector::hadamard(), vpMatrix::hadamard(), vpMatrix::inducedL2Norm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpRotationVector::operator*(), vpTranslationVector::operator*(), vpTranslationVector::operator-(), vpTranslationVector::operator/(), operator=(), vpRzyzVector::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpThetaUVector::operator=(), vpRowVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpRowVector::reshape(), vpColVector::reshape(), vpRotationVector::t(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().
|
protected |
Definition at line 229 of file vpRotationMatrix.h.
Referenced by operator,(), and operator<<().
|
protectedinherited |
Number of rows in the array.
Definition at line 135 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpColVector::clear(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLUGsl(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::expm(), vpColVector::extract(), vpMatrix::eye(), vpMatrix::getCol(), vpMatrix::getDiag(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpColVector::infinityNorm(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpMatrix::insert(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLUGsl(), vpMatrix::inverseByLULapack(), vpMatrix::inverseByLUOpenCV(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpTranslationVector::operator*(), operator*(), vpHomogeneousMatrix::operator*(), vpColVector::operator*(), vpMatrix::operator*(), vpTranslationVector::operator*=(), operator*=(), vpColVector::operator*=(), vpMatrix::operator*=(), vpColVector::operator+(), vpColVector::operator+=(), vpMatrix::operator+=(), vpColVector::operator,(), vpColVector::operator-(), vpColVector::operator-=(), vpMatrix::operator-=(), vpColVector::operator/(), vpMatrix::operator/(), vpTranslationVector::operator/=(), vpColVector::operator/=(), vpMatrix::operator/=(), vpMatrix::operator<<(), vpColVector::operator<<(), vpSubColVector::operator=(), vpSubRowVector::operator=(), vpSubMatrix::operator=(), vpTranslationVector::operator=(), vpRowVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpRowVector::operator==(), vpColVector::operator==(), vpMatrix::qr(), vpMatrix::qrPivot(), vpColVector::reshape(), vpMatrix::setIdentity(), vpMatrix::stack(), vpColVector::stack(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpColVector::sum(), vpMatrix::sum(), vpRotationVector::sumSquare(), vpTranslationVector::sumSquare(), vpColVector::sumSquare(), vpMatrix::sumSquare(), vpTranslationVector::t(), vpPoseVector::t(), vpColVector::t(), vpMatrix::transpose(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().
|
protectedinherited |
Address of the first element of each rows.
Definition at line 139 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpColVector::clear(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubRowVector::init(), vpSubMatrix::init(), vpRowVector::init(), vpColVector::init(), vpMatrix::init(), operator*(), vpForceTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpHomogeneousMatrix::operator*(), vpMatrix::operator*(), operator*=(), vpMatrix::operator*=(), vpMatrix::operator+=(), vpMatrix::operator,(), vpMatrix::operator-=(), vpMatrix::operator/(), vpMatrix::operator/=(), vpMatrix::operator<<(), vpColVector::operator<<(), vpSubMatrix::operator=(), operator=(), vpForceTwistMatrix::operator=(), vpHomogeneousMatrix::operator=(), vpVelocityTwistMatrix::operator=(), vpRowVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::stack(), vpMatrix::stackColumns(), vpRowVector::sum(), vpMatrix::sum(), vpRotationVector::sumSquare(), vpTranslationVector::sumSquare(), vpRowVector::sumSquare(), vpMatrix::sumSquare(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().