Basic Image AlgorithmS Library
2.8.0
|
describes a projective 3D -> 2D mapping in homogenous coordinates More...
#include <Geometry/PMatrix.hh>
Public Types | |
typedef const T * | const_iterator |
typedef const T & | const_reference |
enum | E_ParametrizationType { AXIS_TIMES_ANGLE, AXIS_AND_ANGLE, EULER, QUATERNION } |
description of supported parametrization types More... | |
typedef T | element_type |
typedef T * | iterator |
typedef T * | pointer |
typedef T & | reference |
typedef Subscript | size_type |
typedef T | value_type |
Public Member Functions | |
void | AbsIP () |
absolute values of all elements of the matrix (in place) More... | |
Matrix< PMATRIX_TYPE > | Adjoint () const |
computes the adjoint matrix More... | |
HomgPoint3D | Backproject (const HomgPoint2D &x, double mu=1) |
Back projects image point x to 3D space and returns ray on which the 3D space point lies. More... | |
void | BackprojectByZDepth (const double &x, const double &y, const double &z_depth, HomgPoint3D &res) |
Inverts the PMatrix application to a 3D point whose z-component in cameracoordinates and its imagepoint (x,y) is known. More... | |
HomgPoint3D | BackprojectPseudoinverse (const HomgPoint2D &x) |
Returns a homogenized 3D point X on the viewray of x, which always lies in front of the camera(this is checked). More... | |
void | BackprojectWorldCoo (const HomgPoint2D &point, double depth, HomgPoint3D &res) |
returns a 3D point res which is located depth away from center of projection in direction given by point More... | |
int | BBCIn (std::ifstream &ifs, const double &AddCenterPointShiftX=0.0, const double &AddCenterPointShiftY=0.0) |
Load next piece of calibration data from an open BBC-Free-D file. More... | |
void | clear () |
stl conform interface More... | |
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) |
composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R) More... | |
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C) |
void | Compose (const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) |
calibrated case, uses K=Identity More... | |
void | Compose (const Matrix3x3< PMATRIX_TYPE > &R, const HomgPoint3D &C) |
calibrated case, uses K=Identity More... | |
void | Compose (const Matrix3x3< PMATRIX_TYPE > &K, const Vector< double > ¶metrization, const enum E_ParametrizationType param_type) |
Compose a projection matrix using a parametrization. More... | |
void | Compose (const Matrix3x3< double > &K, const Matrix3x3< double > &R, const Vector3< double > &C) |
composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R) More... | |
void | Compose (const Matrix3x3< double > &K, const Matrix3x3< double > &R, const HomgPoint3D &C) |
void | Compose (const Matrix3x3< double > &K, const Vector< double > ¶metrization, enum E_ParametrizationType param_type) |
void | DecomposeAa (BIAS::Matrix3x3< PMATRIX_TYPE > &A, BIAS::Vector3< PMATRIX_TYPE > &a) const |
decompose the P-matrix to [ A | a ] where A is a 3x3-matrix and a is a 3-vector. More... | |
Subscript | dim (Subscript d) const |
void | GaussJordan () |
use the Gauss Jordan Algrithm to transform the matrix to reduced row echelon form. More... | |
int | GetA (Vector3< double > &A) |
returns the unit vector A which is the normal vector to the image plane in world coordinates. More... | |
BIAS::Vector3< double > | GetA () |
returns the unit vector A which is the normal vector to the image plane in world coordinates. More... | |
int | GetC (Vector3< double > &C) |
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached More... | |
BIAS::Vector3< double > | GetC () |
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached More... | |
int | GetC (HomgPoint3D &C) |
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached More... | |
Matrix4x4< PMATRIX_TYPE > | GetCanonicalH () const |
Get the projective homography matrix so that P * H = [ I | 0 ]. More... | |
void | GetCanonicalH (Matrix4x4< PMATRIX_TYPE > &ProjH) const |
int | GetCovariance (BIAS::Matrix< double > &cov) |
float | GetFieldOfView (const unsigned int dimX, const unsigned int dimY, const bool optmin=true) |
float | GetFieldOfViewX (const unsigned int dimX, const unsigned int dimY) |
float | GetFieldOfViewY (const unsigned int dimX, const unsigned int dimY, const bool &compY=true) |
int | GetH (Vector3< double > &H) |
returns the unit vector H0, while H0 and V0 span the camera coordinate system in world coordinates More... | |
BIAS::Vector3< double > | GetH () |
int | GetHinf (BIAS::Matrix3x3< double > &Hinf) |
void | GetImagePlane (HomgPlane3D &plane) |
returns image plane in world coordinates More... | |
HomgPlane3D | GetImagePlane () |
calls the above More... | |
int | GetIntersectionOfImagePlanes (PMatrix &P, HomgLine2D &intersection) |
return line resulting of intersection of the two image planes in pixel coordinates of this camera return -1 if camera planes are parallel More... | |
HomgLine2D | GetIntersectionOfImagePlanes (PMatrix &P) |
calls the above returns line at infinity if planes are parallel More... | |
int | GetK (KMatrix &K) |
calibration matrix More... | |
KMatrix | GetK () |
Matrix< PMATRIX_TYPE > | GetMax (Matrix< PMATRIX_TYPE > &m) |
returns an matrix the same size as the matrix n and m with the largest elements taken from n or m More... | |
Matrix< PMATRIX_TYPE > | GetMin (Matrix< PMATRIX_TYPE > &m) |
returns an matrix the same size as the matrix n and m with the smallest elements taken from n or m More... | |
Vector3< double > | GetNormRayWorldCoo (const HomgPoint2D &point) |
returns normed vector from C to point analytical inverse of K is used More... | |
int | GetNullVector (HomgPoint3D &C) |
this is another way of getting C, especially interesting for non-metric cameras More... | |
double | GetProjectionError (const std::vector< BIAS::HomgPoint2D > &points2D, const std::vector< BIAS::HomgPoint3D > &points3D) |
returns average squared projection Error More... | |
int | GetPseudoInverse (BIAS::Matrix< double > &Pinv) |
returns 4x3 pseudo inverse More... | |
int | GetR (Matrix3x3< double > &R) |
Matrix3x3< double > | GetR () |
Vector3< double > | GetRayWorldCoo (const HomgPoint2D &point) |
returns vector from C to point, w of point determines ray length analytical inverse of K is used More... | |
void | GetSVD (Matrix< double > &U, Vector< double > &S, Matrix< double > &VT) |
Returns SVD of this. More... | |
BIAS::Vector3< double > | GetUp_gl () |
int | GetV (Vector3< double > &V) |
This is not the cam.# standard CAHV, but the unit vector H0. More... | |
BIAS::Vector3< double > | GetV () |
initialize (M, N) | |
void | InvalidateDecomposition () |
to re-Decompose_() after filling with data use this. More... | |
bool | IsIdentity (double eps=0.0) const |
Checks if the matrix a an identity. More... | |
bool | IsInFrontOfCamera (const Vector3< double > &X) |
checks whether X is in optical A-dir from C (only for metric cameras) More... | |
bool | IsMetric () |
bool | IsZero (double eps=0.0) const |
Checks if the matrix is a null matrix. More... | |
void | Kronecker (Matrix< PMATRIX_TYPE > const B, Matrix< PMATRIX_TYPE > &dest) const |
Kronecker-product with matrix, result in dest. More... | |
Subscript | lbound () const |
bool | Load (const std::string &filename) |
overload Load because it has to invalidate decomposition! JW 09/2003 More... | |
int | LoadBan (const std::string &filename, const unsigned int &Time=0) |
Loads a PMatrix from .ban file given by AddCameraKey and Time index. More... | |
int | LoadBBC (const std::string &filename, const double &AddCenterPointShiftX=0.0, const double &AddCenterPointShiftY=0.0) |
Load calibration data file from BBC-Free-D system. More... | |
int | LoadBOG (const std::string &filename) |
Load a Daimler .bog fiel and compose a P matrix from it. More... | |
int | LoadPARTXT (const std::string &filenameParTxt, const unsigned int &index, std::string &correspImgFilename, int &nTotal) |
Load a PMatrix from a _par.txt (S. More... | |
void | Mult (const Vector4< PMATRIX_TYPE > &argvec, Vector3< PMATRIX_TYPE > &destvec) const |
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec More... | |
void | Mult (const Matrix4x4< PMATRIX_TYPE > &argmat, Matrix3x4< PMATRIX_TYPE > &destmat) const |
matrix-matrix multiplication with Matrix4x4 storing the result in destmat More... | |
PMatrix & | newsize (int rows, int cols) |
setting a new size different from 3x4 is not allowed for the fixed size P-Matrix overloads the general newsize from basec class More... | |
Matrix< T > & | newsize (Subscript M, Subscript N) |
void | Normalize () |
scale P such that optical axis (first three entries of last row) has unit length More... | |
Subscript | num_cols () const |
Subscript | num_rows () const |
reference | operator() (Subscript i) |
const_reference | operator() (Subscript i) const |
reference | operator() (Subscript i, Subscript j) |
const_reference | operator() (Subscript i, Subscript j) const |
PMatrix & | operator= (const PMatrix &mat) |
assignment operator More... | |
T * | operator[] (Subscript i) |
const T * | operator[] (Subscript i) const |
PMatrix () | |
PMatrix (const MatrixInitType &i) | |
PMatrix (const std::string &s) | |
replacement for above JW More... | |
PMatrix (const PMatrix &A) | |
PMatrix (const PMatrixBase &Amat_) | |
PMatrix (const Matrix< PMATRIX_TYPE > &Amat) | |
PMatrix (const Matrix3x3< PMATRIX_TYPE > &K, const Matrix3x3< PMATRIX_TYPE > &R, const Vector3< PMATRIX_TYPE > &C) | |
Take R, K, C and compose PMatrix. More... | |
std::ostream & | Print (std::ostream &s, const int width, const int precision, bool scientific=true) const |
std::ostream & | Print (std::ostream &s, const bool intCastOutput=false, const bool binaryOutput=false, const bool forceFullPrecision=false) const |
std::ostream & | PrintPretty (std::ostream &s, const std::string &name="", const int width=8, const bool alignLeft=true) const |
std::istream & | Read (std::istream &s, const bool intCastInput=false, const bool binaryInput=false) |
JW. More... | |
bool | Save (const std::string &filename) |
set (value) | |
void | set_identity () |
Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4 method: 1 0 0 0 0 1 0 0 0 0 1 0. More... | |
void | SetC (const Vector3< double > &newC) |
modify C and re-compose P not fine to use, better use: Compose() More... | |
int | SetCovariance (const BIAS::Matrix< double > &cov) |
void | SetFromVector (const Vector< PMATRIX_TYPE > &vals) |
Sets P-Matrix from a vector which contains the elements of P row wise. More... | |
void | SetIdentity () |
set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!) More... | |
Subscript | size () const |
void | SwapRows (const int i, const int r) |
swaps two rows More... | |
Matrix< PMATRIX_TYPE > | Transpose () const |
transpose function, storing data destination matrix More... | |
void | Vec (Vector< PMATRIX_TYPE > &dest) const |
vec-operator returns the elements of the matrix columwise as vector More... | |
int | WriteCAHV_10 (int cols, int rows, std::ostream &os=std::cout) |
write the CAHV decomposition of this P matrix in CAHV 1,0 format to stream os (see RK's/TNT CAHV1.0 fromat in SequenceReconstruction/ Sequenetracking/KochSI.C) cols, rows is the size of the image this P matrix corresponds to. More... | |
xmlNodePtr | XMLAdd (const xmlNodePtr Node, XMLIO &XMLObject) const |
call this to add the class to a node of a given xml tree More... | |
virtual int | XMLGetClassName (std::string &TopLevelTag, double &Version) const |
specialization of XML block name function More... | |
virtual int | XMLIn (const xmlNodePtr Node, XMLIO &XMLObject) |
specialization of XML read function More... | |
virtual int | XMLOut (const xmlNodePtr Node, XMLIO &XMLObject) const |
specialization of XML write function More... | |
int | XMLRead (const std::string &Filename) |
derived classes must implement the function XMLIn which is called by this function XMLRead to read everything with name Filename into (*this). More... | |
int | XMLReadFromString (const std::string &str) |
reconstruct xml tree from string More... | |
int | XMLWrite (const std::string &Filename, int CompressionLevel=0, bool AutoAddCompressionSuffix=true, std::string encoding="UTF-8") const |
call this to add the class to a new xml tree and write it to the file Filename. More... | |
int | XMLWriteToString (std::string &str, std::string encoding="UTF-8") const |
serialize xml tree to string More... | |
virtual | ~PMatrix () |
destructor untested (04/17/2002) More... | |
Arithmetic | |
void | Mult (const Matrix< PMATRIX_TYPE > &arg, Matrix< PMATRIX_TYPE > &result) const |
matrix multiplication, result is not allocated More... | |
void | Mult (const Matrix< PMATRIX_TYPE > &arg) |
in Place matrix multiplication this is equal to M = M * arg, but faster More... | |
void | Mult (const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const |
matrix vector multiplication, result is not allocated More... | |
void | AddIP (const PMATRIX_TYPE &scalar) |
in place addition function More... | |
void | AddIP (const Matrix< PMATRIX_TYPE > &arg) |
Adds arg to this. More... | |
void | SubIP (const Matrix< PMATRIX_TYPE > &arg) |
Subtracts arg from this this -= arg. More... | |
void | SubIP (const PMATRIX_TYPE &scalar) |
in place subtraction function More... | |
void | Add (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const |
addition function, storing data destination matrix More... | |
void | Sub (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const |
substraction function, storing data destination matrix More... | |
void | MultiplyIP (const PMATRIX_TYPE &scalar) |
in place multiplication function More... | |
void | Multiply (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const |
multiplication function, storing data destination matrix More... | |
void | MultLeft (const Matrix< PMATRIX_TYPE > &arg) |
in Place matrix multiplication this is equal to M = arg*M, but faster More... | |
void | MultLeft (const Vector< PMATRIX_TYPE > &arg, Vector< PMATRIX_TYPE > &result) const |
vector matrix multiplication result=arg*this. More... | |
void | MultiplyWithTransposeOf (const Matrix< PMATRIX_TYPE > &arg, Matrix< PMATRIX_TYPE > &result) const |
matrix matrix multiplication for multiplication with the transpose of the given matrix, result=this*arg^T. More... | |
void | DivideIP (const PMATRIX_TYPE &scalar) |
in place division function More... | |
void | Divide (const PMATRIX_TYPE &scalar, Matrix< PMATRIX_TYPE > &dest) const |
division function, storing data destination matrix More... | |
void | DivideElementwise (const Matrix< PMATRIX_TYPE > &arg) |
elementwise division function in place More... | |
void | GetSystemMatrix (Matrix< PMATRIX_TYPE > &dest) const |
compute square system matrix dest = A^T * A More... | |
Get Functions | |
PMATRIX_TYPE | GetMax () const |
Returns the maximum value of the matrix elements. More... | |
PMATRIX_TYPE | GetMin () const |
Returns the minimum value of the matrix elements. More... | |
PMATRIX_TYPE * | GetData () |
get the pointer to the data array of the matrix (for faster direct memeory access) More... | |
const PMATRIX_TYPE * | GetData () const |
const PMATRIX_TYPE ** | GetDataArray () const |
returns zero based arry for data access More... | |
PMATRIX_TYPE ** | GetDataArray () |
PMATRIX_TYPE ** | GetDataArray1 () const |
returns 1 based array to data access More... | |
unsigned int | GetRows () const |
unsigned int | GetCols () const |
const PMATRIX_TYPE * | GetDataLast () const |
Get a pointer to the last data element Do not use this on unitilized matrices with <= on pointers because on an unitilized matrix GetData() will be NULL and last Element < (typically FFFFF8) We don't want an if here for performance reasons of the innerst loop. More... | |
PMATRIX_TYPE * | GetDataLast () |
Vector< PMATRIX_TYPE > | GetRow (const int &row) const |
return a copy of row "row" of this matrix, zero based counting More... | |
Vector< PMATRIX_TYPE > | GetCol (const int &col) const |
return a copy of column "col", zero based counting More... | |
void | GetSubMatrix (const size_t startRow, const size_t startCol, const size_t numRows, const size_t numCols, Matrix< PMATRIX_TYPE > &submatrix) const |
return a submatrix from this. More... | |
void | GetSubMatrix (const Vector< int > &rows, const Vector< int > &cols, Matrix< PMATRIX_TYPE > &submatrix) const |
return a submatrix from this. More... | |
Matrix< PMATRIX_TYPE > | GetSubMatrix (const Vector< int > &rows, const Vector< int > &cols) const |
return a submatrix from this. More... | |
void | SetSubMatrix (const size_t startRowInThis, const size_t startColInThis, const Matrix< PMATRIX_TYPE > &submatrix, const size_t startRowInSub, const size_t startColInSub, const size_t numRows, const size_t numCols) |
sets a submatrix in this. More... | |
void | SetSubMatrix (const size_t startRowInThis, const size_t startColInThis, const Matrix3x3< PMATRIX_TYPE > &submatrix) |
sets a 3x3 submatrix in this. More... | |
void | SetSubMatrix (const size_t startRowInThis, const size_t startColInThis, const Vector3< PMATRIX_TYPE > &subvector) |
sets a 3x1 submatrix in this. More... | |
void | SetRow (const int row, const Vector< PMATRIX_TYPE > &data) |
set a row of matrix from vector More... | |
void | SetCol (const int row, const Vector< PMATRIX_TYPE > &data) |
set a col of matrix from vector More... | |
void | Set (const int row, const int col, const Matrix< PMATRIX_TYPE > &data) |
Copies the contents of data into this at the position indicated by row and col. More... | |
void | Set (const int row, const int col, const Vector< PMATRIX_TYPE > &data) |
Copies the contents of data into this at the position indicated by row and col. More... | |
void | SetTranspose (const int row, const int col, const Vector< PMATRIX_TYPE > &data) |
Copies the contents of data into this at the position indicated by row and col. More... | |
int | GetNumElements () const |
Returns the total number of elements. More... | |
void | GetMaxMin (PMATRIX_TYPE &max, PMATRIX_TYPE &min) const |
return biggest and smallest entry More... | |
void | GetAbsMaxMin (PMATRIX_TYPE &max, PMATRIX_TYPE &min) const |
return biggest and smallest absolute values More... | |
PMATRIX_TYPE | GetMean () const |
Returns the mean value of the matrix elements. More... | |
PMATRIX_TYPE | NormL1 () const |
Return the L1 norm: |a| + |b| + |c| + ... More... | |
double | NormL2 () const |
Return the L2 norm: a^2 + b^2 + c^2 + ... More... | |
double | NormFrobenius () const |
Return Frobenius norm = sqrt(trace(A^t * A)). More... | |
PMATRIX_TYPE | Trace () const |
PMATRIX_TYPE | DetSquare () const |
Set Functions | |
void | SetZero () |
Sets all values to zero. More... | |
void | MakeSymmetric () |
componentwise: this = 0.5(this + this^T) yields symmetric matrix only allowed for square shaped matrices More... | |
void | Fill (const PMATRIX_TYPE &scalar) |
Takes the elements of a Vector and put them as diagonal elements into a matrix. More... | |
Scaling and Normalization | |
void | NormalizeColsToOne (const int norm_row_index) |
divides each column of the matrix through the element norm_row_index. More... | |
void | NormalizeRowsToOne (const int norm_col_index) |
divides each row of the matrix through the element norm_col_index. More... | |
void | NormalizeRows () |
Normalizes each row to L2 norm one. More... | |
void | NormalizeCols () |
Normalizes each coloumn to L_2 norm one. More... | |
void | ScaleRow (int NoRow, PMATRIX_TYPEscale) |
Scales row NoRow with scale. More... | |
void | ScaleCol (int NoCol, PMATRIX_TYPEscale) |
Scales column NoCol with scale. More... | |
Input / Output | |
bool | Save (const std::string &filename) const |
method to save directly to a given filename. More... | |
int | WriteMatlab (std::ostream &ostr, const std::string &name) const |
Write the matrix in Matlab format to the given stream. More... | |
bool | BinRead (const char *filename) const |
This method reads a matrix from a given file in binary format. More... | |
bool | BinWrite (const char *filename) const |
This method writes a matrix to a given file in binary format. More... | |
Protected Member Functions | |
void | CheckDecomposition_ () |
check if Decomposition is still valid More... | |
void | CheckSVD_ () |
check if SVD is still valid More... | |
void | Compose_ () |
void | copy (const T *v) |
int | Decompose_ () |
Computes K,R,C, assuming a metric PMatrix P = K[R^T | -R^T * C] with K[0][1]=0 (zero skew) and K[2][2]=1. More... | |
void | destroy () |
void | initialize (Subscript M, Subscript N) |
int | MakeSVD_ () |
RMatrixBase | Parametrization2R_ (const Vector< double > ¶metrization, const enum E_ParametrizationType param_type) const |
void | set (const T &val) |
Protected Attributes | |
Vector3< double > | A_ |
unit vector in wcs assigning the direction of the optical axis More... | |
Vector3< double > | C_ |
camera center in wcs (extrinsic parameter) More... | |
Matrix< double > | Covariance_ |
Vector3< double > | H0_ |
unit vector in wcs assigning the direction of the horizontal axis of the image plane More... | |
Matrix3x3< double > | Hinf_ |
Hinfinity. More... | |
bool | IsDecomposed_ |
tells us whether we have a chached decomposition with C,A,... More... | |
bool | IsMetric_ |
tells us whether we have an arbitrary 3x4 matrix or a P which is exactly a composition of P = K * R [ I | -C ] this is called a metric pmatrix More... | |
KMatrix | K_ |
camera calibration matrix (intrinsic parameter) More... | |
Subscript | m_ |
Subscript | mn_ |
Subscript | n_ |
Matrix3x4< double > | PConsistencyBackup_ |
backup of P at time of last decomposition to check whether decomposition is still valid More... | |
Matrix3x4< double > | PConsistencyBackupSVD_ |
Matrix3x3< double > | R_ |
rotation matrix (intrinsic parameter) More... | |
T ** | row_ |
T ** | rowm1_ |
SVD * | Svd_ |
(for decomposition, docu: JW 11/2002) More... | |
Vector3< double > | V0_ |
unit vector in wcs assigning the direction of the vertical axis of the image plane More... | |
T * | v_ |
T * | vm1_ |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
Matrix< T > | operator* (const Matrix< T > &A, const Matrix< T > &B) |
template<class T > | |
Vector< T > | operator* (const Matrix< T > &A, const Vector< T > &x) |
template<class T > | |
Matrix< T > | operator+ (const Matrix< T > &A, const Matrix< T > &B) |
template<class T > | |
Matrix< T > | operator- (const Matrix< T > &A, const Matrix< T > &B) |
std::ostream & | operator<< (std::ostream &s, const Matrix< char > &A) |
std::ostream & | operator<< (std::ostream &s, const Matrix< unsigned char > &A) |
template<class T > | |
std::ostream & | operator<< (std::ostream &s, const Matrix< T > &A) |
std::istream & | operator>> (std::istream &s, Matrix< unsigned char > &A) |
std::istream & | operator>> (std::istream &s, Matrix< char > &A) |
template<class T > | |
std::istream & | operator>> (std::istream &s, Matrix< T > &A) |
describes a projective 3D -> 2D mapping in homogenous coordinates
The P Matrix is a 3x4 matrix (3 rows {Zeilen}, 4 columns{Spalten}) describing a mapping between a 3D projective point X in space and the corresponding projective 2D point x (in an image plane).
x = P * X
where X is of type HomgPoint3D and x of type HomgPoint2D. After homogenizing, x[0] and x[1] contain the image coordinates of the projection of the 3D point.
If P is a metric camera, it can be composed/decomposed into external parameters (orientation R and center C) and internal parameters (such as the focal length in the calibration matrix K):
With R' = transpose of R, K = Camera calibration matrix and C = Camera center is: P = (K R' | -K R' C)
See also the more general geometry section.
Only implementation very specific to PMatrix (and not valid for general matrices, e.g. like decomposition) should be implemented here.
Definition at line 88 of file PMatrix.hh.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
description of supported parametrization types
Enumerator | |
---|---|
AXIS_TIMES_ANGLE | |
AXIS_AND_ANGLE | |
EULER | |
QUATERNION |
Definition at line 166 of file PMatrixBase.hh.
|
inline |
Definition at line 95 of file PMatrix.hh.
|
inlineexplicit |
Definition at line 98 of file PMatrix.hh.
|
explicit |
replacement for above JW
Definition at line 52 of file PMatrix.cpp.
References InvalidateDecomposition(), and Svd_.
|
inline |
Definition at line 107 of file PMatrix.hh.
|
inline |
Definition at line 112 of file PMatrix.hh.
BIAS::PMatrix::PMatrix | ( | const Matrix< PMATRIX_TYPE > & | Amat | ) |
Definition at line 69 of file PMatrix.cpp.
References InvalidateDecomposition(), IsMetric_, TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and Svd_.
|
virtual |
destructor untested (04/17/2002)
Definition at line 45 of file PMatrix.cpp.
|
inherited |
absolute values of all elements of the matrix (in place)
|
inlineinherited |
addition function, storing data destination matrix
implementation
|
inlineinherited |
|
inlineinherited |
Adds arg to this.
|
inlineinherited |
computes the adjoint matrix
|
inherited |
Back projects image point x to 3D space and returns ray on which the 3D space point lies.
Definition at line 164 of file PMatrixBase.cpp.
References BIAS::HomgPoint3D, and BIAS::Matrix3x3< T >::InvertIP().
void BIAS::PMatrix::BackprojectByZDepth | ( | const double & | x, |
const double & | y, | ||
const double & | z_depth, | ||
HomgPoint3D & | res | ||
) |
Inverts the PMatrix application to a 3D point whose z-component in cameracoordinates and its imagepoint (x,y) is known.
Definition at line 454 of file PMatrix.cpp.
References GetC(), GetK(), GetR(), BIAS::KMatrix::Invert(), and BIAS::HomgPoint3D::Set().
HomgPoint3D BIAS::PMatrix::BackprojectPseudoinverse | ( | const HomgPoint2D & | x | ) |
Returns a homogenized 3D point X on the viewray of x, which always lies in front of the camera(this is checked).
Definition at line 483 of file PMatrix.cpp.
References GetC(), GetPseudoInverse(), and BIAS::HomgPoint3D::Homogenize().
void BIAS::PMatrix::BackprojectWorldCoo | ( | const HomgPoint2D & | point, |
double | depth, | ||
HomgPoint3D & | res | ||
) |
returns a 3D point res which is located depth away from center of projection in direction given by point
Definition at line 468 of file PMatrix.cpp.
References GetC(), GetNormRayWorldCoo(), and BIAS::HomgPoint3D::Set().
Referenced by BIAS::GenSynthMatches::_CreateStatic3DPoints(), and BIAS::GenSynthMatches::CreateStatic3DPoint().
int BIAS::PMatrix::BBCIn | ( | std::ifstream & | ifs, |
const double & | AddCenterPointShiftX = 0.0 , |
||
const double & | AddCenterPointShiftY = 0.0 |
||
) |
Load next piece of calibration data from an open BBC-Free-D file.
AddCenterPointShiftX | add this to the principle point (in meter) |
AddCenterPointShiftY | add this to the principle point (in meter) |
Definition at line 917 of file PMatrix.cpp.
References Compose(), BIAS::Vector3< T >::CrossProduct(), and BIAS::Matrix3x3< T >::SetIdentity().
Referenced by LoadBBC().
|
inherited |
This method reads a matrix from a given file in binary format.
The file is not human read-/editable but provides full precision. A dimension check is performed.
|
inherited |
This method writes a matrix to a given file in binary format.
The file is not human read-/editable but provides full precision.
|
inlineprotected |
check if Decomposition is still valid
Definition at line 576 of file PMatrix.hh.
References BIAS::Matrix< T >::GetData(), BIAS::Matrix< PMATRIX_TYPE >::GetData(), and PConsistencyBackup_.
Referenced by GetA(), GetC(), GetH(), GetHinf(), GetImagePlane(), GetK(), GetR(), GetRayWorldCoo(), GetV(), and Normalize().
|
inlineprotected |
check if SVD is still valid
Definition at line 564 of file PMatrix.hh.
References BIAS::Matrix< T >::GetData(), BIAS::Matrix< PMATRIX_TYPE >::GetData(), and PConsistencyBackupSVD_.
Referenced by GetPseudoInverse(), MakeSVD_(), and Normalize().
|
inlinevirtualinherited |
stl conform interface
Reimplemented from BIAS::Matrix< PMATRIX_TYPE >.
Definition at line 149 of file Matrix3x4.hh.
|
inherited |
composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)
Definition at line 34 of file PMatrixBase.cpp.
References BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::MultIP(), and BIAS::Matrix3x3< T >::TransposeIP().
Referenced by Compose(), BIAS::PMatrixBase::PMatrixBase(), BIAS::Covariance3Dto2D::Transform_(), and BIAS::Covariance3Dto2DHomg::Transform_().
|
inherited |
Definition at line 57 of file PMatrixBase.cpp.
References BIAS::HomgPoint3D::IsAtInfinity(), and BIAS::Vector3< T >::Set().
|
inherited |
calibrated case, uses K=Identity
Definition at line 70 of file PMatrixBase.cpp.
References BIAS::Matrix3x3< T >::SetIdentity().
|
inherited |
calibrated case, uses K=Identity
Definition at line 78 of file PMatrixBase.cpp.
References BIAS::Matrix3x3< T >::SetIdentity().
|
inherited |
Compose a projection matrix using a parametrization.
The supported parametrization vector always starts with the camera center followed by the camera orientation. Currently Euler angles, axis (norm 1) and angle, axis times angle and quaternion are supported as orientation parametrization.
Definition at line 86 of file PMatrixBase.cpp.
void BIAS::PMatrix::Compose | ( | const Matrix3x3< double > & | K, |
const Matrix3x3< double > & | R, | ||
const Vector3< double > & | C | ||
) |
composes this from K, R and C using P = [ K R' | -K R' C ] with R' = transpose(R)
Definition at line 581 of file PMatrix.cpp.
References A_, C_, BIAS::PMatrixBase::Compose(), H0_, Hinf_, BIAS::Matrix3x3< T >::InvertIP(), IsDecomposed_, IsMetric_, K_, PConsistencyBackup_, R_, Svd_, and V0_.
Referenced by BIAS::PMatrixEstimation::AutoCalib(), BIAS::PMatrixEstimation::AutoCalib_(), BBCIn(), Compose(), BIAS::PMatrixLinear::ComputeCalibrated(), BIAS::GenGroundTruth::CreateMatches(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::CamPoseCalib::GetP(), and XMLIn().
void BIAS::PMatrix::Compose | ( | const Matrix3x3< double > & | K, |
const Matrix3x3< double > & | R, | ||
const HomgPoint3D & | C | ||
) |
Definition at line 617 of file PMatrix.cpp.
References Compose(), Hinf_, BIAS::Matrix3x3< T >::InvertIP(), BIAS::HomgPoint3D::IsAtInfinity(), IsDecomposed_, PConsistencyBackup_, and BIAS::Vector3< T >::Set().
void BIAS::PMatrix::Compose | ( | const Matrix3x3< double > & | K, |
const Vector< double > & | parametrization, | ||
enum E_ParametrizationType | param_type | ||
) |
Definition at line 643 of file PMatrix.cpp.
References Compose(), BIAS::PMatrixBase::Parametrization2R_(), and BIAS::Vector3< T >::Set().
|
protected |
|
inlineprotectedinherited |
Definition at line 122 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::Matrix(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::operator=().
|
protected |
Computes K,R,C, assuming a metric PMatrix P = K[R^T | -R^T * C] with K[0][1]=0 (zero skew) and K[2][2]=1.
Does a LU-Decomposition of the first 3x3 part. Finally C is computed from the last column of P
Definition at line 318 of file PMatrix.cpp.
References A_, C_, BIAS::HomgPoint3D::GetEuclidean(), BIAS::Matrix3x3< T >::GetInverse(), GetNullVector(), H0_, Hinf_, IsDecomposed_, K_, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::NormL2(), PConsistencyBackup_, R_, BIAS::Vector3< T >::ScalarProduct(), BIAS::Matrix3x3< T >::SetZero(), and V0_.
Referenced by GetA(), GetC(), GetH(), GetHinf(), GetImagePlane(), GetK(), GetR(), GetRayWorldCoo(), and GetV().
void BIAS::PMatrix::DecomposeAa | ( | BIAS::Matrix3x3< PMATRIX_TYPE > & | A, |
BIAS::Vector3< PMATRIX_TYPE > & | a | ||
) | const |
decompose the P-matrix to [ A | a ] where A is a 3x3-matrix and a is a 3-vector.
Definition at line 854 of file PMatrix.cpp.
Referenced by GetCanonicalH().
|
inlineprotectedinherited |
Definition at line 181 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::newsize(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator=(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::~Matrix().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
division function, storing data destination matrix
|
inlineinherited |
elementwise division function in place
|
inlineinherited |
|
inherited |
Takes the elements of a Vector and put them as diagonal elements into a matrix.
The size of this Vector must be exactly min( matrix.width, matrix.height). Optionally all other elements may be set to zero
zero_others | Must be true, if all non-diagonal elements shall be set to zero |
|
inherited |
use the Gauss Jordan Algrithm to transform the matrix to reduced row echelon form.
int BIAS::PMatrix::GetA | ( | Vector3< double > & | A | ) |
returns the unit vector A which is the normal vector to the image plane in world coordinates.
or in other words: the camera orientation
A,H,V are orthonormal
Definition at line 287 of file PMatrix.cpp.
References A_, CheckDecomposition_(), Decompose_(), and IsDecomposed_.
Referenced by BIAS::ThreeDOut::AddPMatrix(), and BIAS::GeometryGL::DisplayCameraExternalParams().
BIAS::Vector3< double > BIAS::PMatrix::GetA | ( | ) |
returns the unit vector A which is the normal vector to the image plane in world coordinates.
or in other words: the camera orientation
A,H,V are orthonormal
Definition at line 304 of file PMatrix.cpp.
|
inherited |
return biggest and smallest absolute values
int BIAS::PMatrix::GetC | ( | Vector3< double > & | C | ) |
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached
Definition at line 165 of file PMatrix.cpp.
References C_, CheckDecomposition_(), Decompose_(), and IsDecomposed_.
Referenced by BIAS::ThreeDOut::AddPMatrix(), BIAS::PMatrixEstimation::AutoCalib(), BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::PMatrixEstimation::ComputeRotationCenter(), BIAS::GeometryGL::DisplayCameraExternalParams(), BIAS::GeometryGL::DisplayP(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::GeometryGL::GetImgCorner3d(), BIAS::HMatrix::MapAcrossPlane(), BIAS::CamPoseCalib::SetInitialCamera(), BIAS::ProjectionParametersPerspective::SetP(), and BIAS::Triangulation::Triangulate2D().
BIAS::Vector3< double > BIAS::PMatrix::GetC | ( | ) |
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached
Definition at line 182 of file PMatrix.cpp.
Referenced by BackprojectByZDepth(), BackprojectPseudoinverse(), BackprojectWorldCoo(), and WriteCAHV_10().
int BIAS::PMatrix::GetC | ( | HomgPoint3D & | C | ) |
computes translation vector origin world coo -> origin camera coo (center), uses decomposition, which is cached
Definition at line 188 of file PMatrix.cpp.
References C_, CheckDecomposition_(), Decompose_(), IsDecomposed_, and BIAS::HomgPoint3D::Set().
Matrix4x4< PMATRIX_TYPE > BIAS::PMatrix::GetCanonicalH | ( | ) | const |
Get the projective homography matrix so that P * H = [ I | 0 ].
Definition at line 865 of file PMatrix.cpp.
Referenced by BIAS::TrifocalTensor::Compose().
void BIAS::PMatrix::GetCanonicalH | ( | Matrix4x4< PMATRIX_TYPE > & | ProjH | ) | const |
Definition at line 872 of file PMatrix.cpp.
References DecomposeAa(), BIAS::SVD::Invert(), and BIAS::SVD::Solve().
|
inherited |
return a copy of column "col", zero based counting
|
inlineinherited |
|
inline |
Definition at line 408 of file PMatrix.hh.
|
inlineinherited |
get the pointer to the data array of the matrix (for faster direct memeory access)
the order of the data is linewise, which means an elemnt sequence of e.g. [0] = M(0,0) [1] = M(0,1) [2] = M(0,2) [3] = M(1,0) // next line [4] = M(1,1) ...
Definition at line 185 of file Matrix.hh.
Referenced by CheckDecomposition_(), CheckSVD_(), BIAS::PMatrixBase::PMatrixBase(), BIAS::PMatrixBase::set_identity(), XMLIn(), and XMLOut().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get a pointer to the last data element Do not use this on unitilized matrices with <= on pointers because on an unitilized matrix GetData() will be NULL and last Element < (typically FFFFF8) We don't want an if here for performance reasons of the innerst loop.
|
inlineinherited |
float BIAS::PMatrix::GetFieldOfView | ( | const unsigned int | dimX, |
const unsigned int | dimY, | ||
const bool | optmin = true |
||
) |
optmin | true if the min angle should be used, else the max angle(=quer) |
dimX | horiz. image dimension in pixel (=columns) |
dimY | vert. image dimension in pixel (=rows) unfortunately not const because missing consts in decompose etc.. we assume rectangular pixels for min(x,y) selection. |
Definition at line 789 of file PMatrix.cpp.
References GetNormRayWorldCoo(), BIAS::HomgPoint2D, and BIAS::Vector3< T >::ScalarProduct().
|
inline |
Definition at line 336 of file PMatrix.hh.
float BIAS::PMatrix::GetFieldOfViewY | ( | const unsigned int | dimX, |
const unsigned int | dimY, | ||
const bool & | compY = true |
||
) |
Definition at line 828 of file PMatrix.cpp.
References GetNormRayWorldCoo(), BIAS::HomgPoint2D, BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::ScalarProduct().
int BIAS::PMatrix::GetH | ( | Vector3< double > & | H | ) |
returns the unit vector H0, while H0 and V0 span the camera coordinate system in world coordinates
This is not the cam.# standard CAHV, but the unit vector H0.
returns the unit vector H0 which is not the cam. standard CAHV because image size is unknown (docu: JW 11/2002) represents the world coordinates of the vector (1,0,0) in ics A,H,V are orthonormal
Definition at line 237 of file PMatrix.cpp.
References CheckDecomposition_(), Decompose_(), H0_, and IsDecomposed_.
BIAS::Vector3< double > BIAS::PMatrix::GetH | ( | ) |
Definition at line 256 of file PMatrix.cpp.
int BIAS::PMatrix::GetHinf | ( | BIAS::Matrix3x3< double > & | Hinf | ) |
Definition at line 151 of file PMatrix.cpp.
References CheckDecomposition_(), Decompose_(), Hinf_, and IsDecomposed_.
Referenced by BIAS::Triangulation::Triangulate().
void BIAS::PMatrix::GetImagePlane | ( | HomgPlane3D & | plane | ) |
returns image plane in world coordinates
Definition at line 513 of file PMatrix.cpp.
References A_, C_, CheckDecomposition_(), Decompose_(), IsDecomposed_, BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::NormL2(), and R_.
Referenced by GetIntersectionOfImagePlanes().
HomgPlane3D BIAS::PMatrix::GetImagePlane | ( | ) |
calls the above
Definition at line 533 of file PMatrix.cpp.
int BIAS::PMatrix::GetIntersectionOfImagePlanes | ( | PMatrix & | P, |
HomgLine2D & | intersection | ||
) |
return line resulting of intersection of the two image planes in pixel coordinates of this camera return -1 if camera planes are parallel
Definition at line 539 of file PMatrix.cpp.
References GetImagePlane(), GetR(), BIAS::AffineTransf::Mult(), BIAS::Vector4< T >::ScalarProduct(), BIAS::AffineTransf::SetAsRotationMatrix(), and BIAS::Matrix3x3< T >::TransposeIP().
Referenced by GetIntersectionOfImagePlanes().
|
inline |
calls the above returns line at infinity if planes are parallel
Definition at line 492 of file PMatrix.hh.
References GetIntersectionOfImagePlanes().
int BIAS::PMatrix::GetK | ( | KMatrix & | K | ) |
calibration matrix
Definition at line 220 of file PMatrix.cpp.
References CheckDecomposition_(), Decompose_(), IsDecomposed_, and K_.
Referenced by BIAS::ThreeDOut::AddPMatrix(), BIAS::PMatrixEstimation::AutoCalib(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::GeometryGL::GetImgCorner3d(), BIAS::Projection::Load(), BIAS::HMatrix::MapAcrossPlane(), BIAS::CamPoseCalib::SetInitialCamera(), and BIAS::ProjectionParametersPerspective::SetP().
|
inline |
Definition at line 168 of file PMatrix.hh.
Referenced by BackprojectByZDepth(), and WriteCAHV_10().
|
inherited |
returns an matrix the same size as the matrix n and m with the largest elements taken from n or m
|
inherited |
Returns the maximum value of the matrix elements.
|
inherited |
return biggest and smallest entry
|
inherited |
Returns the mean value of the matrix elements.
|
inherited |
returns an matrix the same size as the matrix n and m with the smallest elements taken from n or m
|
inherited |
Returns the minimum value of the matrix elements.
Vector3< double > BIAS::PMatrix::GetNormRayWorldCoo | ( | const HomgPoint2D & | point | ) |
returns normed vector from C to point analytical inverse of K is used
Definition at line 656 of file PMatrix.cpp.
References GetRayWorldCoo(), and BIAS::Vector3< T >::NormL2().
Referenced by BackprojectWorldCoo(), GetFieldOfView(), GetFieldOfViewY(), and BIAS::Triangulation::Triangulate2D().
int BIAS::PMatrix::GetNullVector | ( | HomgPoint3D & | C | ) |
this is another way of getting C, especially interesting for non-metric cameras
Definition at line 137 of file PMatrix.cpp.
References BIAS::SVD::GetNullvector(), MakeSVD_(), BIAS::HomgPoint3D::Set(), and Svd_.
Referenced by BIAS::FMatrix::ComputeFromPMatrices(), Decompose_(), and BIAS::Triangulation::Triangulate().
|
inlineinherited |
double BIAS::PMatrix::GetProjectionError | ( | const std::vector< BIAS::HomgPoint2D > & | points2D, |
const std::vector< BIAS::HomgPoint3D > & | points3D | ||
) |
returns average squared projection Error
Definition at line 1165 of file PMatrix.cpp.
References BIAS::HomgPoint2D::DistanceSquared(), BIAS::HomgPoint2D, and BIAS::HomgPoint2D::Homogenize().
int BIAS::PMatrix::GetPseudoInverse | ( | BIAS::Matrix< double > & | Pinv | ) |
returns 4x3 pseudo inverse
Definition at line 113 of file PMatrix.cpp.
References CheckSVD_(), BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetV(), MakeSVD_(), BIAS::Matrix< T >::SetZero(), and Svd_.
Referenced by BackprojectPseudoinverse(), and BIAS::FMatrix::ComputeFromPMatrices().
int BIAS::PMatrix::GetR | ( | Matrix3x3< double > & | R | ) |
Definition at line 204 of file PMatrix.cpp.
References CheckDecomposition_(), Decompose_(), IsDecomposed_, and R_.
Referenced by BIAS::ThreeDOut::AddPMatrix(), BIAS::PMatrixEstimation::AutoCalib(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::HMatrix::MapAcrossPlane(), BIAS::CamPoseCalib::SetInitialCamera(), and BIAS::ProjectionParametersPerspective::SetP().
|
inline |
Definition at line 161 of file PMatrix.hh.
Referenced by BackprojectByZDepth(), and GetIntersectionOfImagePlanes().
Vector3< double > BIAS::PMatrix::GetRayWorldCoo | ( | const HomgPoint2D & | point | ) |
returns vector from C to point, w of point determines ray length analytical inverse of K is used
Definition at line 665 of file PMatrix.cpp.
References CheckDecomposition_(), Decompose_(), BIAS::KMatrix::Invert(), IsDecomposed_, K_, BIAS::Matrix3x3< T >::Mult(), and R_.
Referenced by BIAS::GeometryGL::GetImgCorner3d(), and GetNormRayWorldCoo().
|
inherited |
return a copy of row "row" of this matrix, zero based counting
|
inlineinherited |
|
inherited |
return a submatrix from this.
Start index is [startRow][startCol] end index is [startRow+numRows-1][startCol+numCols-1]. submatrix is resized to numRows/numCols if necessary.
|
inherited |
return a submatrix from this.
Similar to matlab notation (except indexing, starts with 0 of course!). Vectors rows = '1 3' and cols = '1 2' for matrix: / 1 2 3 \ | 4 5 6 | \ 7 8 9 / results in: / 1 2 \ \ 7 8 / Matrix has to be initialized!!!
|
inherited |
return a submatrix from this.
Similar to matlab notation (except indexing, starts with 0 of course!), see GetSubMatrix(const Vector<int> &rows, const Vector<int> &cols, Matrix<T> &submatrix)
Returns SVD of this.
Definition at line 310 of file PMatrix.cpp.
References BIAS::SVD::GetS(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), MakeSVD_(), and Svd_.
|
inlineinherited |
compute square system matrix dest = A^T * A
dest | holds result of this->Transpose * this |
If you want to solve A * x = b, where A has more rows than columns, a common technique is to solve x = (A^T * A)^-1 * A^T * b. This function provides a fast way to compute A^T*A from A.
|
inline |
Definition at line 191 of file PMatrix.hh.
References BIAS::Vector3< T >::GetNormalized().
int BIAS::PMatrix::GetV | ( | Vector3< double > & | V | ) |
This is not the cam.# standard CAHV, but the unit vector H0.
Definition at line 264 of file PMatrix.cpp.
References CheckDecomposition_(), Decompose_(), IsDecomposed_, and V0_.
Referenced by BIAS::GeometryGL::DisplayCameraExternalParams().
BIAS::Vector3< double > BIAS::PMatrix::GetV | ( | ) |
Definition at line 281 of file PMatrix.cpp.
|
inlineprotectedinherited |
Definition at line 95 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::Matrix(), TNT::Matrix< BIAS::BIAS::Vector< int > >::newsize(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::operator=().
|
inherited |
|
inline |
to re-Decompose_() after filling with data use this.
Definition at line 499 of file PMatrix.hh.
References BIAS::Matrix< T >::Fill(), IsDecomposed_, IsMetric_, PConsistencyBackup_, PConsistencyBackupSVD_, and Svd_.
Referenced by BIAS::PMatrixEstimation::AutoCalib(), BIAS::PMatrixEstimation::AutoCalib_(), BIAS::PMatrixEstimation::ComputeFromFDirect(), BIAS::TriangleMesh::GenerateDenseMesh(), PMatrix(), and XMLIn().
|
inherited |
Checks if the matrix a an identity.
I.e. all elements with index i==j are equal 1 and all others are zero.
|
inline |
checks whether X is in optical A-dir from C (only for metric cameras)
Definition at line 198 of file PMatrix.hh.
|
inline |
Definition at line 134 of file PMatrix.hh.
Referenced by BIAS::TriangleMesh::GenerateDenseMesh().
|
inherited |
Checks if the matrix is a null matrix.
|
inherited |
Kronecker-product with matrix, result in dest.
Kronecker-product with matrix B, result in dest.
|
inlineinherited |
|
inline |
overload Load because it has to invalidate decomposition! JW 09/2003
Definition at line 348 of file PMatrix.hh.
References BIAS::Matrix< PMATRIX_TYPE >::Load().
Referenced by BIAS::Projection::Load().
|
inherited |
Loads a PMatrix from .ban file given by AddCameraKey and Time index.
int BIAS::PMatrix::LoadBBC | ( | const std::string & | filename, |
const double & | AddCenterPointShiftX = 0.0 , |
||
const double & | AddCenterPointShiftY = 0.0 |
||
) |
Load calibration data file from BBC-Free-D system.
opens a free-d file and reads first (or only) piece of free-d data
AddCenterPointShiftX | add this to the principle point (in meter) |
AddCenterPointShiftY | add this to the principle point (in meter) |
Definition at line 905 of file PMatrix.cpp.
References BBCIn().
|
inherited |
Load a Daimler .bog fiel and compose a P matrix from it.
Definition at line 193 of file PMatrixBase.cpp.
References BIAS::LoadBogK(), BIAS::LoadBogRC(), and BIAS::Vector3< T >::LoadBogTC().
|
inherited |
Load a PMatrix from a _par.txt (S.
Seitz' format)
Useful to load camera parameters of S. Seitz' sequences, e.g. temple Ring "templeR_par.txt". The file format is: There is one line for each image. The format for each line is: "imgname.png k11 k12 k13 k21 k22 k23 k31 k32 k33 r11 r12 r13 r21 r22 r23 r31 r32 r33 t1 t2 t3" The Seitz' projection matrix representation is given by K*[R t] in contrast to BIAS::PMatrix semantics. However, we convert into our 3x4 PMatrix representation on Load internally.
filenameParTxt | input xxx_par.txt file in Steven Seitz' format with linewise camparams |
index | desired image nr. |
correspImgFilename | corresponding "original" image filename |
nTotal | total number of cameras for that sequence, given at beginning of file. |
|
inlineprotected |
Definition at line 548 of file PMatrix.hh.
References CheckSVD_(), BIAS::SVD::compute(), PConsistencyBackupSVD_, and Svd_.
Referenced by GetNullVector(), GetPseudoInverse(), and GetSVD().
|
inlineinherited |
|
inlineinherited |
matrix - vector multiplicate this matrix with Vector4, storing the result in destvec calculates: destvec = (this Matrix) * argvec
|
inlineinherited |
matrix-matrix multiplication with Matrix4x4 storing the result in destmat
Definition at line 155 of file Matrix3x4.hh.
References BIAS::Matrix< T >::GetData().
|
inlineinherited |
matrix multiplication, result is not allocated
|
inlineinherited |
in Place matrix multiplication this is equal to M = M * arg, but faster
|
inlineinherited |
matrix vector multiplication, result is not allocated
|
inlineinherited |
multiplication function, storing data destination matrix
|
inlineinherited |
in place multiplication function
Definition at line 448 of file Matrix.hh.
Referenced by Normalize().
|
inlineinherited |
matrix matrix multiplication for multiplication with the transpose of the given matrix, result=this*arg^T.
|
inlineinherited |
in Place matrix multiplication this is equal to M = arg*M, but faster
|
inlineinherited |
vector matrix multiplication result=arg*this.
PMatrix & BIAS::PMatrix::newsize | ( | int | rows, |
int | cols | ||
) |
setting a new size different from 3x4 is not allowed for the fixed size P-Matrix overloads the general newsize from basec class
Definition at line 61 of file PMatrix.cpp.
|
inlineinherited |
Definition at line 269 of file cmat.h.
Referenced by BIAS::Matrix< T >::Add(), BIAS::RegionMatcher::BilinearRegion(), BIAS::RegionMatcher::BilinearRegionColor3(), BIAS::ComputeCovariance(), BIAS::LDA::ComputeReductionMatrix(), BIAS::PCA::ComputeReductionMatrix(), BIAS::ContourBSplineShapeMatrix::ComputeRegularisationMatrix(), BIAS::ContourBSplineData::ComputeSplineMetricMatrix_(), BIAS::Matrix< T >::Conv(), BIAS::CamPoseCalib::CreateSecDMatrix_(), BIAS::Matrix< T >::Divide(), Eigenproblem_quadratic_matrix(), BIAS::CamPoseCalib::Estimate(), BIAS::TrackerBaseAffine< StorageType >::EvaluateResult_(), BIAS::TrackerBaseAffine2< StorageType >::EvaluateResult_(), BIAS::TrackerBaseInterface< StorageType >::EvaluateResult_(), BIAS::TrackerBaseInterface< StorageType >::Filter_ByMask(), BIAS::TrackerBaseInterface< StorageType >::Filter_BySeparableMask(), BIAS::TrackerBaseInterface< StorageType >::Filter_GradXSobel3x3(), BIAS::TrackerBaseInterface< StorageType >::Filter_GradYSobel3x3(), BIAS::TrackerBaseInterface< StorageType >::FilterLowpass_Binomial3x3(), BIAS::TrackerBaseInterface< StorageType >::FilterLowpass_ByMask(), BIAS::TrackerBaseInterface< StorageType >::FilterLowpass_BySeparableMask(), Fortran_Matrix_to_Matrix(), generalised_eigenvalue_matrix_solve(), BIAS::LDA::GenerateRandomTestData(), BIAS::SparseMatrix::GetAsDense(), BIAS::Random::GetMeanAndCovariance(), BIAS::PMatrixLinear::GetPEstSystemHom(), BIAS::PMatrixLinear::GetPEstSystemInHom(), BIAS::Matrix< T >::GetSystemMatrix(), BIAS::Kalman::Init(), BIAS::IteratedExtendedKalman::Init(), BIAS::SparseMatrix::Invert(), BIAS::SparseMatrix::InvertAndSolve(), BIAS::Matrix< T >::Kronecker(), Lapack_Cholesky_SymmetricPositiveDefinit(), BIAS::RegionMatcher::LinearRegionX(), BIAS::LevenbergMarquardtBase::LM_Compute(), BIAS::LevenbergMarquardtBase::LM_ComputeWithoutJacobian(), TNT::matmult(), BIAS::Matrix< T >::Mult(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultiplyWithTransposeOf(), BIAS::MxArrToBIASMatrix(), BIAS::Matrix3x4< T >::newsize(), BIAS::Matrix4x4< T >::newsize(), BIAS::TextureTransformHomography::ParameterInversionJacobian(), BIAS::TextureTransformAffine::ParameterInversionJacobian(), BIAS::TextureTransformDisparity::ParameterInversionJacobian(), BIAS::TextureTransformDisplacement::ParameterInversionJacobian(), BIAS::TextureTransformRotation::ParameterInversionJacobian(), BIAS::TextureTransformEuclidian::ParameterInversionJacobian(), BIAS::TextureTransformHomography::ParameterJacobianBackward(), BIAS::TextureTransformAffine::ParameterJacobianBackward(), BIAS::TextureTransformDisparity::ParameterJacobianBackward(), BIAS::TextureTransformDisplacement::ParameterJacobianBackward(), BIAS::TextureTransformRotation::ParameterJacobianBackward(), BIAS::TextureTransformEuclidian::ParameterJacobianBackward(), BIAS::TextureTransformSimilar::ParameterJacobianBackward(), BIAS::TextureTransform::ParameterJacobianBackward(), BIAS::TextureTransformAffine::ParameterJacobianForward(), BIAS::TextureTransformHomography::ParameterJacobianForward(), BIAS::TextureTransformDisparity::ParameterJacobianForward(), BIAS::TextureTransformDisplacement::ParameterJacobianForward(), BIAS::TextureTransformRotation::ParameterJacobianForward(), BIAS::TextureTransformSimilar::ParameterJacobianForward(), BIAS::TextureTransformEuclidian::ParameterJacobianForward(), BIAS::TextureTransform::ParameterJacobianForward(), BIAS::IteratedExtendedKalman::Predict(), BIAS::Covariance3Dto2D::Project(), BIAS::Covariance3Dto2DHomg::Project(), BIAS::QRFrac(), BIAS::RegionMatcher::RegionMatcher(), BIAS::ContourBSplineShapeMatrix::SetShapeSpaceEuclidian(), BIAS::ContourBSplineShapeMatrix::SetShapeSpaceIdentity(), BIAS::ContourBSplineShapeMatrix::SetShapeSpaceMatrix(), BIAS::ContourBSplineShapeMatrix::SetShapeSpacePlanarAffin(), BIAS::ContourBSplineShapeMatrix::SetSubShapeSpaceZero(), BIAS::Matrix< T >::Sub(), BIAS::TrackerBaseAffine< StorageType >::TrackAffine_(), BIAS::MonteCarloTransform::Transform(), BIAS::UnscentedTransform::Transform(), BIAS::IteratedExtendedKalman::Update(), and BIAS::Tracker< StorageType, CalculationType >::Vector2FilterMask_().
|
inline |
scale P such that optical axis (first three entries of last row) has unit length
Definition at line 509 of file PMatrix.hh.
References CheckDecomposition_(), CheckSVD_(), BIAS::Matrix3x3< T >::GetDeterminant(), IsDecomposed_, BIAS::Matrix< PMATRIX_TYPE >::MultiplyIP(), PConsistencyBackup_, PConsistencyBackupSVD_, TNT::Matrix< T >::row_, and Svd_.
Referenced by BIAS::ProjectionParametersProjective::NormalizePMatrix().
|
inherited |
Normalizes each coloumn to L_2 norm one.
Attention each column is normaized by its own scale!
|
inherited |
divides each column of the matrix through the element norm_row_index.
index runs [0..num_rows-1] for example: 2 3 4 5 normalized with row '1' will be 2/4 3/5 1 1
|
inherited |
Normalizes each row to L2 norm one.
Attention each row is normaized by its own scale!
|
inherited |
divides each row of the matrix through the element norm_col_index.
index runs [0..num_cols-1] for example: 2 3 4 5 normalized with row '1' will be 2/3 1 4/5 1
|
inlineinherited |
Return Frobenius norm = sqrt(trace(A^t * A)).
this method is deprecated because it is equivalent to NormL2
This function is deprecated, because it is equivalent to NormL2.
|
inlineinherited |
Return the L1 norm: |a| + |b| + |c| + ...
|
inlineinherited |
Return the L2 norm: a^2 + b^2 + c^2 + ...
|
inlineinherited |
Definition at line 320 of file cmat.h.
Referenced by BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::ImageAlignment::Align(), BIAS::CamPoseCalib::ApplyCoVariances_(), BIAS::ImageAlignment::AutoAlign(), BIAS::TFTensorEstimation::Compute(), BIAS::SVD3x3::Compute(), BIAS::GaussHelmert::ComputeNormalSystem_(), BIAS::LDA::ComputeReductionMatrix(), BIAS::PCA::ComputeReductionMatrix(), BIAS::ContourBSplineShapeMatrix::ComputeRegularisationMatrix(), BIAS::PCA::ComputeScatter(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::LDA::ComputeWithinAndInterClassCovs(), BIAS::Matrix< T >::Conv(), BIAS::Matrix< T >::Divide(), BIAS::Matrix< T >::DivideElementwise(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), BIAS::CamPoseCalib::Estimate(), Fortran_Matrix_to_Matrix(), General_singular_value_decomposition(), generalised_eigenvalue_matrix_solve(), BIAS::CamPoseCalib::GetCov(), BIAS::CamPoseCalib::GetCoVarMatrix(), BIAS::SVD::GetNullvector(), BIAS::Matrix< T >::Kronecker(), Lapack_Cholesky_SymmetricPositiveDefinit(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultiplyWithTransposeOf(), TNT::Matrix< BIAS::BIAS::Vector< int > >::newsize(), BIAS::TrackerBaseInterface< StorageType >::NormalizeRegion_(), BIAS::Vector< T >::operator*(), BIAS::Vector3< T >::operator*(), BIAS::Vector4< T >::operator*(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix3x4< T >::operator=(), BIAS::Matrix4x4< T >::operator=(), PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::CovTransformPose::PoseEulerZYXToQuat(), BIAS::CovTransformPose::PoseQuatToEulerZYX(), BIAS::IteratedExtendedKalman::Predict(), BIAS::Covariance3Dto2DHomg::Project(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::Set(), BIAS::RParametrization::SetCovarianceMatrix(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::EParametrization::SetCovarianceMatrix(), BIAS::LocalAffineFrame::SetFromMatrix(), BIAS::IteratedExtendedKalman::SetProcessCov(), BIAS::ContourBSplineShapeMatrix::SetShapeSpaceMatrix(), BIAS::IteratedExtendedKalman::SetState(), BIAS::ContourBSplineShapeMatrix::SetSubShapeSpaceZero(), BIAS::GaussHelmert::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::SVD::Solve(), BIAS::CamPoseCalib::SolveLM_(), BIAS::ImageAlignment::StrictPyramidAlign(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::SymmetricMatrix3x3< T >::SymmetricMatrix3x3(), BIAS::TrackerBaseAffine< StorageType >::TrackAffine_(), BIAS::MonteCarloTransform::Transform(), BIAS::UnscentedTransform::Transform(), BIAS::CovTransformPose::TransformPoint3D(), BIAS::CovTransformPose::TransformPose(), TNT::transpose(), BIAS::Kalman::Update(), BIAS::IteratedExtendedKalman::Update(), and Upper_symmetric_eigenvalue_solve().
|
inlineinherited |
Definition at line 319 of file cmat.h.
Referenced by BIAS::Matrix< T >::Add(), BIAS::Matrix< T >::AddIP(), BIAS::ImageAlignment::Align(), BIAS::ImageAlignment::AutoAlign(), BIAS::SVD3x3::Compute(), BIAS::ImageBlender::ComputeCylCamGeometry(), BIAS::ImageBlenderIncremental::ComputeCylCamGeometry_(), BIAS::LDA::ComputeReductionMatrix(), BIAS::PCA::ComputeReductionMatrix(), BIAS::ContourBSplineShapeMatrix::ComputeRegularisationMatrix(), BIAS::PCA::ComputeScatter(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::LDA::ComputeWithinAndInterClassCovs(), BIAS::Matrix< T >::Conv(), BIAS::Matrix< T >::Divide(), BIAS::Matrix< T >::DivideElementwise(), Eigenproblem_quadratic_matrix(), Eigenvalue_solve(), BIAS::CamPoseCalib::Estimate(), Fortran_Matrix_to_Matrix(), General_singular_value_decomposition(), generalised_eigenvalue_matrix_solve(), BIAS::CamPoseCalib::GetCov(), BIAS::CamPoseCalib::GetCoVarMatrix(), BIAS::SVD::GetLeftNullvector(), BIAS::Kalman::Init(), BIAS::IteratedExtendedKalman::Init(), BIAS::Matrix< T >::Kronecker(), Lapack_Cholesky_SymmetricPositiveDefinit(), Lapack_LLS_QR_linear_solve(), Lapack_LU_linear_solve(), Lapack_WLLS_solve(), TNT::matmult(), BIAS::Matrix2x2< T >::Matrix2x2(), BIAS::Matrix3x3< T >::Matrix3x3(), BIAS::Matrix4x4< T >::Matrix4x4(), BIAS::Matrix< T >::Mult(), TNT::mult_element(), BIAS::Matrix< T >::Multiply(), BIAS::Matrix< T >::MultiplyWithTransposeOf(), BIAS::Matrix< T >::MultLeft(), TNT::Matrix< BIAS::BIAS::Vector< int > >::newsize(), BIAS::TrackerBaseInterface< StorageType >::NormalizeRegion_(), BIAS::Vector< T >::operator*(), BIAS::Vector3< T >::operator*(), BIAS::Vector4< T >::operator*(), TNT::Matrix< T >::operator+(), TNT::Matrix< T >::operator-(), BIAS::Matrix3x4< T >::operator=(), BIAS::Matrix4x4< T >::operator=(), PMatrix(), BIAS::PMatrixBase::PMatrixBase(), BIAS::CovTransformPose::PoseEulerZYXToQuat(), BIAS::CovTransformPose::PoseQuatToEulerZYX(), BIAS::IteratedExtendedKalman::Predict(), BIAS::RMatrix::RMatrix(), BIAS::RMatrixBase::RMatrixBase(), BIAS::Matrix< T >::Set(), BIAS::RParametrization::SetCovarianceMatrix(), BIAS::PoseParametrization::SetCovarianceMatrix(), BIAS::EParametrization::SetCovarianceMatrix(), BIAS::LocalAffineFrame::SetFromMatrix(), BIAS::IteratedExtendedKalman::SetProcessCov(), BIAS::ContourBSplineShapeMatrix::SetShapeSpaceMatrix(), BIAS::IteratedExtendedKalman::SetState(), BIAS::ContourBSplineShapeMatrix::SetSubShapeSpaceZero(), BIAS::GaussHelmert::Solve(), BIAS::LeastSquaresSVD::Solve(), BIAS::SVD::Solve(), BIAS::CamPoseCalib::SolveLM_(), SquaredMahalanobisDistance(), BIAS::ImageAlignment::StrictPyramidAlign(), BIAS::Matrix< T >::Sub(), BIAS::Matrix< T >::SubIP(), BIAS::SymmetricMatrix3x3< T >::SymmetricMatrix3x3(), BIAS::TrackerBaseAffine2< StorageType >::TrackAffine_(), BIAS::MonteCarloTransform::Transform(), BIAS::UnscentedTransform::Transform(), BIAS::CovTransformPose::TransformPoint3D(), BIAS::CovTransformPose::TransformPose(), TNT::transpose(), BIAS::Kalman::Update(), BIAS::IteratedExtendedKalman::Update(), Upper_symmetric_eigenvalue_solve(), and BIAS::LeastSquaresLapack::WeightedSolve().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
assignment operator
Definition at line 84 of file PMatrix.cpp.
References A_, C_, Covariance_, H0_, Hinf_, IsDecomposed_, IsMetric_, K_, BIAS::PMatrixBase::operator=(), PConsistencyBackup_, PConsistencyBackupSVD_, R_, Svd_, and V0_.
|
inlineinherited |
|
inlineinherited |
|
protectedinherited |
Definition at line 97 of file PMatrixBase.cpp.
References BIAS::Vector3< T >::Set(), BIAS::RMatrixBase::Set(), BIAS::RMatrixBase::SetFromAxisAngle(), BIAS::RMatrixBase::SetFromQuaternion(), BIAS::RMatrixBase::SetXYZ(), and BIAS::Vector< T >::Size().
Referenced by Compose().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
bool BIAS::PMatrix::Save | ( | const std::string & | filename | ) |
Definition at line 1146 of file PMatrix.cpp.
References C_, Covariance_, IsMetric_, K_, and R_.
|
inherited |
method to save directly to a given filename.
internally using stream operator
|
inherited |
Scales column NoCol with scale.
|
inherited |
Scales row NoRow with scale.
|
inlineprotectedinherited |
Definition at line 152 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::operator=().
|
inherited |
|
inherited |
Copies the contents of data into this at the position indicated by row and col.
The size of *this must be big enought to carry data
|
inherited |
Copies the contents of data into this at the position indicated by row and col.
The size of *this must be big enought to carry data. Data i interpreted as column vector
|
inlineinherited |
Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4 method: 1 0 0 0 0 1 0 0 0 0 1 0.
Definition at line 212 of file PMatrixBase.hh.
References BIAS::Matrix< PMATRIX_TYPE >::GetData().
Referenced by BIAS::PMatrixEstimation::InitP1P2Trans().
void BIAS::PMatrix::SetC | ( | const Vector3< double > & | newC | ) |
modify C and re-compose P not fine to use, better use: Compose()
|
inherited |
set a col of matrix from vector
|
inline |
Definition at line 405 of file PMatrix.hh.
|
inherited |
Sets P-Matrix from a vector which contains the elements of P row wise.
Definition at line 156 of file PMatrixBase.cpp.
References BIAS::Vector< T >::GetData().
Referenced by BIAS::PMatrixLinear::Compute().
|
inlineinherited |
set the elements of this matrix to the matrix 1 0 0 0 0 1 0 0 0 0 1 0 which is no strict identity (!)
|
inherited |
set a row of matrix from vector
|
inherited |
sets a submatrix in this.
Start index in this is [startRowInThis][startColInThis] end index is [startRowInThis+numRows-1][startColInThis+numCols-1]. Entries copyed from submatrix beginning at [startRowInSub][startColInSub] and stop at [startRowInSub+numRows-1][startColInSub+numCols-1]
|
inherited |
sets a 3x3 submatrix in this.
Start index in this is [startRowInThis][startColInThis] end index is [startRowInThis+2][startColInThis+2].
|
inherited |
sets a 3x1 submatrix in this.
Start index in this is [startRowInThis][startColInThis] end index is [startRowInThis+2][startColInThis].
|
inherited |
Copies the contents of data into this at the position indicated by row and col.
The size of *this must be big enought to carry data. Data is interpreted as row vector.
|
inlineinherited |
|
inlineinherited |
Definition at line 212 of file cmat.h.
Referenced by Eigenproblem_quadratic_matrix(), BIAS::Random::GetMeanAndCovariance(), BIAS::Matrix< T >::operator==(), and BIAS::IteratedExtendedKalman::SetState().
|
inlineinherited |
substraction function, storing data destination matrix
|
inlineinherited |
Subtracts arg from this
this -= arg.
|
inlineinherited |
|
inherited |
swaps two rows
|
inlineinherited |
|
inlineinherited |
transpose function, storing data destination matrix
|
inherited |
vec-operator returns the elements of the matrix columwise as vector
vec-operator returns the elements of the matrix columnwise as vector
int BIAS::PMatrix::WriteCAHV_10 | ( | int | cols, |
int | rows, | ||
std::ostream & | os = std::cout |
||
) |
write the CAHV decomposition of this P matrix in CAHV 1,0 format to stream os (see RK's/TNT CAHV1.0 fromat in SequenceReconstruction/ Sequenetracking/KochSI.C) cols, rows is the size of the image this P matrix corresponds to.
image size is neccessary because of shift of the axis origin cenetered/in left corner This is the 'Cunningham' format (see diss. Reinhard Koch, p.14)
Definition at line 694 of file PMatrix.cpp.
References GetC(), GetK(), and BIAS::Vector3< T >::ScalarProduct().
|
inherited |
Write the matrix in Matlab format to the given stream.
name | Is the name of the Matlab variable |
|
inherited |
call this to add the class to a node of a given xml tree
Definition at line 26 of file XMLBase.cpp.
References BIAS::XMLIO::addAttribute(), and BIAS::XMLIO::addChildNode().
|
virtual |
specialization of XML block name function
Implements BIAS::XMLBase.
Definition at line 999 of file PMatrix.cpp.
|
virtual |
specialization of XML read function
Implements BIAS::XMLBase.
Definition at line 1056 of file PMatrix.cpp.
References C_, Compose(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getChild(), BIAS::Matrix3x3< T >::GetData(), BIAS::Matrix< PMATRIX_TYPE >::GetData(), BIAS::XMLIO::getNodeContentString(), InvalidateDecomposition(), IsMetric_, K_, and R_.
|
virtual |
specialization of XML write function
Implements BIAS::XMLBase.
Definition at line 1006 of file PMatrix.cpp.
References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addContent(), C_, BIAS::Matrix3x3< T >::GetData(), BIAS::Matrix< PMATRIX_TYPE >::GetData(), IsDecomposed_, IsMetric_, K_, and R_.
|
inherited |
derived classes must implement the function XMLIn which is called by this function XMLRead to read everything with name Filename into (*this).
Definition at line 78 of file XMLBase.cpp.
References BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::read().
Referenced by BIAS::biasGLviewerGLUT::Init(), BIAS::SceneOpenSceneGraph::Load(), and BIAS::GLProjectionParametersPerspective::XMLRead().
|
inherited |
reconstruct xml tree from string
Definition at line 111 of file XMLBase.cpp.
References BIAS::XMLIO::clear(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getNodeName(), and BIAS::XMLIO::ReadFromString().
Referenced by BIAS::IOUtils::GetProjection().
|
inherited |
call this to add the class to a new xml tree and write it to the file Filename.
Calls function XMLOut of derived class
CompressionLevel | 0..9 (0=off, 9=highest compression) |
Definition at line 40 of file XMLBase.cpp.
References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetCompression(), BIAS::XMLIO::SetEncoding(), and BIAS::XMLIO::write().
Referenced by BIAS::SphericalDepthPanorama::GetTriangleMesh(), BIAS::SceneOpenSceneGraph::Save(), BIAS::ScreenShotListener::StoreNextScreenShot_(), and BIAS::GLProjectionParametersPerspective::XMLWrite().
|
inherited |
serialize xml tree to string
Definition at line 61 of file XMLBase.cpp.
References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::SetEncoding(), and BIAS::XMLIO::WriteToString().
Definition at line 842 of file cmat.h.
References TNT::matmult().
Definition at line 915 of file cmat.h.
References TNT::matmult().
Definition at line 730 of file cmat.h.
References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().
Definition at line 752 of file cmat.h.
References TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().
|
related |
|
related |
|
related |
|
related |
Definition at line 703 of file cmat.h.
References TNT::Matrix< T >::Read().
|
related |
Definition at line 711 of file cmat.h.
References TNT::Matrix< T >::Read().
|
related |
Definition at line 719 of file cmat.h.
References TNT::Matrix< T >::Read().
|
protected |
unit vector in wcs assigning the direction of the optical axis
Definition at line 452 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetA(), GetImagePlane(), and operator=().
|
protected |
camera center in wcs (extrinsic parameter)
Definition at line 448 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetC(), GetImagePlane(), operator=(), Save(), XMLIn(), and XMLOut().
|
protected |
Definition at line 476 of file PMatrix.hh.
Referenced by operator=(), and Save().
|
protected |
unit vector in wcs assigning the direction of the horizontal axis of the image plane
Definition at line 456 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetH(), and operator=().
|
protected |
Hinfinity.
Definition at line 463 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetHinf(), and operator=().
|
protected |
tells us whether we have a chached decomposition with C,A,...
Definition at line 479 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetA(), GetC(), GetH(), GetHinf(), GetImagePlane(), GetK(), GetR(), GetRayWorldCoo(), GetV(), InvalidateDecomposition(), Normalize(), operator=(), and XMLOut().
|
protected |
tells us whether we have an arbitrary 3x4 matrix or a P which is exactly a composition of P = K * R [ I | -C ] this is called a metric pmatrix
Definition at line 484 of file PMatrix.hh.
Referenced by Compose(), InvalidateDecomposition(), operator=(), PMatrix(), Save(), XMLIn(), and XMLOut().
|
protected |
camera calibration matrix (intrinsic parameter)
Definition at line 466 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetK(), GetRayWorldCoo(), operator=(), Save(), XMLIn(), and XMLOut().
|
protectedinherited |
Definition at line 84 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::copy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::destroy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::dim(), TNT::Matrix< BIAS::BIAS::Vector< int > >::initialize(), TNT::Matrix< BIAS::BIAS::Vector< int > >::Matrix(), TNT::Matrix< BIAS::BIAS::Vector< int > >::num_rows(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator()(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator=(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator[](), and TNT::Matrix< BIAS::BIAS::Vector< int > >::set().
|
protectedinherited |
Definition at line 86 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::destroy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::initialize(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator()(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::size().
|
protectedinherited |
Definition at line 85 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::copy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::destroy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::dim(), TNT::Matrix< BIAS::BIAS::Vector< int > >::initialize(), TNT::Matrix< BIAS::BIAS::Vector< int > >::Matrix(), TNT::Matrix< BIAS::BIAS::Vector< int > >::num_cols(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator()(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator=(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::set().
|
protected |
backup of P at time of last decomposition to check whether decomposition is still valid
Definition at line 472 of file PMatrix.hh.
Referenced by CheckDecomposition_(), Compose(), Decompose_(), InvalidateDecomposition(), Normalize(), and operator=().
|
protected |
Definition at line 473 of file PMatrix.hh.
Referenced by CheckSVD_(), InvalidateDecomposition(), MakeSVD_(), Normalize(), and operator=().
|
protected |
rotation matrix (intrinsic parameter)
Definition at line 465 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetImagePlane(), GetR(), GetRayWorldCoo(), operator=(), Save(), XMLIn(), and XMLOut().
|
protectedinherited |
Definition at line 88 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::destroy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::initialize(), TNT::Matrix< BIAS::BIAS::Vector< int > >::Matrix(), Normalize(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::operator[]().
|
protectedinherited |
Definition at line 90 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::destroy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::initialize(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::operator()().
|
protected |
(for decomposition, docu: JW 11/2002)
Definition at line 467 of file PMatrix.hh.
Referenced by Compose(), GetNullVector(), GetPseudoInverse(), GetSVD(), InvalidateDecomposition(), MakeSVD_(), Normalize(), operator=(), and PMatrix().
|
protected |
unit vector in wcs assigning the direction of the vertical axis of the image plane
Definition at line 460 of file PMatrix.hh.
Referenced by Compose(), Decompose_(), GetV(), and operator=().
|
protectedinherited |
Definition at line 87 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::copy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::destroy(), TNT::Matrix< BIAS::BIAS::Vector< int > >::initialize(), TNT::Matrix< BIAS::BIAS::Vector< int > >::Matrix(), BIAS::AffineTransf::Mult(), BIAS::AffineTransf::operator=(), TNT::Matrix< BIAS::BIAS::Vector< int > >::operator=(), TNT::Matrix< BIAS::BIAS::Vector< int > >::set(), and BIAS::AffineTransf::SetAsRotationMatrix().
|
protectedinherited |
Definition at line 89 of file cmat.h.
Referenced by TNT::Matrix< BIAS::BIAS::Vector< int > >::initialize(), and TNT::Matrix< BIAS::BIAS::Vector< int > >::operator()().