AURobotServers
4
|
#include <umatrix.h>
Public Member Functions | |
void | add (UMatrix *A, UMatrix *B) |
void | add (UMatrix *A) |
void | add (const double val) |
void | clear () |
unsigned int | cols () |
void | copy (UMatrix *source) |
CvArr * | cvArr () |
CvMat * | cvMat () |
double | det (int *error) |
void | eig (UMatrix *W, UMatrix *U, UMatrix *V, int flag=CV_SVD_V_T) |
int | elements () |
void | error (const int ierr, const char *message) |
bool | expand (const unsigned int iRows, const unsigned int iCols) |
bool | expand (const unsigned int iRows, const unsigned int iCols, const double iVal) |
double | get (const unsigned int at) |
double | get (int row, int col) |
double * | getData () |
virtual const char * | getDataType () |
double * | getRow (int row) |
bool | init (const unsigned int rows, const unsigned int cols) |
bool | init (const unsigned int rows, const unsigned int cols, const double i) |
bool | init (const unsigned int iRows, const unsigned int iCols, double *data, unsigned int bufferSizeInDoubles) |
void | inverse (UMatrix *B, int method=CV_SVD) |
virtual bool | isAlsoA (const char *typeString) |
bool | isCol () |
bool | isRow () |
int | maxSize () |
int | mult (UMatrix *A, UMatrix *B) |
void | mult (const double scale) |
bool | normalize () |
void | print (const char *prestring) |
unsigned int | rows () |
int | save (char *filename, char delim= ' ') |
bool | save (FILE *f, const char *name) |
void | set (const double value0, const double value1, const double value2=0.0, const double value3=0.0) |
bool | setAt (const unsigned int at, const double value) |
int | setCol (unsigned int col, const double value0, const double value1=0.0, const double value2=0.0, const double value3=0.0) |
int | setDiag (double value0, double value1, double value2=0.0, double value3=0.0) |
bool | setMat (const int rCnt, const int cCnt, double *values) |
int | setMinor (UMatrix *mA, const unsigned int ar, const unsigned int ac) |
int | setRC (const unsigned int row, const unsigned int col, const double value) |
int | setRow (unsigned int row, const double value0, const double value1=0.0, const double value2=0.0, const double value3=0.0) |
int | setRow (unsigned int row, unsigned int valCnt, const double val[]) |
bool | setSize (const unsigned int iRows, const unsigned int iCols) |
unsigned int | size () |
virtual void | snprint (const char *prestring, char *buff, const int buffCnt) |
virtual void | snprintMaple (const char *prestring, char *s, const int length) |
bool | solve (UMatrix *iB, UMatrix *X) |
double | sqSum () |
void | sub (UMatrix *A, UMatrix *B) |
void | sub (UMatrix *A) |
double | trace () |
void | transpose (UMatrix *B=NULL) |
bool | valid () |
Public Member Functions inherited from UDataBase | |
bool | isA (const char *typeString) |
UDataBase () | |
virtual | ~UDataBase () |
Public Attributes | |
int | err |
Protected Attributes | |
CvMat | mat |
unsigned int | matrixSize |
Virtual class for matrix operations. This class do not include any elements. decendent classes must define a data area and point m to this area. All initialisation and constructors must be handled by decendent classes.
The matrix index is (row, col), and are 0-based. i.e. for a matrix of size 4x3 the row number range is 0..3 and the column munber range is 0..2.
This class offers most of the useual matrix operations - the rest is supported by openCV
Make this matrix the sum of matrix A and B. this = A + B.
References cols(), error(), getData(), rows(), setSize(), and size().
Referenced by UFuzzyPixel::addCovariance(), UResLocater::doLocatorUpdates(), UImageAna::findRoadCroma(), UImAna::getAvgVar(), UImageAna::getAvgVar(), UImagePoly::getAvgVar(), UImagePoly::getAvgVar2(), UFuzzySplit::getCovariance(), isCol(), UMatrix4::operator+(), UMatrix4::operator-(), and testLinearAlgebra().
void UMatrix::add | ( | UMatrix * | A | ) |
void UMatrix::add | ( | const double | val | ) |
void UMatrix::clear | ( | void | ) |
Set all values to zero. err must be 0 before call.
References err, getData(), and size().
Referenced by UFuzzySplit::classifyOld(), UImAna::getAvgVar(), UImageAna::getAvgVar(), UImagePoly::getAvgVar(), UImagePoly::getAvgVar2(), UFuzzySplit::getCenter(), UFuzzySplit::getCovariance(), getDataType(), and testLinearAlgebra().
|
inline |
Return number of rows in array
References mat.
Referenced by add(), UMatrix4::connect(), copy(), UMatrix4::density(), UMatrix4::densityQi(), UMatrix4::det(), UMatrixBig::det(), eig(), UMatrix4::eig2x2(), expand(), get(), UFuzzySplit::getCovariance(), UVariable::getM(), UVarHist::getTimeSeries(), init(), UMatrix4::inversed(), isRow(), mult(), UMatrix4::operator*(), UMatrix4::operator+(), UMatrix4::operator-(), UClientFuncImgGui::paintClustEllipse(), UFuncFz::paintClustEllipse(), print(), UMatrix4::row(), save(), setCol(), setDiag(), setMinor(), setRC(), setRow(), UVariable::setValueM(), snprint(), snprintMaple(), sqSum(), sub(), trace(), transpose(), UMatrix4::transposed(), UMatrix4::UMatrix4(), UMatrixBig::UMatrixBig(), UFuncLoca2::updateCovStatus(), and UFuncLocalize::updateCovStatus().
void UMatrix::copy | ( | UMatrix * | source | ) |
Copy a matrix.
References cols(), err, error(), get(), matrixSize, rows(), setRC(), and setSize().
Referenced by isCol(), UImAna::paintRoadImage(), UImageAna::paintRoadImage(), UImagePoly::paintRoadImage(), and transpose().
|
inline |
Get handle to opencv array structure. This can be used for all CvArr type arguments.
References mat.
Referenced by UImageAna::findRoad(), UImageAna::findRoadCroma(), UImagePoly::makeSimilarImage2(), UImagePoly::makeSimilarImage3(), and solve().
|
inline |
Get handle to opencv array structure. This can be used for all CvMat type arguments.
Referenced by UFuncStereo::initializeStereo(), UFuncStereo::processImages(), testMatrixVecBig(), testOpticalFlow(), testOpticalFlowHarris(), and UCamRad::updateLensParams().
double UMatrix::det | ( | int * | error | ) |
Find determinant if matrix is size 1x1, 2x2, 3x3
err | set to == 0 if sucessfull or |
err | set to = -1 if matrix is too big |
References mat.
Referenced by UMatrix4::density(), UMatrix4::det(), UMatrixBig::det(), and valid().
Calculates singular value decomposition (SVD) of this matrix (MxN with M >= N). So that: source = U * W * V'; The result is placed in W (diagonal if W is (NxN) or as vector if W is (Nx1). Also U and V can be calculated, columns in U (MxN) and rows in V (NxN) (or may be NULL if not needed). The matrix size of W, U and V must be set before call. The flag may be either 0 or sum of:
CV_SVD_MODIFY_A enables modification of matrix src1 during the operation. It speeds up the processing.
CV_SVD_U_T means that the tranposed matrix U is returned. Specifying the flag speeds up the processing.
CV_SVD_V_T means that the tranposed matrix V is returned. Specifying the flag speeds up the processing.
Preferred value is CV_SVD_MODIFY_A + CV_SVD_V_T. but default is just CV_SVD_V_T (a bit slower, but 'this' matrix is left as is).
Eigenvalue note:
If source matrix is symmetric the eigenvalues in W agree with matlab, otherwise it seems just to be some vector (diagonal) that can be used in back-transformation using the found U and V matrices. U and V are equal if source matrix is symmetric.
References cols(), error(), mat, and rows().
Referenced by testEigenvector(), and valid().
|
inline |
Return maximum number of elements available in array data area (rows * columns). Type is always double.
References matrixSize.
Referenced by UMatrixBig::UMatrixBig().
void UMatrix::error | ( | const int | ierr = -1 , |
const char * | message = "" |
||
) |
Set err value and show error message to console.
References err.
Referenced by add(), copy(), eig(), expand(), get(), init(), normalize(), setRC(), sub(), transpose(), UMatrix4::UMatrix4(), and valid().
bool UMatrix::expand | ( | const unsigned int | iRows, |
const unsigned int | iCols | ||
) |
Expand matrix maintaining old values. The 'err' value in matrix will be set to -1 if there is no more space to increase the matrix.
References cols(), err, error(), getData(), getRow(), matrixSize, mini(), rows(), and setSize().
Referenced by URotation::asMatrix4x4CtoW(), URotation::asMatrix4x4MtoR(), URotation::asMatrix4x4RtoM(), URotation::asMatrix4x4WtoC(), expand(), UCalibrationMarkSet::getErrorInPixels(), UCalibrationMarkSet::geterrorInPixels(), UCalibrationComponents::PaintChartInImage(), setSize(), testLinearAlgebra(), testMatrixResize(), testMatrixVecBig(), testOpticalFlow(), and testOpticalFlowHarris().
bool UMatrix::expand | ( | const unsigned int | iRows, |
const unsigned int | iCols, | ||
const double | iVal | ||
) |
|
inline |
Gets one value in a vector. Position is zero based, i.e. get(0) reads first element.
References mat.
Referenced by UCamParEst::adjustParameters(), UCamParEst::adjustParameters35(), URotation::asMatrix3x3CtoW(), URotation::asMatrix3x3K(), URotation::asMatrix3x3Kt(), URotation::asMatrix3x3O(), URotation::asMatrix3x3Ot(), URotation::asMatrix3x3P(), URotation::asMatrix3x3Pt(), URotation::asMatrix3x3WtoC(), copy(), DoFindPeak(), UResLocater::doLocatorUpdates(), UMatrix4::eig2x2(), UCalibrationMarkSet::evaluateChartPosRot(), UCalibrationMarkSet::evaluatePosRot(), UPose2pose::get2arcQ4(), UCalibrationMarkSet::getErrorInPixels(), UCalibrationMarkSet::geterrorInPixels(), UImAna::getMahalonobisDist(), UImageAna::getMahalonobisDist(), UImagePoly::getMahalonobisDist(), UImAna::getMahalonobisDistCroma(), UImageAna::getMahalonobisDistCroma(), UImagePoly::getMahalonobisDistCroma(), UPlane::getPlaneCrossing(), UImAna::imageContourMahaCroma(), UImageAna::imageContourMahaCroma(), UImagePoly::imageContourMahaCroma(), UCalibrationComponents::PaintChartInImage(), UClientFuncImgGui::paintClustEllipse(), UFuncFz::paintClustEllipse(), UPose::set(), UFuzzyPixel::setDistance(), UCamParEst::setEstMatrix(), UCamParEst::setEstMatrix35(), testMatrixDensity(), testMatrixVecBig(), testOpticalFlow(), testOpticalFlowHarris(), transpose(), UFuncLoca2::updateCovStatus(), and UFuncLocalize::updateCovStatus().
|
inline |
|
inline |
Get pointer to data area (first element)
References mat.
Referenced by add(), UFuzzyPixel::addCovariance(), UFuzzyPixel::addPosition(), UPosition::asVector3(), UPosition::asVector4(), clear(), UPosition::copy(), expand(), UResLocater::locate(), mult(), normalize(), UFuzzyPixel::setDistance(), setMat(), UVariable::setValueM(), sqSum(), sub(), UPaintPcp::update(), UFuncLoca2::updateCovStatus(), and UFuncLocalize::updateCovStatus().
|
inlinevirtual |
|
inline |
Get forst element in a row, for dynamic access to column elements
References mat.
Referenced by add(), expand(), UImagePoly::makeSimilarImage2(), setMinor(), and setRow().
bool UMatrix::init | ( | const unsigned int | rows, |
const unsigned int | cols | ||
) |
Initializes of a matrix to required size, with all elements left as is, that is: if column number is cahanged all data vontent (with exception of elements if first row) are reshuffeld.
References err, error(), mat, and matrixSize.
Referenced by URotation::asUnitZVector4CtoW(), UResLocater::doLocatorUpdates(), UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), UFuncStereo::initializeStereo(), UCamParEst::initParEst(), UCamParEst::initParEst35(), UCamPar::setMatrices(), UPoseQ::setQ(), setSize(), testLinearAlgebra(), UMatrix4::UMatrix4(), and UMatrixBig::UMatrixBig().
bool UMatrix::init | ( | const unsigned int | rows, |
const unsigned int | cols, | ||
const double | i | ||
) |
Initializes of a matrix to required size, and with elements along the main diagonal set to i. Other elements are set to 0.0.
References err, error(), mat, and matrixSize.
|
inline |
Initialize matrix with user provided data buffer
iRows | is (initial) matrix number of rows |
iCols | is (initial) matrix number of columns |
data | is array of doubles to hold at least the initial matrix, |
bufferSizeInDoubles | is the size of the double buffer (may have extra space for reorganisation of matrix. |
References cols(), err, mat, and matrixSize.
void UMatrix::inverse | ( | UMatrix * | B, |
int | method = CV_SVD |
||
) |
Transpose this matrix. Inverse. Make this matrix an inversed copy of B. The method ishould be CV_SVD for normal matrix and CV_SYM_SVD for symmetric matrices. These methods do not use temporary dynmically allocated matricec. The method CV_LU use gaussian elimination is also supported
References mat.
Referenced by UResLocater::doLocatorUpdates(), UImageAna::findRoadCroma(), UMatrix4::inversed(), isCol(), UImagePoly::makeSimilarImage2(), and testMatrixInv().
|
virtual |
Function to test if the class or one of its ancestors is of a specific type
Reimplemented from UDataBase.
References getDataType(), and UDataBase::isAlsoA().
Referenced by getDataType().
|
inline |
is vector a row or a column
References add(), copy(), inverse(), mult(), rows(), setMinor(), solve(), sub(), transpose(), and X.
Referenced by normalize(), and transpose().
|
inline |
|
inline |
Return maximum number of elements available in array data area (rows x columns). Type is always double.
References matrixSize.
Referenced by UCalibrationMarkSet::setBarcodePosRowSet(), and UCalibrationMarkSet::setCameraPosRowSet().
Resize this matrix as required, and if the size is increased the new elements are filled i along the main diagonal and other new elements are set to zero. Make this matrix the matrix product og A and B. this = A * B.
References cols(), err, mat, rows(), and setSize().
Referenced by UFuzzyPixel::addCovariance(), UFuzzySplit::classifyOld(), UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), UImAna::getAvgVar(), UImageAna::getAvgVar(), UImagePoly::getAvgVar(), UImagePoly::getAvgVar2(), UFuzzySplit::getCenter(), UFuzzySplit::getCovariance(), isCol(), UMatrix4::operator*(), testEigenvector(), and testMatrixVecBig().
void UMatrix::mult | ( | const double | scale | ) |
bool UMatrix::normalize | ( | ) |
Normalize homogeneous vector, so that last element is 1.
References absd(), err, error(), getData(), isCol(), isRow(), and size().
Referenced by UPosition::getPixelPos(), UCalibrationComponents::PaintChartInImage(), and setSize().
void UMatrix::print | ( | const char * | prestring | ) |
Print matrix values to console in float format
References cols(), err, and rows().
Referenced by UFuzzySplit::classifyOld(), UImAna::findContourPoly(), UImageAna::findContourPoly(), UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), UImageAna::findRoadCroma(), UCamPar::print(), testEigenvector(), testEigenvector2x2(), testLinearAlgebra(), testMatrix(), testMatrixDensity(), testMatrixInv(), testMatrixResize(), testMatrixVec(), testMatrixVecBig(), testOpticalFlow(), testOpticalFlowHarris(), testPoseMatrix(), testVar(), and valid().
|
inline |
Return number of rows in array
References mat.
Referenced by add(), UMatrix4::col(), copy(), UMatrix4::density(), UMatrix4::densityQi(), UMatrix4::det(), UMatrixBig::det(), eig(), UMatrix4::eig2x2(), expand(), get(), UFuzzySplit::getCovariance(), UVariable::getM(), UVarHist::getTimeSeries(), UMatrix4::inversed(), isCol(), mult(), UMatrix4::operator*(), UMatrix4::operator+(), UMatrix4::operator-(), UClientFuncImgGui::paintClustEllipse(), UFuncFz::paintClustEllipse(), print(), save(), setCol(), setDiag(), UCamParEst::setEstMatrix(), UCamParEst::setEstMatrix35(), setMinor(), setRC(), setRow(), UVariable::setValueM(), snprint(), snprintMaple(), sqSum(), sub(), trace(), transpose(), UMatrix4::transposed(), UMatrix4::UMatrix4(), UFuncLoca2::updateCovStatus(), and UFuncLocalize::updateCovStatus().
int UMatrix::save | ( | char * | filename, |
char | delim = ' ' |
||
) |
save to file in textfile format for MATLAB etc. with numbers in '-1.988e-12' type format with delimitor between columns as sepcified in DELIM, with default as space.
Returns 0 if successfull, else -1.
References cols(), err, and rows().
Referenced by UCalibrationMarkSet::evaluateChartPosRot(), testMatrixVecBig(), and valid().
bool UMatrix::save | ( | FILE * | f, |
const char * | name | ||
) |
|
inline |
Set up to 4 values in a vector.
Sets values within vector size only.
Returns 0.
References mat.
Referenced by U2Dpos::asCol2(), U2Dpos::asCol3(), UPose::asCol3(), UPose::asCol4(), U2Dpos::asRow2(), U2Dpos::asRow3(), UPose::asRow3(), UPose::asRow4(), UMatrix4::col(), DoFindPeak(), UMatrix4::eig2x2(), UImageAna::findRoad(), UImageAna::findRoadCroma(), UImAna::getAvgVar(), UImageAna::getAvgVar(), UImagePoly::getAvgVar(), UImagePoly::getAvgVar2(), UCalibrationMarkSet::getErrorInPixels(), UCalibrationMarkSet::geterrorInPixels(), UPlane::getPlaneCrossing(), UImagePoly::makeSimilarImage2(), UImagePoly::makeSimilarImage3(), UCalibrationComponents::PaintChartInImage(), UMatrix4::row(), testMatrixDensity(), testMatrixVec(), testMatrixVecBig(), testOpticalFlow(), testOpticalFlowHarris(), UFuncLoca2::updateCovStatus(), and UFuncLocalize::updateCovStatus().
|
inline |
Set one value in a vector. Position is zero based, i.e. set(0, 1.0) sets first element to 1.0.
returns 0 if within range
Referenced by URotation::asUnitZVector3CtoW(), URotation::asUnitZVector4CtoW(), and testMatrixVecBig().
int UMatrix::setCol | ( | unsigned int | col, |
const double | value0, | ||
const double | value1 = 0.0 , |
||
const double | value2 = 0.0 , |
||
const double | value3 = 0.0 |
||
) |
int UMatrix::setDiag | ( | double | value0, |
double | value1, | ||
double | value2 = 0.0 , |
||
double | value3 = 0.0 |
||
) |
Set matrix diagnal to these values. Other elements in matrix are untouched
References cols(), rows(), and setRC().
Referenced by UResLocater::doLocatorUpdates(), and valid().
bool UMatrix::setMat | ( | const int | rCnt, |
const int | cCnt, | ||
double * | values | ||
) |
Set matrix values from an array of double values.
rCnt | is the number of rows in matrix |
cCnt | is number of columns. |
values | is an array of size (rCnt,cCnt) with matrix values. first row first. |
References err, getData(), and setSize().
Referenced by UVariable::getM(), UFuncLoca2::updateCovStatus(), UFuncLocalize::updateCovStatus(), UCamRad::updateLensParams(), and valid().
int UMatrix::setMinor | ( | UMatrix * | mA, |
const unsigned int | ar, | ||
const unsigned int | ac | ||
) |
Make a mionor matrix as copy of 'mA' by removing row 'ar' and column 'ac'. Returns -1 if error in source or calculation.
References cols(), err, getRow(), rows(), and setSize().
Referenced by UMatrix4::det(), UMatrixBig::det(), and isCol().
|
inline |
Set a matrix element.
References cols(), err, error(), mat, and rows().
Referenced by URotation::asMatrix3x3CtoW(), URotation::asMatrix3x3K(), URotation::asMatrix3x3Kt(), URotation::asMatrix3x3O(), URotation::asMatrix3x3Ot(), URotation::asMatrix3x3P(), URotation::asMatrix3x3Pt(), URotation::asMatrix3x3WtoC(), UPosition::asMatrix4x4(), copy(), UResLocater::doLocatorUpdates(), UMatrix4::eig2x2(), UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), UPose2pose::get2arcQ4(), UFuzzySplit::getCovariance(), UPlane::getPlaneCrossing(), UClientFuncImgGui::paintClustEllipse(), UFuncFz::paintClustEllipse(), UCalibrationMarkSet::setBarcodePosRowSet(), UCalibrationMarkSet::setCameraPosRowSet(), setCol(), setDiag(), UCamParEst::setEstMatrix(), UCamParEst::setEstMatrix35(), UCamPar::setMatrices(), testMatrixVecBig(), and transpose().
int UMatrix::setRow | ( | unsigned int | row, |
const double | value0, | ||
const double | value1 = 0.0 , |
||
const double | value2 = 0.0 , |
||
const double | value3 = 0.0 |
||
) |
Make matrix as product of two vectors. Make outher product of these vectors Set up to first 4 elements in a row.
References cols(), err, getRow(), and rows().
Referenced by UPose::asMatrix2x2MtoP(), UPose::asMatrix2x2PtoM(), UPose::asMatrix3x3MtoP(), UPose::asMatrix3x3PtoM(), UPose::asMatrix4x4MtoP(), UPose::asMatrix4x4PtoM(), UPose::asMatrix4x4PtoMPos(), DoFindPeak(), UClientFuncLaserGui::doImage(), UResLocater::doLocatorUpdates(), UImAna::findContourPoly(), UImageAna::findContourPoly(), UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), UPose2pose::get2arcQ4(), UCamPar::getCtoPRob(), UImAna::getMahalonobisDist(), UImageAna::getMahalonobisDist(), UImagePoly::getMahalonobisDist(), UImAna::getMahalonobisDistCroma(), UImageAna::getMahalonobisDistCroma(), UImagePoly::getMahalonobisDistCroma(), UVarHist::getTimeSeries(), harris(), testEigenvector(), testEigenvector2x2(), testLinearAlgebra(), testMatrixResize(), testMatrixVec(), testMatrixVecBig(), testOpticalFlow(), testOpticalFlowHarris(), and valid().
int UMatrix::setRow | ( | unsigned int | row, |
unsigned int | valCnt, | ||
const double | val[] | ||
) |
|
inline |
Resize this matrix, any new elements are un-initialized.
References expand(), init(), and normalize().
Referenced by add(), UFuzzyPixel::addCovariance(), UPosition::asVector3(), UPosition::asVector4(), UFuzzySplit::classify(), UFuzzySplit::classifyOld(), copy(), UClientFuncLaserGui::doImage(), UResLocater::doLocatorUpdates(), UCalibrationMarkSet::evaluateChartPosRot(), UCalibrationMarkSet::evaluatePosRot(), expand(), UImAna::findContourPoly(), UImageAna::findContourPoly(), UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), UImAna::getMahalonobisDist(), UImageAna::getMahalonobisDist(), UImagePoly::getMahalonobisDist(), UImAna::getMahalonobisDistCroma(), UImageAna::getMahalonobisDistCroma(), UImagePoly::getMahalonobisDistCroma(), UVarHist::getTimeSeries(), UResLocater::init_matrix(), UFuzzySplit::initFromValues(), mult(), UFuzzyPixel::setDistance(), setMat(), setMinor(), sub(), testEigenvector(), testLinearAlgebra(), testMatrixInv(), testMatrixVecBig(), transpose(), UFuncLoca2::updateCovStatus(), and UFuncLocalize::updateCovStatus().
|
inline |
Get the size of the actual vector. More space may be allocated - see maxSize().
References mat.
Referenced by add(), UCamParEst::adjustParameters(), clear(), UPosition::copy(), mult(), normalize(), UPose::set(), setAt(), and sub().
|
virtual |
|
virtual |
Solve the set of equation in this matrix with the unknowns in result vector X beeing equal to the iB vector. this * X = iB. Returns true if result in X is valid (matrix not singular).
References cvArr().
Referenced by DoFindPeak(), UCalibrationMarkSet::evaluateChartPosRot(), UCalibrationMarkSet::evaluatePosRot(), UPlane::getPlaneCrossing(), isCol(), UCamParEst::solveLeastSquare(), testMatrixVec(), and testMatrixVecBig().
double UMatrix::sqSum | ( | ) |
Make this matrix the element difference of the matrix A and B. this = A - B.
References cols(), error(), getData(), rows(), setSize(), and size().
Referenced by UImAna::getAvgVar(), UImageAna::getAvgVar(), UImagePoly::getAvgVar(), UImagePoly::getAvgVar2(), isCol(), UMatrix4::operator-(), and testLinearAlgebra().
void UMatrix::sub | ( | UMatrix * | A | ) |
double UMatrix::trace | ( | ) |
Get sum of diagonal elements
References cols(), mini(), and rows().
Referenced by UImAna::findContourPolyCroma(), UImageAna::findContourPolyCroma(), UImagePoly::findContourPolyCroma(), harris(), testEigenvector(), and valid().
void UMatrix::transpose | ( | UMatrix * | B = NULL | ) |
Transpose. Make this matrix a transposed version of B.
References cols(), copy(), error(), get(), isCol(), isRow(), rows(), setRC(), and setSize().
Referenced by UResLocater::doLocatorUpdates(), UImAna::getAvgVar(), UImageAna::getAvgVar(), UImagePoly::getAvgVar(), UImagePoly::getAvgVar2(), isCol(), testLinearAlgebra(), and UMatrix4::transposed().
|
inline |
int UMatrix::err |
Error, set to -1 on matrix operation error
Referenced by clear(), copy(), UMatrix4::density(), UMatrix4::det(), UMatrixBig::det(), UMatrix4::eig2x2(), error(), expand(), UCalibrationMarkSet::getErrorInPixels(), UCalibrationMarkSet::geterrorInPixels(), init(), mult(), normalize(), print(), save(), setCol(), setMat(), setMinor(), setRC(), setRow(), snprint(), UCamParEst::solveLeastSquare(), testMatrixDensity(), UMatrix4::UMatrix4(), UMatrixBig::UMatrixBig(), and valid().
|
protected |
Actual matrix data area in opencv-format
Referenced by cols(), UMatrix4::connect(), cvArr(), det(), eig(), get(), getData(), getRow(), init(), inverse(), mult(), rows(), set(), setAt(), setRC(), size(), UMatrix4::UMatrix4(), UMatrixBig::UMatrixBig(), and UMatrixBig::~UMatrixBig().
|
protected |
Number of elements in matrix buffer, i.e. may be larger than rows X columns.
Referenced by copy(), elements(), expand(), init(), maxSize(), UMatrix4::UMatrix4(), and UMatrixBig::UMatrixBig().