Basic Image AlgorithmS Library 2.8.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

BIAS::PoseParametrizationCovariance Class Reference

class encapsulating the transfromations between different pose parametrizations More...

#include <Base/Geometry/PoseParametrizationCovariance.hh>

Inheritance diagram for BIAS::PoseParametrizationCovariance:
Collaboration diagram for BIAS::PoseParametrizationCovariance:

List of all members.

Public Types

typedef const POSECOVARIANCE_TYPE * const_iterator
typedef const POSECOVARIANCE_TYPE & const_reference
typedef POSECOVARIANCE_TYPE element_type
typedef POSECOVARIANCE_TYPE * iterator
typedef POSECOVARIANCE_TYPE * pointer
typedef POSECOVARIANCE_TYPE & reference
typedef Subscript size_type
typedef POSECOVARIANCE_TYPE value_type

Public Member Functions

void AbsIP ()
 absolute values of all elements of the matrix (in place)
Matrix< POSECOVARIANCE_TYPE > Adjoint () const
 computes the adjoint matrix
void Clear ()
Subscript dim (Subscript d) const
void GaussJordan ()
 use the Gauss Jordan Algrithm to transform the matrix to reduced row echelon form.
Matrix3x3< POSECOVARIANCE_TYPE > GetCovC () const
Matrix4x4< POSECOVARIANCE_TYPE > GetCovQ () const
Matrix< POSECOVARIANCE_TYPE > GetMax (Matrix< POSECOVARIANCE_TYPE > &m)
 returns an matrix the same size as the matrix n and m with the largest elements taken from n or m
Matrix< POSECOVARIANCE_TYPE > GetMin (Matrix< POSECOVARIANCE_TYPE > &m)
 returns an matrix the same size as the matrix n and m with the smallest elements taken from n or m
bool IsIdentity (double eps=0.0) const
 Checks if the matrix a an identity.
bool IsZero (double eps=0.0) const
 Checks if the matrix is a null matrix.
void Kronecker (Matrix< POSECOVARIANCE_TYPE > const B, Matrix< POSECOVARIANCE_TYPE > &dest) const
 Kronecker-product with matrix, result in dest.
Subscript lbound () const
Matrix< POSECOVARIANCE_TYPE > & newsize (Subscript M, Subscript N)
Subscript num_cols () const
Subscript num_rows () const
const_reference operator() (Subscript i, Subscript j) const
reference operator() (Subscript i, Subscript j)
reference operator() (Subscript i)
const_reference operator() (Subscript i) const
POSECOVARIANCE_TYPE * operator[] (Subscript i)
const POSECOVARIANCE_TYPE * operator[] (Subscript i) const
 PoseParametrizationCovariance (const Matrix< POSECOVARIANCE_TYPE > &T)
 PoseParametrizationCovariance (MatrixInitType T)
 PoseParametrizationCovariance ()
 PoseParametrizationCovariance (const TNT::Matrix< POSECOVARIANCE_TYPE > &T)
std::ostream & Print (std::ostream &s, const bool intCastOutput=false, const bool binaryOutput=false, const bool forceFullPrecision=false) const
std::ostream & Print (std::ostream &s, const int width, const int precision, bool scientific=true) 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)
Subscript size () const
void SwapRows (const int i, const int r)
 swaps two rows
void Transform (const Matrix4x4< double > &transf)
 Given a 6D pose (position and euler angles) and its associated covariance, the function transforms the covaruiance into pose and quaternion parametrization.
Matrix< POSECOVARIANCE_TYPE > Transpose () const
 transpose function, storing data destination matrix
void Vec (Vector< POSECOVARIANCE_TYPE > &dest) const
 vec-operator returns the elements of the matrix columwise as vector
 ~PoseParametrizationCovariance ()
Get Functions
POSECOVARIANCE_TYPE GetMax () const
 Returns the maximum value of the matrix elements.
POSECOVARIANCE_TYPE GetMin () const
 Returns the minimum value of the matrix elements.
POSECOVARIANCE_TYPE * GetData ()
 get the pointer to the data array of the matrix (for faster direct memeory access)
const POSECOVARIANCE_TYPE * GetData () const
const POSECOVARIANCE_TYPE ** GetDataArray () const
 returns zero based arry for data access
POSECOVARIANCE_TYPE ** GetDataArray ()
POSECOVARIANCE_TYPE ** GetDataArray1 () const
 returns 1 based array to data access
unsigned int GetRows () const
unsigned int GetCols () const
const POSECOVARIANCE_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.
POSECOVARIANCE_TYPE * GetDataLast ()
Vector< POSECOVARIANCE_TYPE > GetRow (const int &row) const
 return a copy of row "row" of this matrix, zero based counting
Vector< POSECOVARIANCE_TYPE > GetCol (const int &col) const
 return a copy of column "col", zero based counting
void GetSubMatrix (const size_t startRow, const size_t startCol, const size_t numRows, const size_t numCols, Matrix< POSECOVARIANCE_TYPE > &submatrix) const
 return a submatrix from this.
void GetSubMatrix (const Vector< int > &rows, const Vector< int > &cols, Matrix< POSECOVARIANCE_TYPE > &submatrix) const
 return a submatrix from this.
Matrix< POSECOVARIANCE_TYPE > GetSubMatrix (const Vector< int > &rows, const Vector< int > &cols) const
 return a submatrix from this.
void SetSubMatrix (const size_t startRowInThis, const size_t startColInThis, const Matrix< POSECOVARIANCE_TYPE > &submatrix, const size_t startRowInSub, const size_t startColInSub, const size_t numRows, const size_t numCols)
 sets a submatrix in this.
void SetSubMatrix (const size_t startRowInThis, const size_t startColInThis, const Matrix3x3< POSECOVARIANCE_TYPE > &submatrix)
 sets a 3x3 submatrix in this.
void SetSubMatrix (const size_t startRowInThis, const size_t startColInThis, const Vector3< POSECOVARIANCE_TYPE > &subvector)
 sets a 3x1 submatrix in this.
void SetRow (const int row, const Vector< POSECOVARIANCE_TYPE > &data)
 set a row of matrix from vector
void SetCol (const int row, const Vector< POSECOVARIANCE_TYPE > &data)
 set a col of matrix from vector
void Set (const int row, const int col, const Matrix< POSECOVARIANCE_TYPE > &data)
 Copies the contents of data into this at the position indicated by row and col.
void Set (const int row, const int col, const Vector< POSECOVARIANCE_TYPE > &data)
 Copies the contents of data into this at the position indicated by row and col.
void SetTranspose (const int row, const int col, const Vector< POSECOVARIANCE_TYPE > &data)
 Copies the contents of data into this at the position indicated by row and col.
int GetNumElements () const
 Returns the total number of elements.
void GetMaxMin (POSECOVARIANCE_TYPE &max, POSECOVARIANCE_TYPE &min) const
 return biggest and smallest entry
void GetAbsMaxMin (POSECOVARIANCE_TYPE &max, POSECOVARIANCE_TYPE &min) const
 return biggest and smallest absolute values
POSECOVARIANCE_TYPE GetMean () const
 Returns the mean value of the matrix elements.
POSECOVARIANCE_TYPE NormL1 () const
 Return the L1 norm: |a| + |b| + |c| + ...
double NormL2 () const
 Return the L2 norm: a^2 + b^2 + c^2 + ...
double NormFrobenius () const
 Return Frobenius norm = sqrt(trace(A^t * A)).
POSECOVARIANCE_TYPE Trace () const
POSECOVARIANCE_TYPE DetSquare () const
Arithmetic
void AddIP (const POSECOVARIANCE_TYPE &scalar)
 in place addition function
void AddIP (const Matrix< POSECOVARIANCE_TYPE > &arg)
 Adds arg to this.
void SubIP (const Matrix< POSECOVARIANCE_TYPE > &arg)
 Subtracts arg from this
this -= arg.
void SubIP (const POSECOVARIANCE_TYPE &scalar)
 in place subtraction function
void Add (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
 addition function, storing data destination matrix
void Sub (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
 substraction function, storing data destination matrix
void MultiplyIP (const POSECOVARIANCE_TYPE &scalar)
 in place multiplication function
void Multiply (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
 multiplication function, storing data destination matrix
void Mult (const Matrix< POSECOVARIANCE_TYPE > &arg, Matrix< POSECOVARIANCE_TYPE > &result) const
 matrix multiplication, result is not allocated
void Mult (const Matrix< POSECOVARIANCE_TYPE > &arg)
 in Place matrix multiplication this is equal to M = M * arg, but faster
void Mult (const Vector< POSECOVARIANCE_TYPE > &arg, Vector< POSECOVARIANCE_TYPE > &result) const
 matrix vector multiplication, result is not allocated
void MultLeft (const Matrix< POSECOVARIANCE_TYPE > &arg)
 in Place matrix multiplication this is equal to M = arg*M, but faster
void MultLeft (const Vector< POSECOVARIANCE_TYPE > &arg, Vector< POSECOVARIANCE_TYPE > &result) const
 vector matrix multiplication result=arg*this.
void MultiplyWithTransposeOf (const Matrix< POSECOVARIANCE_TYPE > &arg, Matrix< POSECOVARIANCE_TYPE > &result) const
 matrix matrix multiplication for multiplication with the transpose of the given matrix, result=this*arg^T.
void DivideIP (const POSECOVARIANCE_TYPE &scalar)
 in place division function
void Divide (const POSECOVARIANCE_TYPE &scalar, Matrix< POSECOVARIANCE_TYPE > &dest) const
 division function, storing data destination matrix
void DivideElementwise (const Matrix< POSECOVARIANCE_TYPE > &arg)
 elementwise division function in place
void GetSystemMatrix (Matrix< POSECOVARIANCE_TYPE > &dest) const
 compute square system matrix dest = A^T * A
Set Functions
void SetZero ()
 Sets all values to zero.
void MakeSymmetric ()
 componentwise: this = 0.5(this + this^T) yields symmetric matrix only allowed for square shaped matrices
virtual void clear ()
 stl conform interface destroys Matrix JW
void SetIdentity ()
 Converts matrix to identity matrix.
void Fill (const POSECOVARIANCE_TYPE &scalar)
 Takes the elements of a Vector and put them as diagonal elements into a matrix.
Scaling and Normalization
void NormalizeColsToOne (const int norm_row_index)
 divides each column of the matrix through the element norm_row_index.
void NormalizeRowsToOne (const int norm_col_index)
 divides each row of the matrix through the element norm_col_index.
void NormalizeRows ()
 Normalizes each row to L2 norm one.
void NormalizeCols ()
 Normalizes each coloumn to L_2 norm one.
POSECOVARIANCE_TYPE Normalize ()
 Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.
void ScaleRow (int NoRow, POSECOVARIANCE_TYPEscale)
 Scales row NoRow with scale.
void ScaleCol (int NoCol, POSECOVARIANCE_TYPEscale)
 Scales column NoCol with scale.
Input / Output
bool Load (const std::string &filename)
 method to load directly from a given filename.
bool Save (const std::string &filename) const
 method to save directly to a given filename.
int WriteMatlab (std::ostream &ostr, const std::string &name) const
 Write the matrix in Matlab format to the given stream.
bool BinRead (const char *filename) const
 This method reads a matrix from a given file in binary format.
bool BinWrite (const char *filename) const
 This method writes a matrix to a given file in binary format.

Protected Member Functions

void copy (const POSECOVARIANCE_TYPE *v)
void destroy ()
void initialize (Subscript M, Subscript N)
void set (const POSECOVARIANCE_TYPE &val)

Protected Attributes

Subscript m_
Subscript mn_
Subscript n_
POSECOVARIANCE_TYPE ** row_
POSECOVARIANCE_TYPE ** rowm1_
POSECOVARIANCE_TYPE * v_
POSECOVARIANCE_TYPE * vm1_

Detailed Description

class encapsulating the transfromations between different pose parametrizations

This class represents the covariance of a camerpose with translation and rotation. The pose is assumed to be tx,ty,tz,q1,q2,q3,q4 with translation t and rotation q as quaternion. The covariance therefore must be 7x7.

Author:
woelk 03/2006

Definition at line 49 of file PoseParametrizationCovariance.hh.


Member Typedef Documentation

typedef const POSECOVARIANCE_TYPE * TNT::Matrix< POSECOVARIANCE_TYPE >::const_iterator [inherited]

Definition at line 78 of file cmat.h.

typedef const POSECOVARIANCE_TYPE & TNT::Matrix< POSECOVARIANCE_TYPE >::const_reference [inherited]

Definition at line 79 of file cmat.h.

typedef POSECOVARIANCE_TYPE TNT::Matrix< POSECOVARIANCE_TYPE >::element_type [inherited]

Definition at line 74 of file cmat.h.

typedef POSECOVARIANCE_TYPE * TNT::Matrix< POSECOVARIANCE_TYPE >::iterator [inherited]

Definition at line 76 of file cmat.h.

typedef POSECOVARIANCE_TYPE * TNT::Matrix< POSECOVARIANCE_TYPE >::pointer [inherited]

Definition at line 75 of file cmat.h.

typedef POSECOVARIANCE_TYPE & TNT::Matrix< POSECOVARIANCE_TYPE >::reference [inherited]

Definition at line 77 of file cmat.h.

typedef Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::size_type [inherited]

Definition at line 72 of file cmat.h.

typedef POSECOVARIANCE_TYPE TNT::Matrix< POSECOVARIANCE_TYPE >::value_type [inherited]

Definition at line 73 of file cmat.h.


Constructor & Destructor Documentation

BIAS::PoseParametrizationCovariance::PoseParametrizationCovariance ( MatrixInitType  T) [inline]

Definition at line 53 of file PoseParametrizationCovariance.hh.

PoseParametrizationCovariance::PoseParametrizationCovariance ( )

Definition at line 12 of file PoseParametrizationCovariance.cpp.

BIAS::PoseParametrizationCovariance::PoseParametrizationCovariance ( const Matrix< POSECOVARIANCE_TYPE > &  T) [inline, explicit]

Definition at line 58 of file PoseParametrizationCovariance.hh.

BIAS::PoseParametrizationCovariance::PoseParametrizationCovariance ( const TNT::Matrix< POSECOVARIANCE_TYPE > &  T) [inline]

Definition at line 61 of file PoseParametrizationCovariance.hh.

PoseParametrizationCovariance::~PoseParametrizationCovariance ( )

Definition at line 17 of file PoseParametrizationCovariance.cpp.


Member Function Documentation

void BIAS::Matrix< POSECOVARIANCE_TYPE >::AbsIP ( ) [inherited]

absolute values of all elements of the matrix (in place)

Author:
bangerer 01/2009
void BIAS::Matrix< POSECOVARIANCE_TYPE >::Add ( const POSECOVARIANCE_TYPE &  scalar,
Matrix< POSECOVARIANCE_TYPE > &  dest 
) const [inline, inherited]

addition function, storing data destination matrix

implementation

Author:
Ingo Thomsen tested
void BIAS::Matrix< POSECOVARIANCE_TYPE >::AddIP ( const POSECOVARIANCE_TYPE &  scalar) [inline, inherited]

in place addition function

Author:
Ingo Thomsen tested

Definition at line 415 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::AddIP ( const Matrix< POSECOVARIANCE_TYPE > &  arg) [inline, inherited]

Adds arg to this.

Author:
grest,2004
Matrix<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::Adjoint ( ) const [inline, inherited]

computes the adjoint matrix

Author:
Christian Beder
bool BIAS::Matrix< POSECOVARIANCE_TYPE >::BinRead ( const char *  filename) const [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.

Returns:
true on success
Author:
mdunda 04 2004
bool BIAS::Matrix< POSECOVARIANCE_TYPE >::BinWrite ( const char *  filename) const [inherited]

This method writes a matrix to a given file in binary format.

The file is not human read-/editable but provides full precision.

Returns:
true on success
Author:
mdunda 04 2004
void BIAS::PoseParametrizationCovariance::Clear ( ) [inline]

Definition at line 70 of file PoseParametrizationCovariance.hh.

virtual void BIAS::Matrix< POSECOVARIANCE_TYPE >::clear ( ) [inline, virtual, inherited]

stl conform interface destroys Matrix JW

Definition at line 534 of file Matrix.hh.

void TNT::Matrix< POSECOVARIANCE_TYPE >::copy ( const POSECOVARIANCE_TYPE *  v) [inline, protected, inherited]

Definition at line 122 of file cmat.h.

void TNT::Matrix< POSECOVARIANCE_TYPE >::destroy ( ) [inline, protected, inherited]

Definition at line 181 of file cmat.h.

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::DetSquare ( ) const [inline, inherited]
Author:
koeser
Warning:
very slow, generic implementation (order "n!"), better to use matrix decomposition (see BIAS/MathAlgo/Lapack.hh)

Definition at line 369 of file Matrix.hh.

Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::dim ( Subscript  d) const [inline, inherited]

Definition at line 310 of file cmat.h.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Divide ( const POSECOVARIANCE_TYPE &  scalar,
Matrix< POSECOVARIANCE_TYPE > &  dest 
) const [inline, inherited]

division function, storing data destination matrix

Author:
Ingo Thomsen tested
void BIAS::Matrix< POSECOVARIANCE_TYPE >::DivideElementwise ( const Matrix< POSECOVARIANCE_TYPE > &  arg) [inline, inherited]

elementwise division function in place

Author:
Ingo Schiller tested
void BIAS::Matrix< POSECOVARIANCE_TYPE >::DivideIP ( const POSECOVARIANCE_TYPE &  scalar) [inline, inherited]

in place division function

Author:
Ingo Thomsen tested

Definition at line 486 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Fill ( const POSECOVARIANCE_TYPE &  scalar) [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

Author:
Ingo Thomsen
Parameters:
zero_othersMust be true, if all non-diagonal elements shall be set to zero
void BIAS::Matrix< POSECOVARIANCE_TYPE >::GaussJordan ( ) [inherited]

use the Gauss Jordan Algrithm to transform the matrix to reduced row echelon form.

Author:
woelk 05/2008 www.vision-n.de
void BIAS::Matrix< POSECOVARIANCE_TYPE >::GetAbsMaxMin ( POSECOVARIANCE_TYPE &  max,
POSECOVARIANCE_TYPE &  min 
) const [inherited]

return biggest and smallest absolute values

Vector<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::GetCol ( const int &  col) const [inherited]

return a copy of column "col", zero based counting

Author:
Jan Woetzel
unsigned int BIAS::Matrix< POSECOVARIANCE_TYPE >::GetCols ( ) const [inline, inherited]

Definition at line 204 of file Matrix.hh.

Matrix3x3< POSECOVARIANCE_TYPE > PoseParametrizationCovariance::GetCovC ( ) const

Definition at line 22 of file PoseParametrizationCovariance.cpp.

Matrix4x4< POSECOVARIANCE_TYPE > PoseParametrizationCovariance::GetCovQ ( ) const

Definition at line 34 of file PoseParametrizationCovariance.cpp.

POSECOVARIANCE_TYPE * BIAS::Matrix< POSECOVARIANCE_TYPE >::GetData ( ) [inline, inherited]

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) ...

Author:
Jan Woetzel
Returns:
a pointer to the data array (beginning with GetData[0]) alpha (02/27/2002) -added const (jw) 03/12/2002

Definition at line 185 of file Matrix.hh.

const POSECOVARIANCE_TYPE * BIAS::Matrix< POSECOVARIANCE_TYPE >::GetData ( ) const [inline, inherited]

Definition at line 188 of file Matrix.hh.

const POSECOVARIANCE_TYPE ** BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataArray ( ) const [inline, inherited]

returns zero based arry for data access

Definition at line 192 of file Matrix.hh.

POSECOVARIANCE_TYPE ** BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataArray ( ) [inline, inherited]

Definition at line 195 of file Matrix.hh.

POSECOVARIANCE_TYPE ** BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataArray1 ( ) const [inline, inherited]

returns 1 based array to data access

Definition at line 199 of file Matrix.hh.

const POSECOVARIANCE_TYPE * BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataLast ( ) const [inline, inherited]

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.

Author:
Ingo Thomsen, Jan Woetzel
Date:
04/11/2002

Definition at line 213 of file Matrix.hh.

POSECOVARIANCE_TYPE * BIAS::Matrix< POSECOVARIANCE_TYPE >::GetDataLast ( ) [inline, inherited]

Definition at line 219 of file Matrix.hh.

Matrix<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMax ( Matrix< POSECOVARIANCE_TYPE > &  m) [inherited]

returns an matrix the same size as the matrix n and m with the largest elements taken from n or m

Author:
bangerer 01/2009
POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMax ( ) const [inherited]

Returns the maximum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested
void BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMaxMin ( POSECOVARIANCE_TYPE &  max,
POSECOVARIANCE_TYPE &  min 
) const [inherited]

return biggest and smallest entry

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMean ( void  ) const [inherited]

Returns the mean value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested
Matrix<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMin ( Matrix< POSECOVARIANCE_TYPE > &  m) [inherited]

returns an matrix the same size as the matrix n and m with the smallest elements taken from n or m

Author:
bangerer 01/2009
POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::GetMin ( ) const [inherited]

Returns the minimum value of the matrix elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested
int BIAS::Matrix< POSECOVARIANCE_TYPE >::GetNumElements ( ) const [inline, inherited]

Returns the total number of elements.

Author:
Ingo Thomsen
Date:
04/11/2002 tested

Definition at line 321 of file Matrix.hh.

Vector<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::GetRow ( const int &  row) const [inherited]

return a copy of row "row" of this matrix, zero based counting

Author:
Jan Woetzel
unsigned int BIAS::Matrix< POSECOVARIANCE_TYPE >::GetRows ( ) const [inline, inherited]

Definition at line 202 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::GetSubMatrix ( const size_t  startRow,
const size_t  startCol,
const size_t  numRows,
const size_t  numCols,
Matrix< POSECOVARIANCE_TYPE > &  submatrix 
) const [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.

Author:
apetersen 12/2010
void BIAS::Matrix< POSECOVARIANCE_TYPE >::GetSubMatrix ( const Vector< int > &  rows,
const Vector< int > &  cols,
Matrix< POSECOVARIANCE_TYPE > &  submatrix 
) const [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!!!

Author:
apetersen 7/2011
Matrix<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::GetSubMatrix ( const Vector< int > &  rows,
const Vector< int > &  cols 
) const [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)

Author:
apetersen 7/2011
void BIAS::Matrix< POSECOVARIANCE_TYPE >::GetSystemMatrix ( Matrix< POSECOVARIANCE_TYPE > &  dest) const [inline, inherited]

compute square system matrix dest = A^T * A

Parameters:
destholds 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.

Author:
grest/koeser
void TNT::Matrix< POSECOVARIANCE_TYPE >::initialize ( Subscript  M,
Subscript  N 
) [inline, protected, inherited]

Definition at line 95 of file cmat.h.

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::IsIdentity ( double  eps = 0.0) const [inherited]

Checks if the matrix a an identity.

I.e. all elements with index i==j are equal 1 and all others are zero.

Author:
mdunda 12 2003
Returns:
true if matrix is identity
bool BIAS::Matrix< POSECOVARIANCE_TYPE >::IsZero ( double  eps = 0.0) const [inherited]

Checks if the matrix is a null matrix.

Author:
mdunda 12 2003
Returns:
true if all elements are zero
void BIAS::Matrix< POSECOVARIANCE_TYPE >::Kronecker ( Matrix< POSECOVARIANCE_TYPE > const  B,
Matrix< POSECOVARIANCE_TYPE > &  dest 
) const [inherited]

Kronecker-product with matrix, result in dest.

Kronecker-product with matrix B, result in dest.

Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::lbound ( ) const [inline, inherited]

Definition at line 81 of file cmat.h.

bool BIAS::Matrix< POSECOVARIANCE_TYPE >::Load ( const std::string &  filename) [inherited]

method to load directly from a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success
void BIAS::Matrix< POSECOVARIANCE_TYPE >::MakeSymmetric ( ) [inline, inherited]

componentwise: this = 0.5(this + this^T) yields symmetric matrix only allowed for square shaped matrices

Author:
koeser 01/2007

Definition at line 522 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Mult ( const Matrix< POSECOVARIANCE_TYPE > &  arg,
Matrix< POSECOVARIANCE_TYPE > &  result 
) const [inline, inherited]

matrix multiplication, result is not allocated

Author:
Felix Woelk
void BIAS::Matrix< POSECOVARIANCE_TYPE >::Mult ( const Matrix< POSECOVARIANCE_TYPE > &  arg) [inline, inherited]

in Place matrix multiplication this is equal to M = M * arg, but faster

Author:
Daniel Grest
void BIAS::Matrix< POSECOVARIANCE_TYPE >::Mult ( const Vector< POSECOVARIANCE_TYPE > &  arg,
Vector< POSECOVARIANCE_TYPE > &  result 
) const [inline, inherited]

matrix vector multiplication, result is not allocated

Author:
Felix Woelk
void BIAS::Matrix< POSECOVARIANCE_TYPE >::Multiply ( const POSECOVARIANCE_TYPE &  scalar,
Matrix< POSECOVARIANCE_TYPE > &  dest 
) const [inline, inherited]

multiplication function, storing data destination matrix

Author:
Ingo Thomsen tested
void BIAS::Matrix< POSECOVARIANCE_TYPE >::MultiplyIP ( const POSECOVARIANCE_TYPE &  scalar) [inline, inherited]

in place multiplication function

Author:
Ingo Thomsen tested

Definition at line 448 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::MultiplyWithTransposeOf ( const Matrix< POSECOVARIANCE_TYPE > &  arg,
Matrix< POSECOVARIANCE_TYPE > &  result 
) const [inline, inherited]

matrix matrix multiplication for multiplication with the transpose of the given matrix, result=this*arg^T.

Author:
Arne Petersen
void BIAS::Matrix< POSECOVARIANCE_TYPE >::MultLeft ( const Vector< POSECOVARIANCE_TYPE > &  arg,
Vector< POSECOVARIANCE_TYPE > &  result 
) const [inline, inherited]

vector matrix multiplication result=arg*this.

Author:
Marcel Lilienthal
void BIAS::Matrix< POSECOVARIANCE_TYPE >::MultLeft ( const Matrix< POSECOVARIANCE_TYPE > &  arg) [inline, inherited]

in Place matrix multiplication this is equal to M = arg*M, but faster

Author:
Daniel Grest
Matrix<POSECOVARIANCE_TYPE >& TNT::Matrix< POSECOVARIANCE_TYPE >::newsize ( Subscript  M,
Subscript  N 
) [inline, inherited]

Definition at line 269 of file cmat.h.

POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::Normalize ( ) [inherited]

Normalizes the matrix by the entry with the biggest absolute value by dividing all elements with this one.

Returns:
value of the element the matrix is normalized with
Author:
mdunda 09 2003
void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeCols ( ) [inherited]

Normalizes each coloumn to L_2 norm one.

Attention each column is normaized by its own scale!

void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeColsToOne ( const int  norm_row_index) [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

void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeRows ( ) [inherited]

Normalizes each row to L2 norm one.

Attention each row is normaized by its own scale!

void BIAS::Matrix< POSECOVARIANCE_TYPE >::NormalizeRowsToOne ( const int  norm_col_index) [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

double BIAS::Matrix< POSECOVARIANCE_TYPE >::NormFrobenius ( ) const [inline, inherited]

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.

Author:
koeser 02/2004
POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::NormL1 ( ) const [inline, inherited]

Return the L1 norm: |a| + |b| + |c| + ...

Author:
Ingo Thomsen
Date:
04/11/2002 untested
double BIAS::Matrix< POSECOVARIANCE_TYPE >::NormL2 ( ) const [inline, inherited]

Return the L2 norm: a^2 + b^2 + c^2 + ...

Author:
woelk 07/2004
Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::num_cols ( ) const [inline, inherited]

Definition at line 320 of file cmat.h.

Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::num_rows ( ) const [inline, inherited]

Definition at line 319 of file cmat.h.

const_reference TNT::Matrix< POSECOVARIANCE_TYPE >::operator() ( Subscript  i,
Subscript  j 
) const [inline, inherited]

Definition at line 376 of file cmat.h.

reference TNT::Matrix< POSECOVARIANCE_TYPE >::operator() ( Subscript  i,
Subscript  j 
) [inline, inherited]

Definition at line 363 of file cmat.h.

const_reference TNT::Matrix< POSECOVARIANCE_TYPE >::operator() ( Subscript  i) const [inline, inherited]

Definition at line 352 of file cmat.h.

reference TNT::Matrix< POSECOVARIANCE_TYPE >::operator() ( Subscript  i) [inline, inherited]

Definition at line 343 of file cmat.h.

const POSECOVARIANCE_TYPE * TNT::Matrix< POSECOVARIANCE_TYPE >::operator[] ( Subscript  i) const [inline, inherited]

Definition at line 334 of file cmat.h.

POSECOVARIANCE_TYPE * TNT::Matrix< POSECOVARIANCE_TYPE >::operator[] ( Subscript  i) [inline, inherited]

Definition at line 325 of file cmat.h.

std::ostream& TNT::Matrix< POSECOVARIANCE_TYPE >::Print ( std::ostream &  s,
const int  width,
const int  precision,
bool  scientific = true 
) const [inline, inherited]
Author:
Ingo Schiller
std::ostream& TNT::Matrix< POSECOVARIANCE_TYPE >::Print ( std::ostream &  s,
const bool  intCastOutput = false,
const bool  binaryOutput = false,
const bool  forceFullPrecision = false 
) const [inline, inherited]
Author:
Jan Woetzel
std::ostream& TNT::Matrix< POSECOVARIANCE_TYPE >::PrintPretty ( std::ostream &  s,
const std::string &  name = "",
const int  width = 8,
const bool  alignLeft = true 
) const [inline, inherited]
Author:
Sandro Esquivel
std::istream& TNT::Matrix< POSECOVARIANCE_TYPE >::Read ( std::istream &  s,
const bool  intCastInput = false,
const bool  binaryInput = false 
) [inline, inherited]

JW.

Author:
Jan Woetzel
bool BIAS::Matrix< POSECOVARIANCE_TYPE >::Save ( const std::string &  filename) const [inherited]

method to save directly to a given filename.

internally using stream operator

Author:
Jan Woetzel 05/2003
Returns:
false in case of error, true in case of success
void BIAS::Matrix< POSECOVARIANCE_TYPE >::ScaleCol ( int  NoCol,
POSECOVARIANCE_TYPE  scale 
) [inherited]

Scales column NoCol with scale.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::ScaleRow ( int  NoRow,
POSECOVARIANCE_TYPE  scale 
) [inherited]

Scales row NoRow with scale.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Set ( const int  row,
const int  col,
const Vector< POSECOVARIANCE_TYPE > &  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

Author:
woelk 05/2008 (c) www.vision-n.de
void TNT::Matrix< POSECOVARIANCE_TYPE >::set ( const POSECOVARIANCE_TYPE &  val) [inline, protected, inherited]

Definition at line 152 of file cmat.h.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Set ( const int  row,
const int  col,
const Matrix< POSECOVARIANCE_TYPE > &  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

Author:
woelk 05/2008 (c) www.vision-n.de
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetCol ( const int  row,
const Vector< POSECOVARIANCE_TYPE > &  data 
) [inherited]

set a col of matrix from vector

Author:
woelk 08/2004
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetIdentity ( ) [inherited]

Converts matrix to identity matrix.

Even if the matrix is not quadratic, the diagonal values starting with the upper left element are set to 1. Example:

1 0 0 1 0 0 0 0 1 0 or 0 1 0 0 0 0 1 0 0 1 0 0 0 0

Author:
Ingo Thomsen
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetRow ( const int  row,
const Vector< POSECOVARIANCE_TYPE > &  data 
) [inherited]

set a row of matrix from vector

Author:
woelk 08/2004
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetSubMatrix ( const size_t  startRowInThis,
const size_t  startColInThis,
const Matrix< POSECOVARIANCE_TYPE > &  submatrix,
const size_t  startRowInSub,
const size_t  startColInSub,
const size_t  numRows,
const size_t  numCols 
) [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]

Author:
apetersen 12/2010
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetSubMatrix ( const size_t  startRowInThis,
const size_t  startColInThis,
const Matrix3x3< POSECOVARIANCE_TYPE > &  submatrix 
) [inherited]

sets a 3x3 submatrix in this.

Start index in this is [startRowInThis][startColInThis] end index is [startRowInThis+2][startColInThis+2].

Author:
apetersen 12/2010
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetSubMatrix ( const size_t  startRowInThis,
const size_t  startColInThis,
const Vector3< POSECOVARIANCE_TYPE > &  subvector 
) [inherited]

sets a 3x1 submatrix in this.

Start index in this is [startRowInThis][startColInThis] end index is [startRowInThis+2][startColInThis].

Author:
apetersen 12/2010
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetTranspose ( const int  row,
const int  col,
const Vector< POSECOVARIANCE_TYPE > &  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 is interpreted as row vector.

Author:
woelk 05/2008 (c) www.vision-n.de
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SetZero ( ) [inline, inherited]

Sets all values to zero.

Author:
Ingo Thomsen, JW
Date:
04/11/2002 tested
Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::size ( ) const [inline, inherited]

Definition at line 212 of file cmat.h.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::Sub ( const POSECOVARIANCE_TYPE &  scalar,
Matrix< POSECOVARIANCE_TYPE > &  dest 
) const [inline, inherited]

substraction function, storing data destination matrix

Author:
Ingo Thomsen tested
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SubIP ( const Matrix< POSECOVARIANCE_TYPE > &  arg) [inline, inherited]

Subtracts arg from this
this -= arg.

Author:
grest, 2004
void BIAS::Matrix< POSECOVARIANCE_TYPE >::SubIP ( const POSECOVARIANCE_TYPE &  scalar) [inline, inherited]

in place subtraction function

Author:
Ingo Thomsen tested

Definition at line 437 of file Matrix.hh.

void BIAS::Matrix< POSECOVARIANCE_TYPE >::SwapRows ( const int  i,
const int  r 
) [inherited]

swaps two rows

Author:
woelk 05/2008 www.vision-n.de
POSECOVARIANCE_TYPE BIAS::Matrix< POSECOVARIANCE_TYPE >::Trace ( ) const [inline, inherited]
Author:
koeser
void PoseParametrizationCovariance::Transform ( const Matrix4x4< double > &  transf)

Given a 6D pose (position and euler angles) and its associated covariance, the function transforms the covaruiance into pose and quaternion parametrization.

matlab code: alpha = sym('alpha'); beta = sym('beta'); gamma = sym('gamma'); % compute rotation matrix from euler angles R_gamma = [ cos(gamma) -sin(gamma) 0 sin(gamma) cos(gamma) 0 0 0 1]; R_beta = [ cos(beta) 0 sin(beta) 0 1 0 -sin(beta) 0 cos(beta) ]; R_alpha = [ 1 0 0 0 cos(alpha) -sin(alpha) 0 sin(alpha) cos(alpha) ]; R = R_gamma * R_beta * R_alpha; % compute quaternion q from rotation matrix q = [ 1/2 * sqrt(R(1,1) + R(2,2) + R(3,3) + 1) (R(3,2)-R(2,3))/(2*sqrt(R(1,1) + R(2,2) + R(3,3) + 1)) (R(1,3)-R(3,1))/(2*sqrt(R(1,1) + R(2,2) + R(3,3) + 1)) (R(2,1)-R(1,2))/(2*sqrt(R(1,1) + R(2,2) + R(3,3) + 1)) ]; % compute jacobian j = jacobian(q, [alpha, beta, gamma]); disp('J[0][0] = '); disp(j(1,1)); disp('J[1][0] = '); disp(j(2,1)); disp('J[2][0] = '); disp(j(3,1)); disp('J[3][0] = '); disp(j(4,1)); disp('J[0][1] = '); disp(j(1,2)); disp('J[1][1] = '); disp(j(2,2)); disp('J[2][1] = '); disp(j(3,2)); disp('J[3][1] = '); disp(j(4,2)); disp('J[0][2] = '); disp(j(1,3)); disp('J[1][2] = '); disp(j(2,3)); disp('J[2][2] = '); disp(j(3,3)); disp('J[3][2] = '); disp(j(4,3));

The 1st 3 entries of the 6D pose must be the euclidean position coordinates and the last 3 entries must be the Euler angles [Ax, Ay, Az] such that the final rotation matrix is composed from Rz * Ry * Rx. Where Rx denotes the rotation matrix describing the rotation around the x axis, ....

Author:
woelk 03/2006 Transfroms the covariance associated with pose according to the point transformation transf. Only affine transformations are supported. result is "covRes = transf*this"

The seven dimensional pose p is transformed nonlinearily as follows f_(0..2) (p) = T[0..2][0..2] * p[0..2] f_3 (p) = 0 f_(4..6) (p) = T[0..2][0..2] * 1/sin(acos(p[3])) * p[4..6] explanation: The pose is composed of the position (p[0..2]) and the orientation parametrized as a quaternion (p[3..6]). The transformation of the position is straight forward, i.e. by multiplying with T. The Jacobian of this transformation is aequivalent to the upper left 3x3 matrix of T. The union quaternion representing a rotation about the axis [x, y, z]' with angle a can be interpreted as q = [ cos(a/2), x* sin(*a/2), y*sin(a/2), z*sin(a/2)]' and the transformation of the quaternion is aequivalent to the transf. of the axis [x, y, z] = 1/(sin(acos(q[0])) * q[1..3]) hint: d/dx (1/(sin(acos(x))) = x/(1-x^2)^3/2

Definition at line 150 of file PoseParametrizationCovariance.cpp.

References BIAS::Matrix3x3< T >::GetColumn(), BIAS::RMatrixBase::GetQuaternion(), BIAS::Quaternion< QUAT_TYPE >::GetQuaternionMultMatrixLeft(), BIAS::Vector3< T >::Normalize(), BIAS::Matrix3x3< T >::SetColumn(), and BIAS::Matrix< T >::Transpose().

Referenced by BIAS::Pose::TransformToNewGlobalBy().

Matrix<POSECOVARIANCE_TYPE > BIAS::Matrix< POSECOVARIANCE_TYPE >::Transpose ( ) const [inline, inherited]

transpose function, storing data destination matrix

Author:
JMF
void BIAS::Matrix< POSECOVARIANCE_TYPE >::Vec ( Vector< POSECOVARIANCE_TYPE > &  dest) const [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::Matrix< POSECOVARIANCE_TYPE >::WriteMatlab ( std::ostream &  ostr,
const std::string &  name 
) const [inherited]

Write the matrix in Matlab format to the given stream.

Parameters:
nameIs the name of the Matlab variable
Author:
streckel 08/2006
Returns:
negativev if error

Member Data Documentation

Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::m_ [protected, inherited]

Definition at line 84 of file cmat.h.

Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::mn_ [protected, inherited]

Definition at line 86 of file cmat.h.

Subscript TNT::Matrix< POSECOVARIANCE_TYPE >::n_ [protected, inherited]

Definition at line 85 of file cmat.h.

POSECOVARIANCE_TYPE ** TNT::Matrix< POSECOVARIANCE_TYPE >::row_ [protected, inherited]

Definition at line 88 of file cmat.h.

POSECOVARIANCE_TYPE ** TNT::Matrix< POSECOVARIANCE_TYPE >::rowm1_ [protected, inherited]

Definition at line 90 of file cmat.h.

POSECOVARIANCE_TYPE * TNT::Matrix< POSECOVARIANCE_TYPE >::v_ [protected, inherited]

Definition at line 87 of file cmat.h.

POSECOVARIANCE_TYPE * TNT::Matrix< POSECOVARIANCE_TYPE >::vm1_ [protected, inherited]

Definition at line 89 of file cmat.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends