![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpRotationMatrix.h>
Public Member Functions | |
| vpRotationMatrix () | |
| vpRotationMatrix (const vpRotationMatrix &R) | |
| VP_EXPLICIT | vpRotationMatrix (const vpHomogeneousMatrix &M) |
| VP_EXPLICIT | vpRotationMatrix (const vpThetaUVector &r) |
| VP_EXPLICIT | vpRotationMatrix (const vpPoseVector &p) |
| VP_EXPLICIT | vpRotationMatrix (const vpRzyzVector &r) |
| VP_EXPLICIT | vpRotationMatrix (const vpRxyzVector &r) |
| VP_EXPLICIT | vpRotationMatrix (const vpRzyxVector &r) |
| VP_EXPLICIT | vpRotationMatrix (const vpQuaternionVector &q) |
| VP_EXPLICIT | vpRotationMatrix (const vpMatrix &R) |
| vpRotationMatrix (double tux, double tuy, double tuz) | |
| VP_EXPLICIT | vpRotationMatrix (const std::initializer_list< double > &list) |
| 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 (const double &tux, const double &tuy, const 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 () |
| VP_NORETURN 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 |
| double * | operator[] (unsigned int i) |
| 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) |
| static vpArray2D< double > | view (const vpArray2D< double > &A) |
Public Attributes | |
| double * | data |
Related Symbols | |
(Note that these are not member symbols.) | |
| 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) |
| enum | vpGEMMmethod |
Deprecated functions | |
| unsigned int | m_index |
| VP_DEPRECATED void | init () |
| VP_DEPRECATED void | setIdentity () |
Inherited I/O from vpArray2D with Static Public Member Functions | |
| unsigned int | rowNum |
| unsigned int | colNum |
| double ** | rowPtrs |
| unsigned int | dsize |
| bool | isMemoryOwner |
| bool | isRowPtrsOwner |
| static bool | load (const std::string &filename, vpArray2D< double > &A, bool binary=false, char *header=nullptr) |
| static bool | loadYAML (const std::string &filename, vpArray2D< double > &A, char *header=nullptr) |
| 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 bool | isFinite (const vpArray2D< double > &A) |
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 129 of file vpRotationMatrix.h.
| vpRotationMatrix::vpRotationMatrix | ( | ) |
Default constructor that initialise a 3-by-3 rotation matrix to identity.
Definition at line 513 of file vpRotationMatrix.cpp.
References eye(), m_index, and vpArray2D< double >::vpArray2D().
Referenced by buildFrom(), buildFrom(), buildFrom(), buildFrom(), buildFrom(), buildFrom(), buildFrom(), buildFrom(), inverse(), inverse(), isARotationMatrix(), mean(), mean(), operator*(), operator*(), operator*=(), operator,(), operator<<(), operator=(), operator=(), operator=(), t(), and vpRotationMatrix().
| vpRotationMatrix::vpRotationMatrix | ( | const vpRotationMatrix & | M | ) |
Copy constructor that construct a 3-by-3 rotation matrix from another rotation matrix.
Definition at line 519 of file vpRotationMatrix.cpp.
References m_index, vpArray2D< double >::vpArray2D(), and vpRotationMatrix().
| vpRotationMatrix::vpRotationMatrix | ( | const vpHomogeneousMatrix & | M | ) |
Construct a 3-by-3 rotation matrix from an homogeneous matrix.
Definition at line 524 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const vpThetaUVector & | tu | ) |
Construct a 3-by-3 rotation matrix from
angle representation.
Definition at line 530 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const vpPoseVector & | p | ) |
Construct a 3-by-3 rotation matrix from a pose vector.
Definition at line 535 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const vpRzyzVector & | euler | ) |
Construct a 3-by-3 rotation matrix from
Euler angle representation.
Definition at line 541 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const vpRxyzVector & | Rxyz | ) |
Construct a 3-by-3 rotation matrix from
Euler angle representation.
Definition at line 550 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const vpRzyxVector & | Rzyx | ) |
Construct a 3-by-3 rotation matrix from
Euler angle representation.
Definition at line 556 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const vpQuaternionVector & | q | ) |
Construct a 3-by-3 rotation matrix from quaternion angle representation.
Definition at line 575 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const vpMatrix & | R | ) |
Construct a 3-by-3 rotation matrix from a matrix that contains values corresponding to a rotation matrix.
Definition at line 561 of file vpRotationMatrix.cpp.
References m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | double | tux, |
| double | tuy, | ||
| double | tuz ) |
Construct a 3-by-3 rotation matrix from
angle representation.
Definition at line 567 of file vpRotationMatrix.cpp.
References buildFrom(), m_index, and vpArray2D< double >::vpArray2D().
| vpRotationMatrix::vpRotationMatrix | ( | const std::initializer_list< double > & | list | ) |
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>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
vpRotationMatrix R{ 0, 0, -1, 0, -1, 0, -1, 0, 0 };
std::cout << "R:\n" << R << std::endl;
}
R:
0 0 -1
0 -1 0
-1 0 0
|
Definition at line 603 of file vpRotationMatrix.cpp.
References vpException::fatalError, isARotationMatrix(), m_index, orthogonalize(), and vpArray2D< double >::vpArray2D().
| vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const double & | tux, |
| const double & | tuy, | ||
| const double & | tuz ) |
Construct a 3-by-3 rotation matrix from
angle representation.
Definition at line 868 of file vpRotationMatrix.cpp.
References buildFrom(), and vpRotationMatrix().
| vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpHomogeneousMatrix & | M | ) |
Build a rotation matrix from an homogeneous matrix.
Definition at line 737 of file vpRotationMatrix.cpp.
References vpRotationMatrix().
Referenced by buildFrom(), buildFrom(), vpExponentialMap::direct(), 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 754 of file vpRotationMatrix.cpp.
References buildFrom(), and vpRotationMatrix().
| vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpQuaternionVector & | q | ) |
Construct a 3-by-3 rotation matrix from a quaternion representation.
Definition at line 878 of file vpRotationMatrix.cpp.
References vpRotationMatrix(), 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(
) = Rot(
) Rot(
) Rot(
)
Definition at line 802 of file vpRotationMatrix.cpp.
References vpRotationMatrix().
| vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpRzyxVector & | v | ) |
Transform a vector representing the Rzyx angle into a rotation matrix. Rxyz(
) = Rot(
) Rot(
)Rot(
)
Definition at line 835 of file vpRotationMatrix.cpp.
References vpRotationMatrix().
| vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpRzyzVector & | v | ) |
Transform a vector representing the Euler angle into a rotation matrix. Rzyz(
) = Rot(
) Rot(
) Rot(
)
Definition at line 767 of file vpRotationMatrix.cpp.
References vpRotationMatrix().
| vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpThetaUVector & | v | ) |
Transform a
angle representation into a rotation matrix.
The rotation is computed using :
Definition at line 700 of file vpRotationMatrix.cpp.
References vpMath::mcosc(), vpMath::sinc(), and vpRotationMatrix().
|
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 1142 of file vpArray2D.h.
References vpArray2D().
| void vpRotationMatrix::eye | ( | ) |
Initialize the rotation matrix as identity.
Definition at line 59 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 943 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 423 of file vpArray2D.h.
Referenced by vpMatrix::choleskyByEigen3(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpMatrix::cond(), vpMatrix::cppPrint(), vpRowVector::cppPrint(), vpMatrix::csvPrint(), vpRowVector::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpRotationMatrix::getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), vpRotationMatrix::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(), vpMatrix::svdOpenCV(), vpRowVector::vpRowVector(), and vpRowVector::vpRowVector().
|
inherited |
Return the array max value.
Definition at line 425 of file vpArray2D.h.
|
inherited |
Return the array min value.
Definition at line 427 of file vpArray2D.h.
|
inlineinherited |
Return the number of rows of the 2D array.
Definition at line 433 of file vpArray2D.h.
Referenced by vpMatrix::choleskyByEigen3(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpMatrix::column(), vpMatrix::cond(), vpColVector::cppPrint(), vpMatrix::cppPrint(), vpColVector::csvPrint(), vpMatrix::csvPrint(), vpMatrix::detByLUEigen3(), vpMatrix::extract(), vpHomogeneousMatrix::getCol(), vpMatrix::getCol(), vpRotationMatrix::getCol(), vpMatrix::inducedL2Norm(), vpMatrix::inverseByCholeskyLapack(), vpMatrix::inverseByLUEigen3(), vpMatrix::inverseByQRLapack(), vpRotationMatrix::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::operator-(), vpColVector::operator-=(), vpColVector::operator-=(), vpColVector::print(), vpForceTwistMatrix::print(), vpMatrix::print(), vpPoseVector::print(), vpVelocityTwistMatrix::print(), vpMatrix::svdEigen3(), vpMatrix::svdLapack(), vpMatrix::svdOpenCV(), vpColVector::vpColVector(), and vpColVector::vpColVector().
| vpThetaUVector vpRotationMatrix::getThetaUVector | ( | ) |
Return the
vector that corresponds to the rotation matrix.
Definition at line 905 of file vpRotationMatrix.cpp.
Referenced by vpRobotBebop2::setPosition().
Compute the Hadamard product (element wise matrix multiplication).
| m | : Second matrix; |
Definition at line 732 of file vpArray2D.h.
References vpArray2D().
|
inline |
Definition at line 221 of file vpRotationMatrix.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 586 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 645 of file vpRotationMatrix.cpp.
References vpRotationMatrix().
Referenced by vpViper::get_eJe(), vpPointMap::getVisiblePoints(), and inverse().
| void vpRotationMatrix::inverse | ( | vpRotationMatrix & | R | ) | const |
Inverse the rotation matrix.
| R | (output): Inverted rotation matrix. |
Definition at line 673 of file vpRotationMatrix.cpp.
References inverse(), and vpRotationMatrix().
| bool vpRotationMatrix::isARotationMatrix | ( | double | threshold = 1e-6 | ) | const |
Test if the rotation matrix is really a rotation matrix.
Definition at line 465 of file vpRotationMatrix.cpp.
References vpArray2D< double >::getCols(), vpArray2D< double >::getRows(), vpMath::sqr(), and vpRotationMatrix().
Referenced by operator=(), operator=(), and vpRotationMatrix().
Definition at line 1188 of file vpArray2D.h.
|
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 760 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 874 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 965 of file vpRotationMatrix.cpp.
References vpMatrix::pseudoInverse(), vpMatrix::t(), and vpRotationMatrix().
|
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 1008 of file vpRotationMatrix.cpp.
References vpMatrix::pseudoInverse(), vpMatrix::t(), and vpRotationMatrix().
|
inherited |
Not equal to comparison operator of a 2D array.
Definition at line 612 of file vpArray2D.h.
References vpArray2D().
| 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 382 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, 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. |
The following snippet shows how to use this method:
Definition at line 344 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. |
| vpException::dimensionError | : If M is not a 3-by-3 dimension matrix. |
The following snippet shows how to use this method:
Definition at line 309 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 275 of file vpRotationMatrix.cpp.
References vpArray2D< double >::rowPtrs, and vpRotationMatrix().
| vpTranslationVector vpRotationMatrix::operator* | ( | const vpTranslationVector & | tv | ) | const |
Multiply a rotation matrix by a translation vector and return the resulting translation vector.
Definition at line 407 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 429 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::rowNum, vpArray2D< double >::rowPtrs, and vpRotationMatrix().
| vpRotationMatrix & vpRotationMatrix::operator*= | ( | double | x | ) |
Operator that allows to multiply all the elements of a rotation matrix by a scalar.
Definition at line 446 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::rowNum, vpArray2D< double >::rowPtrs, and vpRotationMatrix().
| 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 259 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, m_index, vpArray2D< double >::size(), and vpRotationMatrix().
| 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 221 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, m_index, and vpRotationMatrix().
| 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>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
R = { 0, 0, -1, 0, -1, 0, -1, 0, 0 };
std::cout << "R:\n" << R << std::endl;
}
R:
0 0 -1
0 -1 0
-1 0 0
|
Definition at line 123 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, vpArray2D< double >::dsize, vpException::fatalError, isARotationMatrix(), orthogonalize(), and vpRotationMatrix().
| 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 163 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpException::fatalError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), isARotationMatrix(), orthogonalize(), and vpRotationMatrix().
| 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 83 of file vpRotationMatrix.cpp.
References vpArray2D< double >::rowPtrs, and vpRotationMatrix().
|
inlineinherited |
Set element
using A[i][j] = x.
Definition at line 696 of file vpArray2D.h.
| void vpRotationMatrix::orthogonalize | ( | ) |
Perform rotation matrix orthogonalization.
Definition at line 1045 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpMatrix::svd(), and vpMatrix::t().
Referenced by operator=(), operator=(), and vpRotationMatrix().
| void vpRotationMatrix::printVector | ( | ) |
Print to std::cout the rotation matrix as a
angle representation vector.
Definition at line 679 of file vpRotationMatrix.cpp.
|
inlineinherited |
Definition at line 545 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 448 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::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::stack(), vpMatrix::svdEigen3(), 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 198 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 965 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 1061 of file vpArray2D.h.
| void vpRotationMatrix::setIdentity | ( | ) |
Initializes the rotation matrix as identity.
Definition at line 1092 of file vpRotationMatrix.cpp.
References eye().
|
inlineinherited |
Return the number of elements of the 2D array.
Definition at line 435 of file vpArray2D.h.
Referenced by vpHomogeneousMatrix::isValid(), vpColVector::operator*(), vpHomogeneousMatrix::operator,(), vpRotationMatrix::operator,(), vpRotationVector::operator,(), vpTranslationVector::operator,(), vpQuaternionVector::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpThetaUVector::operator=(), vpThetaUVector::operator=(), vpTranslationVector::operator=(), vpForceTwistMatrix::print(), vpMatrix::print(), vpVelocityTwistMatrix::print(), vpMatrix::stack(), vpColVector::toStdVector(), vpPoseVector::toStdVector(), vpRotationVector::toStdVector(), vpRowVector::toStdVector(), vpColVector::vpColVector(), vpColVector::vpColVector(), vpColVector::vpColVector(), vpColVector::vpColVector(), vpColVector::vpColVector(), vpColVector::vpColVector(), vpRowVector::vpRowVector(), and vpRowVector::vpRowVector().
| vpRotationMatrix vpRotationMatrix::t | ( | ) | const |
Return the rotation matrix transpose which is also the inverse of the rotation matrix.
Definition at line 625 of file vpRotationMatrix.cpp.
References vpRotationMatrix().
Referenced by vpPointMap::getVisiblePoints(), and vpSimulatorAfma6::setPosition().
|
inlinestaticinherited |
Creates a view of the Matrix A. A view shares the same underlying memory as the original array. It can be written into, modifying the original data. However, the array cannot be resized.
When you use this method, it is your responsibility to ensure that the lifespan of the view does not exceed the lifespan of the original array.
| A | the array to view |
Definition at line 324 of file vpArray2D.h.
|
Definition at line 1420 of file vpArray2D.h.
References vpArray2D< Type >::colNum, colNum, vpArray2D< Type >::data, data, vpArray2D< Type >::rowNum, rowNum, vpArray2D< Type >::size(), and vpArray2D().
|
Definition at line 1439 of file vpArray2D.h.
References vpArray2D< Type >::colNum, colNum, vpArray2D< Type >::data, data, vpArray2D< Type >::rowNum, rowNum, vpArray2D< Type >::size(), and vpArray2D().
|
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 414 of file vpGEMM.h.
References vpException::functionNotImplementedError, and vpArray2D().
|
Enumeration of the operations applied on matrices in vpGEMM() function.
Operations are :
|
protectedinherited |
Number of columns in the array.
Definition at line 1203 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpMatrix::dampedInverse(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::eigenValues(), vpMatrix::expm(), vpRowVector::extract(), vpMatrix::eye(), vpMatrix::getDiag(), vpMatrix::getRow(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::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*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpRowVector::operator*(), vpMatrix::operator*=(), vpRotationMatrix::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<<(), vpMatrix::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpRowVector::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubMatrix::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), vpSubRowVector::operator=(), operator==(), operator==(), vpColVector::operator==(), vpRowVector::operator==(), vpMatrix::qr(), 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::svdEigen3(), vpMatrix::svdLapack(), vpRowVector::t(), and vpMatrix::transpose().
|
inherited |
Address of the first element of the data array.
Definition at line 149 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(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpHomogeneousMatrix::convert(), vpHomogeneousMatrix::convert(), vpMatrix::detByLUEigen3(), vpMatrix::detByLUOpenCV(), vpMatrix::expm(), vpThetaUVector::extract(), vpMatrix::frobeniusNorm(), vpMatrix::getRow(), vpThetaUVector::getTheta(), vpThetaUVector::getU(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::hadamard(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), 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,(), vpRotationMatrix::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<<(), vpRotationMatrix::operator<<(), vpRotationVector::operator<<(), vpRowVector::operator<<(), vpTranslationVector::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=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpQuaternionVector::operator=(), vpQuaternionVector::operator=(), vpRotationMatrix::operator=(), vpRotationVector::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=(), operator==(), operator==(), vpColVector::operator==(), vpColVector::operator==(), vpRowVector::operator==(), vpColVector::operator[](), vpColVector::operator[](), vpPoseVector::operator[](), vpPoseVector::operator[](), vpRotationVector::operator[](), vpRotationVector::operator[](), vpRowVector::operator[](), vpRowVector::operator[](), vpTranslationVector::operator[](), vpTranslationVector::operator[](), vpRotationMatrix::orthogonalize(), vpMatrix::qr(), 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::view(), vpMatrix::view(), vpColVector::vpColVector(), vpHomogeneousMatrix::vpHomogeneousMatrix(), 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 1207 of file vpArray2D.h.
Referenced by vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpMatrix::frobeniusNorm(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::hadamard(), vpMatrix::inducedL2Norm(), vpSubColVector::init(), vpSubMatrix::init(), vpSubRowVector::init(), vpRotationVector::operator*(), vpTranslationVector::operator*(), vpTranslationVector::operator-(), vpTranslationVector::operator/(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpMatrix::operator=(), vpRotationMatrix::operator=(), vpRxyzVector::operator=(), vpRzyxVector::operator=(), vpRzyzVector::operator=(), vpThetaUVector::operator=(), vpColVector::reshape(), vpRowVector::reshape(), and vpRotationVector::t().
|
protectedinherited |
Whether this array owns the memory it points to.
Definition at line 1209 of file vpArray2D.h.
Referenced by vpColVector::clear(), and vpRowVector::clear().
|
protectedinherited |
Whether this array owns the row pointers.
Definition at line 1211 of file vpArray2D.h.
|
protected |
Definition at line 230 of file vpRotationMatrix.h.
Referenced by operator,(), operator<<(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), vpRotationMatrix(), and vpRotationMatrix().
|
protectedinherited |
Number of rows in the array.
Definition at line 1201 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpMatrix::AtA(), vpMatrix::choleskyByLapack(), vpMatrix::choleskyByOpenCV(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), vpMatrix::detByLU(), vpMatrix::detByLUEigen3(), vpMatrix::detByLULapack(), vpMatrix::detByLUOpenCV(), vpMatrix::diag(), vpMatrix::eigenValues(), vpMatrix::eigenValues(), vpMatrix::expm(), vpColVector::extract(), vpMatrix::eye(), vpMatrix::getCol(), vpMatrix::getDiag(), vpMatrix::getRow(), vpColVector::hadamard(), vpMatrix::hadamard(), vpRowVector::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*(), vpColVector::operator*(), vpHomogeneousMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpTranslationVector::operator*(), vpColVector::operator*=(), vpMatrix::operator*=(), vpRotationMatrix::operator*=(), vpTranslationVector::operator*=(), vpColVector::operator+(), vpColVector::operator+=(), vpColVector::operator+=(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpColVector::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=(), vpMatrix::operator=(), vpMatrix::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=(), operator==(), operator==(), vpColVector::operator==(), vpColVector::operator==(), vpRowVector::operator==(), vpMatrix::qr(), 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::svdEigen3(), vpMatrix::svdLapack(), vpColVector::t(), vpPoseVector::t(), vpTranslationVector::t(), and vpMatrix::transpose().
|
protectedinherited |
Address of the first element of each rows.
Definition at line 1205 of file vpArray2D.h.
Referenced by vpMatrix::AAt(), vpColVector::clear(), vpMatrix::clear(), vpRowVector::clear(), 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*(), vpMatrix::operator*(), vpMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpRotationMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpVelocityTwistMatrix::operator*(), vpMatrix::operator*=(), vpRotationMatrix::operator*=(), vpMatrix::operator+=(), vpMatrix::operator+=(), vpMatrix::operator,(), vpMatrix::operator-=(), vpMatrix::operator-=(), vpMatrix::operator/(), vpMatrix::operator/=(), vpColVector::operator<<(), vpMatrix::operator<<(), vpMatrix::operator<<(), vpForceTwistMatrix::operator=(), vpHomogeneousMatrix::operator=(), vpMatrix::operator=(), vpRotationMatrix::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(), and vpTranslationVector::sumSquare().