![]() |
University of Murcia ![]() |
QVMatrix Class ReferenceImplementation of numerical matrices.
More...
|
Public Member Functions | |
QVMatrix () | |
Default constructor. | |
QVMatrix (const QVMatrix &matrix) | |
Copy constructor. | |
QVMatrix (const int rows, const int cols, const double *data=NULL) | |
Dimensional constructor. | |
QVMatrix (const int rows, const int cols, const QVVector &data) | |
Dimensional constructor. | |
QVMatrix (const int rows, const int cols, const double value) | |
Dimensional constructor with default value. | |
QVMatrix (const QVQuaternion &quaternion) | |
Rotation matrix constructor. | |
QVMatrix (const QVVector &vector, const bool rowVector=true) | |
Vector to matrix constructor. | |
QVMatrix (const QList< QVVector > &vectorList) | |
Constructor from a list of QVVectors. | |
QVMatrix (const QList< QVector< double > > &vectorList) | |
Constructor from a list of QVectors. | |
QVMatrix (const gsl_matrix *matrix) | |
Copy constructor for gsl_matrix. | |
QVMatrix (const QList< QPointF > &pointList) | |
Constructor from a list of QPointF. | |
operator QList< QVVector > () const | |
Convert to a list of QVVectors operator. | |
operator QList< QVector< double > > () const | |
Convert to a list of QVectors operator. | |
operator gsl_matrix * () const | |
Convert to a gsl_matrix * operator. | |
QVMatrix & | operator= (const QVMatrix &matrix) |
Copy operator. | |
bool | operator== (const QVMatrix &matrix) const |
Matrix-matrix equality operator. | |
bool | operator!= (const QVMatrix &matrix) const |
Matrix-matrix unequality operator. | |
QVMatrix | operator* (const QVMatrix &matrix) const |
Matrix-matrix product operator. | |
QVMatrix | operator/ (const QVMatrix &matrix) const |
Matrix-matrix division. | |
QVMatrix | operator+ (const QVMatrix &matrix) const |
Matrix-matrix addition operator. | |
QVMatrix | operator- (const QVMatrix &matrix) const |
Matrix-matrix substraction operator. | |
QVMatrix | operator- () const |
Matrix negation. | |
QVMatrix | operator* (const double value) const |
Matrix-scalar product. | |
QVMatrix | operator/ (const double value) const |
Matrix-scalar division operator. | |
QVVector | operator* (const QVVector &vector) const |
Matrix-vector product. | |
QVMatrix | verticalAppend (const QVMatrix &matrix) const |
Appends matrices vertically. | |
QVMatrix | horizontalAppend (const QVMatrix &matrix) const |
Appends matrices horizontally. | |
QVMatrix | operator & (const QVMatrix &matrix) const |
Appends matrices vertically. | |
QVMatrix | operator| (const QVMatrix &matrix) const |
Appends matrices horizontally. | |
QVMatrix | operator & (const QVVector &vector) const |
Appends vector to matrix vertically. | |
QVMatrix | operator| (const QVVector &vector) const |
Appends vector to matrix horizontally. | |
double & | operator() (const int row, const int col) |
Cell access operator. | |
const double | operator() (const int row, const int col) const |
Overloaded version of cell access operator. | |
const int | getDataSize () const |
Gets the size of the data array. | |
const double * | getReadData () const |
Gets a read-only reference to the data buffer of the matrix. | |
double * | getWriteData () |
Gets a reference of the data buffer of the matrix for read and write accesses. | |
QVMatrix | transpose () const |
Change the order of the indexes in the matrix. | |
void | set (const double value) |
Sets every element of the matrix to a given value. | |
bool | equals (const QVMatrix &matrix) const |
Matrix-matrix equality operator. | |
QVMatrix | dotProduct (const QVMatrix &matrix) const |
Matrix-matrix product. | |
QVMatrix | elementProduct (const QVMatrix &matrix) const |
Matrix-matrix element product. | |
QVMatrix | matrixDivide (const QVMatrix &matrix) const |
Matrix-matrix division. | |
QVMatrix | inverse () const |
Computes the inverse of the matrix. | |
double | det () const |
Computes the determinant of the matrix. | |
QVVector | meanCol () const |
Obtains the mean vector for the column vectors in the matrix. | |
QVMatrix | addition (const QVMatrix &matrix) const |
Matrix-matrix addition. | |
QVMatrix | substract (const QVMatrix &matrix) const |
Matrix-matrix substraction. | |
QVMatrix | scalarDivide (const double value) const |
Matrix-scalar division. | |
QVMatrix | scalarProduct (const double value) const |
Matrix-scalar product. | |
double | norm2 () const |
Gets the norm2 for matrix. | |
double | trace () const |
Gets the trace of the matrix. | |
QVMatrix | rowHomogeneousNormalize () const |
Homogeneous normalization for rows of the matrix. | |
const int | getCols () const |
Get width of the matrix. | |
const int | getRows () const |
Get height of the matrix. | |
const QVMatrix | getCols (const int firstCol, const int lastCol) const |
Get submatrix composed by given column range. | |
const QVMatrix | getRows (const int firstRow, const int lastRow) const |
Get submatrix composed by given row range. | |
const QVVector | getRow (const int row) const |
Gets a row of the matrix. | |
void | setRow (const int row, QVVector vector) |
Sets a row of the matrix. | |
void | setRow (const int row, QVector< double > vector) |
Sets a row of the matrix. | |
const QVVector | getCol (const int col) const |
Gets a column of the matrix. | |
void | setCol (const int col, QVVector vector) |
Sets a column of the matrix. | |
const QVMatrix | getSubmatrix (const int firstRow, const int lastRow, const int firstCol, const int lastCol) const |
Gets a submatrix from a matrix. | |
const QVVector | diagonal () const |
Gets the diagonal of the matrix. | |
QVMatrix | reshape (const int newCols, const int newRows) const |
Create a new matrix with different size and the same content. | |
Static Public Member Functions | |
static QVMatrix | identity (const int size) |
Creates an identity matrix. | |
static QVMatrix | zeros (const int rows, const int cols) |
Creates a zero matrix. | |
static QVMatrix | random (const int rows, const int cols) |
Creates a random matrix. | |
static QVMatrix | diagonal (const QVVector &diagonalVector) |
Creates a diagonal matrix. | |
static QVMatrix | rotationMatrix (const double angle) |
Create a rotation matrix for points in the 2D plane. | |
static QVMatrix | rotationMatrix (const QPointF center, const double angle) |
Create a rotation matrix for points in the 2D plane. | |
static QVMatrix | translationMatrix (const double x, const double y) |
Create a 2D translation matrix. | |
static QVMatrix | scaleMatrix (const double zoom) |
Create a 2D scale matrix. | |
static QVMatrix | rotationMatrix3dXAxis (const double angle) |
Create a rotation matrix for 3D-X axis. | |
static QVMatrix | rotationMatrix3dYAxis (const double angle) |
Create a rotation matrix for 3D-Y axis. | |
static QVMatrix | rotationMatrix3dZAxis (const double angle) |
Create a rotation matrix for 3D-Z axis. | |
static QVMatrix | translationMatrix3d (const double x, const double y, const double z) |
Create a 3D translation matrix. | |
static QVMatrix | multiply (const QList< QVMatrix > &matrices) |
Compute the product of a list of matrices. |
Definition at line 44 of file qvmatrix.h.
QVMatrix::QVMatrix | ( | ) |
Default constructor.
By default, it constructs a 1x1 matrix.
Definition at line 39 of file qvmatrix.cpp.
Referenced by operator &(), operator>>(), and operator|().
QVMatrix::QVMatrix | ( | const QVMatrix & | matrix | ) |
Copy constructor.
Creates a matrix object copying the content from a given one.
matrix | matrix to be copied. |
Definition at line 45 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const int | rows, | |
const int | cols, | |||
const double * | data = NULL | |||
) |
Dimensional constructor.
Creates a new matrix of the specified dimensions.
rows | number of rows for the new matrix. | |
cols | number of rows for the new matrix. | |
data | pointer to the data, stored in row mayor order. If no pointer, or the NULL value, is provided, |
Definition at line 49 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const int | rows, | |
const int | cols, | |||
const QVVector & | data | |||
) |
Dimensional constructor.
Creates a new matrix of the specified dimensions.
rows | number of rows for the new matrix. | |
cols | number of rows for the new matrix. | |
data | Vector containing the data, in row mayor order. |
Definition at line 64 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const int | rows, | |
const int | cols, | |||
const double | value | |||
) |
Dimensional constructor with default value.
Creates a new matrix of the specified dimensions, and with each one of its cells containing a provided value.
rows | number of rows for the new matrix. | |
cols | number of rows for the new matrix. | |
value | default value to set the elements of the matrix. |
Definition at line 74 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const QVQuaternion & | quaternion | ) |
Rotation matrix constructor.
Creates a rotation matrix equivalent to a quaternion.
quaternion | quaternion equivalent to the rotation. |
Definition at line 80 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const QVVector & | vector, | |
const bool | rowVector = true | |||
) |
Vector to matrix constructor.
Creates a row or column matrix from a vector.
vector | vector to convert to matrix type. | |
rowVector | if true, creates a row matrix from the vector, else creates a column matrix from it. |
Definition at line 105 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const QList< QVVector > & | vectorList | ) |
Constructor from a list of QVVectors.
Creates a new matrix from a list of row QVVectors.
vectorList | list of row vectors. |
Definition at line 114 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const QList< QVector< double > > & | vectorList | ) |
Constructor from a list of QVectors.
Creates a new matrix from a list of row QVectors.
vectorList | list of row vectors. |
Definition at line 123 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const gsl_matrix * | matrix | ) |
Copy constructor for gsl_matrix.
matrix | matrix to be copied |
Definition at line 132 of file qvmatrix.cpp.
QVMatrix::QVMatrix | ( | const QList< QPointF > & | pointList | ) |
Constructor from a list of QPointF.
Creates a new matrix from a list of points
pointList | list of points. |
Definition at line 139 of file qvmatrix.cpp.
bool QVMatrix::operator== | ( | const QVMatrix & | matrix | ) | const [inline] |
Matrix-matrix equality operator.
matrix | term for the compare operation. |
Definition at line 205 of file qvmatrix.h.
bool QVMatrix::operator!= | ( | const QVMatrix & | matrix | ) | const [inline] |
Matrix-matrix unequality operator.
matrix | term for the compare operation. |
Definition at line 212 of file qvmatrix.h.
Matrix-matrix product operator.
matrix | factor for the product operation. |
Definition at line 218 of file qvmatrix.h.
Referenced by operator-().
Matrix-matrix division.
The following expression:
X = A / B
is equivalent to this one
X = A * pseudoInverse(B)
With the difference that the pseudoinverse matrix for B is not directly computed. Instead, the matrix equation:
X * B = A
is solved for the X term. This leads to more stable and efficient results than using the pseudo inverse.
this operator gets X from:
X = A / B -> X * B = A -> B' * X' = A'
using a linear system resolution based on a LU decomposition over A.
matrix | factor for the operation. |
Definition at line 245 of file qvmatrix.h.
Matrix-matrix addition operator.
matrix | term for the operation. |
Definition at line 251 of file qvmatrix.h.
Matrix-matrix substraction operator.
matrix | subtrahend for the operation. |
Definition at line 257 of file qvmatrix.h.
QVMatrix QVMatrix::operator- | ( | ) | const [inline] |
Matrix negation.
Obtains a matrix negating all the elements of the original.
Definition at line 264 of file qvmatrix.h.
QVMatrix QVMatrix::operator* | ( | const double | value | ) | const [inline] |
Matrix-scalar product.
value | factor for the operation. |
Definition at line 272 of file qvmatrix.h.
QVMatrix QVMatrix::operator/ | ( | const double | value | ) | const [inline] |
Matrix-scalar division operator.
value | divider for the operation. |
Definition at line 278 of file qvmatrix.h.
Matrix-vector product.
vector | vector to multiply by. |
Definition at line 179 of file qvmatrix.cpp.
Appends matrices vertically.
Considering two matrix objects and
, this method returns the following matrix object:
matrix | matrix to be appended |
Definition at line 405 of file qvmatrix.cpp.
Referenced by operator &().
Appends matrices horizontally.
Considering two matrix objects and
, this method returns the following matrix object:
matrix | matrix to be appended |
Definition at line 379 of file qvmatrix.cpp.
Referenced by operator|().
Appends matrices vertically.
Considering two matrix objects and
, this operator returns the following matrix object:
matrix | matrix to be appended |
Definition at line 318 of file qvmatrix.h.
Appends matrices horizontally.
Considering two matrix objects and
, this operator returns the following matrix object:
matrix | matrix to be appended |
Definition at line 328 of file qvmatrix.h.
Appends vector to matrix vertically.
Considering a matrix object and a vector object
, this operator returns the following matrix object:
vector | vector to be appended |
Definition at line 338 of file qvmatrix.h.
Appends vector to matrix horizontally.
Considering a matrix object and a vector object
, this operator returns the following matrix object:
vector | vector to be appended |
Definition at line 348 of file qvmatrix.h.
double& QVMatrix::operator() | ( | const int | row, | |
const int | col | |||
) | [inline] |
Cell access operator.
row | main index value for data access | |
col | secondary index value for data access |
Definition at line 356 of file qvmatrix.h.
Referenced by elementProduct(), getCols(), getRows(), QVMatrix(), and rowHomogeneousNormalize().
const double QVMatrix::operator() | ( | const int | row, | |
const int | col | |||
) | const [inline] |
Overloaded version of cell access operator.
row | main index value for data access | |
col | secondary index value for data access |
Definition at line 363 of file qvmatrix.h.
const int QVMatrix::getDataSize | ( | ) | const [inline] |
Gets the size of the data array.
This returns the number of elements in the matrix.
Definition at line 370 of file qvmatrix.h.
Referenced by addition(), eigenDecomposition(), equals(), norm2(), scalarDivide(), scalarProduct(), set(), and substract().
const double* QVMatrix::getReadData | ( | ) | const [inline] |
Gets a read-only reference to the data buffer of the matrix.
Definition at line 375 of file qvmatrix.h.
Referenced by addition(), dotProduct(), eigenDecomposition(), equals(), norm2(), operator<<(), QVVector::QVVector(), solveLinear(), solveOverDetermined(), substract(), and transpose().
double* QVMatrix::getWriteData | ( | ) | [inline] |
Gets a reference of the data buffer of the matrix for read and write accesses.
Definition at line 380 of file qvmatrix.h.
Referenced by addition(), CholeskyDecomposition(), dotProduct(), LUDecomposition(), pseudoInverse(), QRDecomposition(), QVMatrix(), scalarDivide(), scalarProduct(), set(), solveLinear(), solveOverDetermined(), substract(), and transpose().
QVMatrix QVMatrix::transpose | ( | ) | const |
Change the order of the indexes in the matrix.
This function reorders the indexes of the matrix.
Definition at line 285 of file qvmatrix.cpp.
Referenced by eigenDecomposition(), getCanonicalCameraMatricesFromEssentialMatrix(), GetPinholeCameraIntrinsicsFromPlanarHomography(), matrixDivide(), operator|(), pseudoInverse(), qvLinearRegularizedRegression(), refineExtrinsicCameraMatrixWithPolarDecomposition(), and refineExtrinsicCameraMatrixWithQRDecomposition().
void QVMatrix::set | ( | const double | value | ) |
Sets every element of the matrix to a given value.
value | value to set elements in the matrix |
Definition at line 302 of file qvmatrix.cpp.
Referenced by diagonal(), identity(), and zeros().
bool QVMatrix::equals | ( | const QVMatrix & | matrix | ) | const |
Matrix-matrix equality operator.
matrix | term for the compare operation. |
Definition at line 187 of file qvmatrix.cpp.
Referenced by operator!=(), and operator==().
Matrix-matrix product.
matrix | second operator for the multiplication. |
Definition at line 204 of file qvmatrix.cpp.
Referenced by QVVector::operator*(), and operator*().
Matrix-matrix element product.
This method returns a matrix containing the product of the elements at the corresponding cells of the actual matrix and the one provided as the input parameter.
matrix | second operator for the multiplication. |
Definition at line 234 of file qvmatrix.cpp.
Matrix-matrix division.
This function solves the X term from the following matrix equation:
matrix | factor for the operation. |
Definition at line 259 of file qvmatrix.cpp.
Referenced by operator/().
QVMatrix QVMatrix::inverse | ( | ) | const |
Computes the inverse of the matrix.
Por ahora con la misma pseudoinversa, serĂa mejor de otro modo...
Definition at line 274 of file qvmatrix.cpp.
Referenced by BhattacharyyaDistance().
Matrix-matrix addition.
matrix | operand for the add operation. |
Definition at line 312 of file qvmatrix.cpp.
Referenced by operator+().
Matrix-matrix substraction.
matrix | subtrahend for the operation. |
Definition at line 330 of file qvmatrix.cpp.
Referenced by operator-().
QVMatrix QVMatrix::scalarDivide | ( | const double | value | ) | const |
Matrix-scalar division.
value | scalar value to use in the operation. |
Definition at line 364 of file qvmatrix.cpp.
Referenced by operator/().
QVMatrix QVMatrix::scalarProduct | ( | const double | value | ) | const |
Matrix-scalar product.
value | factor for the operation. |
Definition at line 349 of file qvmatrix.cpp.
Referenced by operator*().
double QVMatrix::norm2 | ( | ) | const |
Gets the norm2 for matrix.
The resulting value will be the square root of the following sumatory:
where are the elements of the matrix
.
Definition at line 433 of file qvmatrix.cpp.
double QVMatrix::trace | ( | ) | const |
Gets the trace of the matrix.
The trace of the matrix is the sum of the diagonal elements:
where are the elements of the matrix
.
Definition at line 436 of file qvmatrix.cpp.
QVMatrix QVMatrix::rowHomogeneousNormalize | ( | ) | const |
Homogeneous normalization for rows of the matrix.
Definition at line 446 of file qvmatrix.cpp.
const int QVMatrix::getCols | ( | ) | const [inline] |
Get width of the matrix.
Definition at line 494 of file qvmatrix.h.
Referenced by CholeskyDecomposition(), determinant(), eigenDecomposition(), Filter(), getCol(), getCols(), getRow(), getRows(), getSubmatrix(), LUDecomposition(), matrixDivide(), meanCol(), QVVector::operator*(), operator*(), operator<<(), pseudoInverse(), qHash(), QRDecomposition(), qvLinearRegularizedRegression(), QVMatrix(), rowHomogeneousNormalize(), setCol(), setRow(), singularValueDecomposition(), SingularValueDecomposition(), solveHomogeneousLinear(), solveLinear(), solveOverDetermined(), trace(), and transpose().
const int QVMatrix::getRows | ( | ) | const [inline] |
Get height of the matrix.
Definition at line 499 of file qvmatrix.h.
Referenced by CholeskyDecomposition(), determinant(), eigenDecomposition(), Filter(), getCol(), getCols(), getRow(), getRows(), getSubmatrix(), LUDecomposition(), matrixDivide(), operator QList< QVector< double > >(), operator QList< QVVector >(), QVVector::operator*(), operator<<(), pseudoInverse(), qHash(), QRDecomposition(), QVMatrix(), regressionLine(), rowHomogeneousNormalize(), setCol(), setRow(), solveLinear(), solveOverDetermined(), trace(), and transpose().
const QVMatrix QVMatrix::getCols | ( | const int | firstCol, | |
const int | lastCol | |||
) | const [inline] |
Get submatrix composed by given column range.
firstCol | first column to be included in the submatrix. | |
lastCol | last column to be included in the submatrix. |
Definition at line 506 of file qvmatrix.h.
const QVMatrix QVMatrix::getRows | ( | const int | firstRow, | |
const int | lastRow | |||
) | const [inline] |
Get submatrix composed by given row range.
firstRow | first row to be included in the submatrix. | |
lastRow | last row to be included in the submatrix. |
Definition at line 524 of file qvmatrix.h.
const QVVector QVMatrix::getRow | ( | const int | row | ) | const |
Gets a row of the matrix.
row | row number, a value within [0, r-1], for a matrix with 'r' rows |
Definition at line 457 of file qvmatrix.cpp.
Referenced by ComputeAffineHomography(), ComputeProjectiveHomography(), getCameraMatrixFrom2D3DPointCorrespondences(), getSubmatrix(), operator QList< QVector< double > >(), operator QList< QVVector >(), QVVector::operator*(), triangulate3DPointFrom2Views(), and verticalAppend().
void QVMatrix::setRow | ( | const int | row, | |
QVVector | vector | |||
) |
Sets a row of the matrix.
row | row number, a value within [0, r-1], for a matrix with 'r' rows | |
vector | a vector containing the values for the row |
Definition at line 469 of file qvmatrix.cpp.
Referenced by getCameraMatrixFrom2D3DPointCorrespondences(), getSubmatrix(), QVMatrix(), QVVector::toRowMatrix(), triangulate3DPointFrom2Views(), and verticalAppend().
void QVMatrix::setRow | ( | const int | row, | |
QVector< double > | vector | |||
) |
Sets a row of the matrix.
row | row number, a value within [0, r-1], for a matrix with 'r' rows | |
vector | a vector containing the values for the row |
Definition at line 479 of file qvmatrix.cpp.
const QVVector QVMatrix::getCol | ( | const int | col | ) | const |
Gets a column of the matrix.
col | column number, a value within [0, c-1], for a matrix with 'c' columns |
Definition at line 489 of file qvmatrix.cpp.
Referenced by CalibrateCameraFromPlanarHomography(), getCanonicalCameraMatricesFromEssentialMatrix(), getEssentialMatrixFromCanonicalCameraMatrix(), GetExtrinsicCameraMatrixFromHomography(), HomographyTestError(), horizontalAppend(), meanCol(), operator*(), and solveHomogeneousLinear().
void QVMatrix::setCol | ( | const int | col, | |
QVVector | vector | |||
) |
Sets a column of the matrix.
col | column number, a value within [0, c-1], for a matrix with 'c' columns | |
vector | a vector containing the values for the column |
Definition at line 501 of file qvmatrix.cpp.
Referenced by CalibrateCameraFromPlanarHomography(), GetExtrinsicCameraMatrixFromHomography(), horizontalAppend(), QVMatrix(), and QVVector::toColumnMatrix().
const QVMatrix QVMatrix::getSubmatrix | ( | const int | firstRow, | |
const int | lastRow, | |||
const int | firstCol, | |||
const int | lastCol | |||
) | const |
Gets a submatrix from a matrix.
firstCol | first column number for the submatrix | |
firstRow | first row number for the submatrix | |
lastCol | last column number for the submatrix | |
lastRow | last row number for the submatrix |
Definition at line 511 of file qvmatrix.cpp.
Referenced by QVEuclideanMapping3::QVEuclideanMapping3(), refineExtrinsicCameraMatrixWithPolarDecomposition(), and refineExtrinsicCameraMatrixWithQRDecomposition().
const QVVector QVMatrix::diagonal | ( | ) | const [inline] |
Gets the diagonal of the matrix.
Definition at line 581 of file qvmatrix.h.
Referenced by singularValueDecomposition(), and SingularValueDecomposition().
QVMatrix QVMatrix::identity | ( | const int | size | ) | [static] |
Creates an identity matrix.
size | number of cols and rows for the identity matrix |
Definition at line 531 of file qvmatrix.cpp.
Referenced by ComputeEuclideanHomography(), GetDirectIntrinsicCameraMatrixFromHomography(), multiply(), qvLinearRegularizedRegression(), QVMatrix(), refineExtrinsicCameraMatrixWithPolarDecomposition(), refineExtrinsicCameraMatrixWithQRDecomposition(), rotationMatrix(), rotationMatrix3dXAxis(), rotationMatrix3dYAxis(), rotationMatrix3dZAxis(), scaleMatrix(), QVEuclideanMapping3::toRotationTranslationMatrix(), translationMatrix(), and translationMatrix3d().
QVMatrix QVMatrix::zeros | ( | const int | rows, | |
const int | cols | |||
) | [static] |
Creates a zero matrix.
rows | number of cols and rows for the identity matrix | |
cols | number of cols and rows for the identity matrix |
Definition at line 540 of file qvmatrix.cpp.
Referenced by GetPinholeCameraIntrinsicsFromPlanarHomography().
QVMatrix QVMatrix::random | ( | const int | rows, | |
const int | cols | |||
) | [static] |
Creates a random matrix.
Matrix with elements values from 0 to 1.
rows | rows of the matrix | |
cols | cols of the matrix |
Definition at line 547 of file qvmatrix.cpp.
Creates a diagonal matrix.
Matrix with elements values from 0 to 1.
diagonalVector | vector containing the diagonal values |
Definition at line 556 of file qvmatrix.cpp.
QVMatrix QVMatrix::rotationMatrix | ( | const double | angle | ) | [static] |
Create a rotation matrix for points in the 2D plane.
angle | angle to rotate around coordinate center |
Definition at line 566 of file qvmatrix.cpp.
Referenced by ComputeEuclideanHomography(), and rotationMatrix().
QVMatrix QVMatrix::rotationMatrix | ( | const QPointF | center, | |
const double | angle | |||
) | [static] |
Create a rotation matrix for points in the 2D plane.
angle | angle to rotate around coordinate center | |
center | point at the center of the rotation |
Definition at line 577 of file qvmatrix.cpp.
QVMatrix QVMatrix::translationMatrix | ( | const double | x, | |
const double | y | |||
) | [static] |
Create a 2D translation matrix.
x | increment in X axis | |
y | increment in Y axis |
Definition at line 583 of file qvmatrix.cpp.
Referenced by ComputeEuclideanHomography(), and rotationMatrix().
QVMatrix QVMatrix::scaleMatrix | ( | const double | zoom | ) | [static] |
Create a 2D scale matrix.
zoom | scale |
Definition at line 594 of file qvmatrix.cpp.
Referenced by ComputeEuclideanHomography().
QVMatrix QVMatrix::rotationMatrix3dXAxis | ( | const double | angle | ) | [static] |
Create a rotation matrix for 3D-X axis.
angle | angle to rotate around X axis in radians |
Definition at line 617 of file qvmatrix.cpp.
QVMatrix QVMatrix::rotationMatrix3dYAxis | ( | const double | angle | ) | [static] |
Create a rotation matrix for 3D-Y axis.
angle | angle to rotate around Y axis in radians |
Definition at line 630 of file qvmatrix.cpp.
QVMatrix QVMatrix::rotationMatrix3dZAxis | ( | const double | angle | ) | [static] |
Create a rotation matrix for 3D-Z axis.
angle | angle to rotate around Z axis in radians |
Definition at line 604 of file qvmatrix.cpp.
QVMatrix QVMatrix::translationMatrix3d | ( | const double | x, | |
const double | y, | |||
const double | z | |||
) | [static] |
Create a 3D translation matrix.
x | increment in X axis | |
y | increment in Y axis | |
z | increment in Z axis |
Definition at line 643 of file qvmatrix.cpp.
QVMatrix QVMatrix::reshape | ( | const int | newCols, | |
const int | newRows | |||
) | const [inline] |
Create a new matrix with different size and the same content.
This method creates a matrix with the dimentions specified in the input arguments, keeping the elements of the actual matrix.
cols | ||
rows |
Definition at line 662 of file qvmatrix.h.
Compute the product of a list of matrices.
matrices | matrice list |
Definition at line 672 of file qvmatrix.h.