![]() |
Visual Servoing Platform version 3.6.0
|
#include <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 (double threshold=1e-6) 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 |
vpHomogeneousMatrix | operator* (const vpHomogeneousMatrix &M) 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 | orthogonalize () |
void | printVector () |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true) |
vpRotationMatrix | t () const |
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) |
void | insert (const vpArray2D< double > &A, unsigned int r, unsigned int c) |
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) |
Public Attributes | |
double * | data |
Protected Attributes | |
unsigned int | rowNum |
unsigned int | colNum |
double ** | rowPtrs |
unsigned int | dsize |
Related Symbols | |
(Note that these are not member symbols.) | |
enum | vpGEMMmethod |
bool | operator== (const vpArray2D< double > &A) const |
bool | operator== (const vpArray2D< float > &A) const |
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) |
Deprecated functions | |
unsigned int | m_index |
vp_deprecated void | init () |
vp_deprecated void | setIdentity () |
Inherited I/O from vpArray2D with Static Public Member Functions | |
vpArray2D< double > | insert (const vpArray2D< double > &A, const vpArray2D< double > &B, unsigned int r, unsigned int c) |
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="") |
static vpArray2D< double > | conv2 (const vpArray2D< double > &M, const vpArray2D< double > &kernel, const std::string &mode) |
static void | conv2 (const vpArray2D< double > &M, const vpArray2D< double > &kernel, vpArray2D< double > &res, const std::string &mode) |
static void | insert (const vpArray2D< double > &A, const vpArray2D< double > &B, vpArray2D< double > &C, unsigned int r, unsigned int c) |
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 117 of file vpRotationMatrix.h.
vpRotationMatrix::vpRotationMatrix | ( | ) |
Default constructor that initialise a 3-by-3 rotation matrix to identity.
Definition at line 478 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 484 of file vpRotationMatrix.cpp.
|
explicit |
Construct a 3-by-3 rotation matrix from an homogeneous matrix.
Definition at line 489 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from
Definition at line 495 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from a pose vector.
Definition at line 500 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from
Definition at line 506 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from
Definition at line 515 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from
Definition at line 521 of file vpRotationMatrix.cpp.
References buildFrom().
|
explicit |
Construct a 3-by-3 rotation matrix from quaternion angle representation.
Definition at line 540 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 526 of file vpRotationMatrix.cpp.
vpRotationMatrix::vpRotationMatrix | ( | double | tux, |
double | tuy, | ||
double | tuz ) |
Construct a 3-by-3 rotation matrix from
Definition at line 532 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 566 of file vpRotationMatrix.cpp.
References vpException::fatalError, isARotationMatrix(), and orthogonalize().
|
inlinevirtual |
Destructor.
Definition at line 139 of file vpRotationMatrix.h.
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpHomogeneousMatrix & | M | ) |
Build a rotation matrix from an homogeneous matrix.
Definition at line 685 of file vpRotationMatrix.cpp.
Referenced by buildFrom(), buildFrom(), vpRxyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyzVector::buildFrom(), vpExponentialMap::direct(), vpPoseVector::extract(), vpRobotAfma6::setPosition(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), and vpRotationMatrix().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpPoseVector & | p | ) |
Build a rotation matrix from a pose vector.
Definition at line 699 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpQuaternionVector & | q | ) |
Construct a 3-by-3 rotation matrix from a quaternion representation.
Definition at line 814 of file vpRotationMatrix.cpp.
References vpQuaternionVector::w(), vpQuaternionVector::x(), vpQuaternionVector::y(), and vpQuaternionVector::z().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpRxyzVector & | v | ) |
Transform a vector representing the Rxyz angle into a rotation matrix. Rxyz(
Definition at line 744 of file vpRotationMatrix.cpp.
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpRzyxVector & | v | ) |
Transform a vector representing the Rzyx angle into a rotation matrix. Rxyz(
Definition at line 774 of file vpRotationMatrix.cpp.
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpRzyzVector & | v | ) |
Transform a vector representing the Euler angle into a rotation matrix. Rzyz(
Definition at line 712 of file vpRotationMatrix.cpp.
vpRotationMatrix vpRotationMatrix::buildFrom | ( | const vpThetaUVector & | v | ) |
Transform a
The rotation is computed using :
Definition at line 654 of file vpRotationMatrix.cpp.
References vpMath::mcosc(), and vpMath::sinc().
vpRotationMatrix vpRotationMatrix::buildFrom | ( | double | tux, |
double | tuy, | ||
double | tuz ) |
Construct a 3-by-3 rotation matrix from
Definition at line 804 of file vpRotationMatrix.cpp.
References buildFrom().
|
staticinherited |
Perform a 2D convolution similar to Matlab conv2 function:
M | : First matrix. |
kernel | : Second matrix. |
mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 954 of file vpArray2D.h.
|
staticinherited |
Perform a 2D convolution similar to Matlab conv2 function:
M | : First array. |
kernel | : Second array. |
res | : Result. |
mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 968 of file vpArray2D.h.
void vpRotationMatrix::eye | ( | ) |
Initialize the rotation matrix as identity.
Definition at line 60 of file vpRotationMatrix.cpp.
Referenced by 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 889 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 280 of file vpArray2D.h.
Referenced by vpMatrix::cond(), vpMatrix::cppPrint(), vpRowVector::cppPrint(), vpMatrix::csvPrint(), vpRowVector::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), isARotationMatrix(), vpMatrix::kernel(), vpMatrix::maplePrint(), vpRowVector::maplePrint(), vpMatrix::matlabPrint(), vpRowVector::matlabPrint(), vpMatrix::nullSpace(), vpMatrix::nullSpace(), vpRowVector::operator*(), vpRowVector::operator+(), vpRowVector::operator+=(), vpRowVector::operator-(), vpRowVector::operator-=(), vpForceTwistMatrix::print(), vpMatrix::print(), vpRowVector::print(), vpVelocityTwistMatrix::print(), vpMatrix::row(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), and vpMatrix::svdOpenCV().
|
inherited |
Return the array max value.
Definition at line 282 of file vpArray2D.h.
|
inherited |
Return the array min value.
Definition at line 284 of file vpArray2D.h.
|
inlineinherited |
Return the number of rows of the 2D array.
Definition at line 290 of file vpArray2D.h.
Referenced by vpMatrix::column(), vpMatrix::cond(), vpColVector::cppPrint(), vpMatrix::cppPrint(), vpColVector::csvPrint(), vpMatrix::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), isARotationMatrix(), vpMatrix::kernel(), vpColVector::maplePrint(), vpMatrix::maplePrint(), vpColVector::matlabPrint(), vpMatrix::matlabPrint(), vpMatrix::nullSpace(), vpMatrix::nullSpace(), vpColVector::operator+(), vpColVector::operator+(), vpColVector::operator+=(), vpColVector::operator-(), vpColVector::operator-=(), vpColVector::print(), vpForceTwistMatrix::print(), vpMatrix::print(), vpPoseVector::print(), vpVelocityTwistMatrix::print(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), and vpMatrix::svdOpenCV().
vpThetaUVector vpRotationMatrix::getThetaUVector | ( | ) |
Return the
Definition at line 855 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 554 of file vpArray2D.h.
|
inline |
Definition at line 214 of file vpRotationMatrix.h.
|
inherited |
Insert array B in array A at the given position.
A | : Main array. |
B | : Array to insert. |
r | : Index of the row where to add the array. |
c | : Index of the column where to add the array. |
Definition at line 982 of file vpArray2D.h.
|
inlineinherited |
Insert array A at the given position in the current array.
A | : The array to insert. |
r | : The index of the row to begin to insert data. |
c | : The index of the column to begin to insert data. |
Definition at line 417 of file vpArray2D.h.
vpRotationMatrix vpRotationMatrix::inverse | ( | ) | const |
Return the rotation matrix inverse which is also the transpose of the rotation matrix.
Definition at line 605 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 629 of file vpRotationMatrix.cpp.
References inverse().
bool vpRotationMatrix::isARotationMatrix | ( | double | threshold = 1e-6 | ) | const |
Test if the rotation matrix is really a rotation matrix.
Definition at line 432 of file vpRotationMatrix.cpp.
References vpArray2D< double >::getCols(), vpArray2D< double >::getRows(), vpMath::sqr(), and t().
Referenced by vpHomogeneousMatrix::isAnHomogeneousMatrix(), operator=(), 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 582 of file vpArray2D.h.
|
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 696 of file vpArray2D.h.
|
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 909 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 947 of file vpRotationMatrix.cpp.
References vpMatrix::pseudoInverse(), and vpMatrix::t().
|
inherited |
Not equal to comparison operator of a 2D array.
Definition at line 442 of file vpArray2D.h.
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 356 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getRows(), vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
vpHomogeneousMatrix vpRotationMatrix::operator* | ( | const vpHomogeneousMatrix & | M | ) | const |
Operator that allows to multiply a rotation matrix by a homogeneous matrix.
[in] | M | : Homogeneous matrix. |
M
.The following snippet shows how to use this method:
Definition at line 322 of file vpRotationMatrix.cpp.
References vpHomogeneousMatrix::getRotationMatrix(), and vpHomogeneousMatrix::getTranslationVector().
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.
[in] | M | : 3-by-3 matrix. |
M
. vpException::dimensionError | : If M is not a 3-by-3 dimension matrix. |
The following snippet shows how to use this method:
Definition at line 289 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
vpRotationMatrix vpRotationMatrix::operator* | ( | const vpRotationMatrix & | R | ) | const |
Compute the product between two rotation matrices.
Definition at line 257 of file vpRotationMatrix.cpp.
References vpArray2D< Type >::rowPtrs, and vpArray2D< double >::rowPtrs.
vpTranslationVector vpRotationMatrix::operator* | ( | const vpTranslationVector & | tv | ) | const |
Multiply a rotation matrix by a translation vector and return the resulting translation vector.
Definition at line 380 of file vpRotationMatrix.cpp.
References 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 400 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 415 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 241 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, m_index, and vpArray2D< double >::size().
vpRotationMatrix & vpRotationMatrix::operator<< | ( | double | val | ) |
Set rotation matrix first element.
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 207 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, and m_index.
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 118 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, vpArray2D< double >::dsize, vpException::fatalError, isARotationMatrix(), and orthogonalize().
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 158 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpException::fatalError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and isARotationMatrix().
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 81 of file vpRotationMatrix.cpp.
References vpArray2D< Type >::rowPtrs, and vpArray2D< double >::rowPtrs.
Equal to comparison operator of a 2D array.
Definition at line 438 of file vpArray2D.h.
|
inlineinherited |
Set element
Definition at line 520 of file vpArray2D.h.
|
inlineinherited |
Get element
Definition at line 522 of file vpArray2D.h.
void vpRotationMatrix::orthogonalize | ( | ) |
Perform rotation matrix orthogonalization.
Definition at line 979 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpMatrix::det(), vpMatrix::svd(), and vpMatrix::t().
Referenced by operator=(), vpHomogeneousMatrix::orthogonalizeRotation(), and vpRotationMatrix().
void vpRotationMatrix::printVector | ( | ) |
Print to std::cout the rotation matrix as a
Definition at line 635 of file vpRotationMatrix.cpp.
|
inlineinherited |
Definition at line 383 of file vpArray2D.h.
|
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. |
Definition at line 305 of file vpArray2D.h.
Referenced by vpMatrix::diag(), vpMatrix::eye(), vpMatrix::init(), vpMatrix::operator,(), vpMatrix::operator<<(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), and vpMatrix::svdOpenCV().
|
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 191 of file vpRotationMatrix.h.
References vpException::fatalError.
|
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 784 of file vpArray2D.h.
|
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 875 of file vpArray2D.h.
void vpRotationMatrix::setIdentity | ( | ) |
Initializes the rotation matrix as identity.
Definition at line 1017 of file vpRotationMatrix.cpp.
References eye().
|
inlineinherited |
Return the number of elements of the 2D array.
Definition at line 292 of file vpArray2D.h.
Referenced by vpHomogeneousMatrix::isValid(), vpColVector::operator*(), vpHomogeneousMatrix::operator,(), operator,(), vpRotationVector::operator,(), vpTranslationVector::operator,(), vpQuaternionVector::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpThetaUVector::operator=(), vpThetaUVector::operator=(), vpTranslationVector::operator=(), vpMatrix::stack(), vpColVector::toStdVector(), vpPoseVector::toStdVector(), vpRotationVector::toStdVector(), and vpRowVector::toStdVector().
vpRotationMatrix vpRotationMatrix::t | ( | ) | const |
Return the rotation matrix transpose which is also the inverse of the rotation matrix.
Definition at line 588 of file vpRotationMatrix.cpp.
Referenced by vpVelocityTwistMatrix::extract(), vpHomogeneousMatrix::inverse(), inverse(), vpVelocityTwistMatrix::inverse(), isARotationMatrix(), and vpSimulatorAfma6::setPosition().
|
related |
Insert array B in array A at the given position.
A | : Main array. |
B | : Array to insert. |
C | : Result array. |
r | : Index of the row where to insert array B. |
c | : Index of the column where to insert array B. |
Definition at line 997 of file vpArray2D.h.
|
related |
Definition at line 1191 of file vpArray2D.h.
|
related |
Definition at line 1209 of file vpArray2D.h.
|
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. |
|
related |
Enumeration of the operations applied on matrices in vpGEMM() function.
Operations are :
|
protectedinherited |
Number of columns in the array.
Definition at line 136 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::eigenValues(), vpMatrix::expm(), vpMatrix::eye(), vpMatrix::getDiag(), vpMatrix::getRow(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpMatrix::insert(), vpRowVector::insert(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLU(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLULapack(), vpMatrix::inverseByLUOpenCV(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), operator*(), operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpMatrix::operator*=(), operator*=(), vpRowVector::operator*=(), vpRowVector::operator+(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpRowVector::operator+=(), vpMatrix::operator,(), vpRowVector::operator,(), vpRowVector::operator-(), vpRowVector::operator-(), vpMatrix::operator-=(), vpMatrix::operator-=(), vpRowVector::operator-=(), vpMatrix::operator/(), vpRowVector::operator/(), vpMatrix::operator/=(), vpRowVector::operator/=(), vpColVector::operator<<(), vpMatrix::operator<<(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpColVector::operator==(), vpRowVector::operator==(), vpMatrix::qr(), vpMatrix::qrPivot(), vpRowVector::reshape(), vpMatrix::setIdentity(), vpMatrix::solveByQR(), vpMatrix::solveByQR(), vpMatrix::solveBySVD(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpRowVector::stack(), vpMatrix::stackColumns(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpMatrix::stackRows(), vpMatrix::sum(), vpRowVector::sum(), vpMatrix::sumSquare(), vpRowVector::sumSquare(), vpMatrix::svdLapack(), vpRowVector::t(), vpMatrix::transpose(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().
|
inherited |
Address of the first element of the data array.
Definition at line 144 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpHomogeneousMatrix::buildFrom(), vpHomogeneousMatrix::buildFrom(), vpQuaternionVector::buildFrom(), vpQuaternionVector::buildFrom(), vpRxyzVector::buildFrom(), vpRxyzVector::buildFrom(), vpRxyzVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyxVector::buildFrom(), vpRzyzVector::buildFrom(), vpRzyzVector::buildFrom(), vpRzyzVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpThetaUVector::buildFrom(), vpSubColVector::checkParentStatus(), vpSubMatrix::checkParentStatus(), vpSubRowVector::checkParentStatus(), vpHomogeneousMatrix::convert(), vpHomogeneousMatrix::convert(), vpMatrix::detByLUEigen3(), vpMatrix::detByLUOpenCV(), vpMatrix::expm(), vpThetaUVector::extract(), vpMatrix::frobeniusNorm(), vpMatrix::getRow(), vpThetaUVector::getTheta(), vpThetaUVector::getU(), vpColVector::hadamard(), vpMatrix::hadamard(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpColVector::insert(), vpColVector::insert(), vpMatrix::insert(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLUOpenCV(), vpHomogeneousMatrix::isValid(), vpColVector::operator*(), vpHomography::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpTranslationVector::operator*(), vpColVector::operator,(), vpHomogeneousMatrix::operator,(), operator,(), vpRotationVector::operator,(), vpRowVector::operator,(), vpTranslationVector::operator,(), vpColVector::operator-(), vpRowVector::operator-(), vpTranslationVector::operator-(), vpColVector::operator/(), vpHomography::operator/(), vpRowVector::operator/(), vpTranslationVector::operator/(), vpHomography::operator/=(), vpColVector::operator<<(), vpHomogeneousMatrix::operator<<(), operator<<(), vpRotationVector::operator<<(), vpRowVector::operator<<(), vpTranslationVector::operator<<(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpQuaternionVector::operator=(), vpQuaternionVector::operator=(), operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRxyzVector::operator=(), vpRxyzVector::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpRzyxVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpRzyzVector::operator=(), vpRzyzVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpThetaUVector::operator=(), vpThetaUVector::operator=(), vpThetaUVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), vpColVector::operator==(), vpColVector::operator==(), vpRowVector::operator==(), orthogonalize(), vpHomogeneousMatrix::orthogonalizeRotation(), vpMatrix::qr(), vpMatrix::qrPivot(), vpColVector::reshape(), vpRowVector::reshape(), vpQuaternionVector::set(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stackRows(), vpColVector::sum(), vpColVector::sumSquare(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpColVector::t(), vpPoseVector::t(), vpRotationVector::t(), vpRowVector::t(), vpTranslationVector::t(), vpColVector::toStdVector(), vpPoseVector::toStdVector(), vpRotationVector::toStdVector(), vpRowVector::toStdVector(), vpMatrix::transpose(), vpColVector::vpColVector(), vpHomogeneousMatrix::vpHomogeneousMatrix(), vpMatrix::vpMatrix(), vpRowVector::vpRowVector(), vpQuaternionVector::w(), vpQuaternionVector::w(), vpQuaternionVector::x(), vpQuaternionVector::x(), vpQuaternionVector::y(), vpQuaternionVector::y(), vpQuaternionVector::z(), vpQuaternionVector::z(), vpSubColVector::~vpSubColVector(), vpSubMatrix::~vpSubMatrix(), and vpSubRowVector::~vpSubRowVector().
|
protectedinherited |
Current array size (rowNum * colNum)
Definition at line 140 of file vpArray2D.h.
Referenced by vpMatrix::frobeniusNorm(), vpMatrix::hadamard(), vpMatrix::inducedL2Norm(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpRotationVector::operator*(), vpTranslationVector::operator*(), vpTranslationVector::operator-(), vpTranslationVector::operator/(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), operator=(), vpRowVector::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpThetaUVector::operator=(), vpColVector::reshape(), vpRowVector::reshape(), vpRotationVector::t(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().
|
protected |
Definition at line 223 of file vpRotationMatrix.h.
Referenced by operator,(), and operator<<().
|
protectedinherited |
Number of rows in the array.
Definition at line 134 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::eigenValues(), vpMatrix::expm(), vpMatrix::eye(), vpMatrix::getCol(), vpMatrix::getDiag(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpColVector::infinityNorm(), vpMatrix::infinityNorm(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpMatrix::insert(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByCholeskyOpenCV(), vpMatrix::inverseByLU(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByLULapack(), vpMatrix::inverseByLUOpenCV(), vpMatrix::inverseByQRLapack(), vpMatrix::inverseTriangular(), vpColVector::operator*(), vpColVector::operator*(), vpColVector::operator*(), vpHomogeneousMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), operator*(), operator*(), vpTranslationVector::operator*(), vpColVector::operator*=(), vpMatrix::operator*=(), operator*=(), vpTranslationVector::operator*=(), vpColVector::operator+(), vpColVector::operator+=(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpColVector::operator,(), vpColVector::operator-(), vpColVector::operator-(), vpColVector::operator-=(), vpMatrix::operator-=(), vpMatrix::operator-=(), vpColVector::operator/(), vpMatrix::operator/(), vpColVector::operator/=(), vpMatrix::operator/=(), vpTranslationVector::operator/=(), vpColVector::operator<<(), vpMatrix::operator<<(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpColVector::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubColVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpTranslationVector::operator=(), vpTranslationVector::operator=(), vpColVector::operator==(), vpColVector::operator==(), vpRowVector::operator==(), vpMatrix::qr(), vpMatrix::qrPivot(), vpColVector::reshape(), vpMatrix::setIdentity(), vpColVector::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stackColumns(), vpMatrix::stackColumns(), vpMatrix::stackRows(), vpMatrix::stackRows(), vpColVector::sum(), vpMatrix::sum(), vpColVector::sumSquare(), vpMatrix::sumSquare(), vpRotationVector::sumSquare(), vpTranslationVector::sumSquare(), vpMatrix::svdLapack(), vpColVector::t(), vpPoseVector::t(), vpTranslationVector::t(), vpMatrix::transpose(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().
|
protectedinherited |
Address of the first element of each rows.
Definition at line 138 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::infinityNorm(), vpColVector::init(), vpMatrix::init(), vpRowVector::init(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpForceTwistMatrix::operator*(), vpForceTwistMatrix::operator*(), vpForceTwistMatrix::operator*(), vpHomogeneousMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), operator*(), operator*(), operator*(), operator*(), vpVelocityTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpMatrix::operator*=(), operator*=(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpMatrix::operator,(), vpMatrix::operator-=(), vpMatrix::operator-=(), vpMatrix::operator/(), vpMatrix::operator/=(), vpColVector::operator<<(), vpMatrix::operator<<(), vpMatrix::operator<<(), vpColVector::operator=(), vpForceTwistMatrix::operator=(), vpHomogeneousMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpVelocityTwistMatrix::operator=(), vpMatrix::stack(), vpMatrix::stackColumns(), vpMatrix::sum(), vpRowVector::sum(), vpMatrix::sumSquare(), vpRotationVector::sumSquare(), vpRowVector::sumSquare(), vpTranslationVector::sumSquare(), vpColVector::vpColVector(), vpMatrix::vpMatrix(), and vpRowVector::vpRowVector().