26 #ifndef _BIAS_PMatrix_hh_
27 #define _BIAS_PMatrix_hh_
29 #include "bias_config.h"
31 #include <Base/Debug/Debug.hh>
32 #include <Base/Math/Matrix3x4.hh>
33 #include <Base/Math/Vector4.hh>
34 #include <Base/Math/Vector3.hh>
35 #include <Base/Math/Vector.hh>
36 #include <Base/Math/Matrix3x3.hh>
37 #include <Base/Math/Matrix4x4.hh>
38 #include "HomgLine2D.hh"
39 #include "HomgPoint3D.hh"
43 #define P_MATRIX_ROWS 3
44 #define P_MATRIX_COLS 4
47 #define PMATRIX_TYPE double
49 #define PMATRIX_EPSILON 1e-14
139 inline void set_identity();
177 const enum E_ParametrizationType param_type);
187 int LoadBOG(
const std::string & filename);
192 const enum E_ParametrizationType param_type)
const;
213 register PMATRIX_TYPE* d =
GetData();
214 d[0] = d[5] = d[10] = 1;
215 d[1] = d[2] = d[3] = d[4] = d[6] = d[7] = d[8] = d[9] = d[11] = 0;
222 for (
int index=0; index<12; index++ ) {
226 BIASERR(
" wrong size in constructor! Amat is a "<<Amat.
num_rows()
227 <<
" x "<<Amat.
num_cols()<<
" matrix but must be 3x4."
240 #endif // _BIAS_PMatrixBase_hh_
PMatrixBase & operator=(const PMatrixBase &mat)
MatrixInitType
can be passed to matrix constructors to init the matrix with the most often used values ...
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
Subscript num_cols() const
class for column vectors with arbitrary size
PMatrixBase(const Matrix3x4< PMATRIX_TYPE > &Amat_)
PMatrixBase()
default constructor
E_ParametrizationType
description of supported parametrization types
Matrix< T > & operator=(const TNT::Matrix< T > &mat)
assignment operators calling corresponding operator from base class if appropriate ...
PMatrixBase(const MatrixInitType &i)
constructor setting identity or zero
virtual ~PMatrixBase()
destructor
PMatrixBase(const PMatrixBase &A)
PMATRIX_TYPE * GetData()
get the pointer to the data array of the matrix (for faster direct memeory access) ...
is a 'fixed size' quadratic matrix of dim.
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
describes a projective 3D -> 2D mapping in homogenous coordinates
void set_identity()
Convert the PMatrixBase to 'identity' matrix, overriding the Matrix3x4 method: 1 0 0 0 0 1 0 0 0 0 1 ...
class Vector3 contains a Vector of fixed dim.
Implements a 3D rotation matrix.
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) ...
Subscript num_rows() const
is a 'fixed size' rectangular matrix of dim.
PMatrixBase(const std::string &s)