Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::TrifocalTensor Class Reference

#include <Geometry/TrifocalTensor.hh>

+ Inheritance diagram for BIAS::TrifocalTensor:

Public Member Functions

void CheckPointCorr (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p3, Matrix3x3< double > &res)
 
void Compose (BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3)
 Composes the trifocal tensor from three 3x4 camera matrices. More...
 
void Compose (RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C1, Vector3< double > &C2, Vector3< double > &C3)
 composition for "normalized" (with K^-1) image points More...
 
void Compose (BIAS::PMatrix &P2, BIAS::PMatrix &P3)
 Composes the trifocal tensor from two 3x4 camera matrices, assuming that P1=[I | 0]. More...
 
void Compose (RMatrixBase &R1, RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C1, HomgPoint3D &C2, HomgPoint3D &C3)
 
void Compose (RMatrixBase &R2, RMatrixBase &R3, Vector3< double > &C2, Vector3< double > &C3)
 composition for R1=I and C1=0 More...
 
void Compose (RMatrixBase &R2, RMatrixBase &R3, HomgPoint3D &C2, HomgPoint3D &C3)
 
void Destroy ()
 frees internal data More...
 
void Dump ()
 
BIAS::Matrix4x4< PMATRIX_TYPE > GetCanonicalH () const
 
TRIFOCALTENSOR_TYPE * GetData ()
 
const TRIFOCALTENSOR_TYPE * GetData () const
 
TRIFOCALTENSOR_TYPE *** GetDataArray ()
 
int GetDim1 () const
 
int GetDim2 () const
 
int GetDim3 () const
 
void GetEpipolarLines (Vector3< TRIFOCALTENSOR_TYPE > &Point1, HomgLine2D &Line2, HomgLine2D &Line3)
 
BIAS::HomgPoint2D GetEpipole21 (bool ForceReCalc=false)
 
BIAS::HomgPoint2D GetEpipole31 (bool ForceReCalc=false)
 
BIAS::FMatrix GetFMatrix21 (bool ForceReCalc=false)
 
BIAS::FMatrix GetFMatrix31 (bool ForceReCalc=false)
 
TRIFOCALTENSOR_TYPE GetLength () const
 
void GetMatrices (Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, Matrix3x3< TRIFOCALTENSOR_TYPE > &T3) const
 
BIAS::PMatrix GetPMatrix2 (bool ForceReCalc=false)
 
BIAS::PMatrix GetPMatrix3 (bool ForceReCalc=false)
 
void Init ()
 
void LeftContravariantContraction1 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
 computes the contraction of index 1 from left with contravariant vector , i.e. More...
 
Matrix3x3< TRIFOCALTENSOR_TYPE > LeftContravariantContraction1 (Vector3< TRIFOCALTENSOR_TYPE > &v)
 
void LeftContravariantContraction2 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
 
Matrix3x3< TRIFOCALTENSOR_TYPE > LeftContravariantContraction2 (Vector3< TRIFOCALTENSOR_TYPE > &v)
 
void LeftContravariantContraction3 (Vector3< TRIFOCALTENSOR_TYPE > &v, Matrix3x3< TRIFOCALTENSOR_TYPE > &res)
 
Matrix3x3< TRIFOCALTENSOR_TYPE > LeftContravariantContraction3 (Vector3< TRIFOCALTENSOR_TYPE > &v)
 
void NewSize (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
 
void newsize (const int i, const int j, const int k, const TRIFOCALTENSOR_TYPE &def=(TRIFOCALTENSOR_TYPE) 0.0)
 
TRIFOCALTENSOR_TYPE & operator() (unsigned int i, unsigned int j, unsigned int k)
 direct data access through () operator: T_i^{jk} More...
 
TrifocalTensoroperator= (const TrifocalTensor &t)
 
bool operator== (const Tensor3D< TRIFOCALTENSOR_TYPE > &t)
 checks if all tensor entries are equal (up-to-scale-equality is not checked) More...
 
void postmultiply1 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
 Compute S_{ijk} = T_{pjk} M_{pi}. More...
 
void postmultiply2 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
 Compute S_{ijk} = T_{ipk} M_{pj}. More...
 
void postmultiply3 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
 Compute S_{ijk} = T_{ijp} M_{pk}. More...
 
void premultiply1 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
 compute S_{ijk} = M_{ip} T_{pjk} More...
 
void premultiply2 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
 compute S_{ijk} = M_{jp} T_{ipk} More...
 
void premultiply3 (const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &M, Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &result) const
 compute S_{ijk} = M_{kp} T_{ijp} More...
 
void Scale (TRIFOCALTENSOR_TYPEfactor)
 
void SetFromMatrices (const Matrix3x3< TRIFOCALTENSOR_TYPE > &T1, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T2, const Matrix3x3< TRIFOCALTENSOR_TYPE > &T3)
 implementation More...
 
void SetFromVector (const BIAS::Vector< TRIFOCALTENSOR_TYPE > &v)
 set the tensor by the rows of the vector. More...
 
void SetZero ()
 set all elements to zero More...
 
BIAS::Vector< TRIFOCALTENSOR_TYPE > ToVector ()
 
HomgPoint2D TransferView3 (Vector3< TRIFOCALTENSOR_TYPE > &x1, Vector3< TRIFOCALTENSOR_TYPE > &x2)
 
 TrifocalTensor ()
 
 TrifocalTensor (BIAS::PMatrix &P1, BIAS::PMatrix &P2, BIAS::PMatrix &P3)
 
 TrifocalTensor (BIAS::PMatrix &P2, BIAS::PMatrix &P3)
 
 ~TrifocalTensor ()
 

Protected Member Functions

void ComputeEpipoles ()
 

Protected Attributes

TRIFOCALTENSOR_TYPE * _Data
 
TRIFOCALTENSOR_TYPE *** _DataArray
 
int _Dim1
 
int _Dim2
 
int _Dim3
 
int _Size
 
BIAS::Matrix4x4< PMATRIX_TYPE > CanH_
 
BIAS::HomgPoint2DEpipole21_
 
BIAS::HomgPoint2DEpipole31_
 

Detailed Description

Definition at line 37 of file TrifocalTensor.hh.

Constructor & Destructor Documentation

TrifocalTensor::TrifocalTensor ( )

Definition at line 9 of file TrifocalTensor.cpp.

TrifocalTensor::~TrifocalTensor ( )

Definition at line 15 of file TrifocalTensor.cpp.

TrifocalTensor::TrifocalTensor ( BIAS::PMatrix P1,
BIAS::PMatrix P2,
BIAS::PMatrix P3 
)

Definition at line 20 of file TrifocalTensor.cpp.

TrifocalTensor::TrifocalTensor ( BIAS::PMatrix P2,
BIAS::PMatrix P3 
)

Definition at line 28 of file TrifocalTensor.cpp.

Member Function Documentation

void TrifocalTensorBase::CheckPointCorr ( HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint2D p3,
Matrix3x3< double > &  res 
)
inherited
void TrifocalTensor::Compose ( BIAS::PMatrix P1,
BIAS::PMatrix P2,
BIAS::PMatrix P3 
)

Composes the trifocal tensor from three 3x4 camera matrices.

Author
Matthias Dunda

Definition at line 42 of file TrifocalTensor.cpp.

References BIAS::PMatrix::GetCanonicalH(), and BIAS::Matrix< T >::IsIdentity().

void TrifocalTensorBase::Compose ( RMatrixBase R1,
RMatrixBase R2,
RMatrixBase R3,
Vector3< double > &  C1,
Vector3< double > &  C2,
Vector3< double > &  C3 
)
inherited

composition for "normalized" (with K^-1) image points

Examples:
ExampleTFT.cpp.

Definition at line 54 of file TrifocalTensorBase.cpp.

References BIAS::Matrix3x3< T >::Mult(), and BIAS::Matrix3x3< T >::Transpose().

Referenced by BIAS::TrifocalTensorBase::Compose().

void TrifocalTensor::Compose ( BIAS::PMatrix P2,
BIAS::PMatrix P3 
)

Composes the trifocal tensor from two 3x4 camera matrices, assuming that P1=[I | 0].

Author
Matthias Dunda

Definition at line 54 of file TrifocalTensor.cpp.

References BIAS::Matrix< T >::GetCol(), and BIAS::Vector3< T >::OuterProduct().

void TrifocalTensorBase::Compose ( RMatrixBase R1,
RMatrixBase R2,
RMatrixBase R3,
HomgPoint3D C1,
HomgPoint3D C2,
HomgPoint3D C3 
)
inherited
void TrifocalTensorBase::Compose ( RMatrixBase R2,
RMatrixBase R3,
Vector3< double > &  C2,
Vector3< double > &  C3 
)
inherited
void TrifocalTensorBase::Compose ( RMatrixBase R2,
RMatrixBase R3,
HomgPoint3D C2,
HomgPoint3D C3 
)
inherited
void TrifocalTensor::ComputeEpipoles ( )
protected
void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Destroy ( )
inherited

frees internal data

void TrifocalTensorBase::Dump ( )
inherited
BIAS::Matrix4x4<PMATRIX_TYPE> BIAS::TrifocalTensor::GetCanonicalH ( ) const
inline
Returns
the canonical H matrix that is computed when composing from three camera-matrices with P1 != [I|0]
Author
mdunda 01 2004

Definition at line 58 of file TrifocalTensor.hh.

TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetData ( )
inlineinherited

Definition at line 72 of file Tensor3D.hh.

const TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetData ( ) const
inlineinherited

Definition at line 78 of file Tensor3D.hh.

TRIFOCALTENSOR_TYPE *** BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDataArray ( )
inlineinherited

Definition at line 75 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim1 ( ) const
inherited
int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim2 ( ) const
inherited
int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetDim3 ( ) const
inherited
void TrifocalTensor::GetEpipolarLines ( Vector3< TRIFOCALTENSOR_TYPE > &  Point1,
HomgLine2D Line2,
HomgLine2D Line3 
)
HomgPoint2D TrifocalTensor::GetEpipole21 ( bool  ForceReCalc = false)
Returns
epipole in the second view according to the first
Parameters
ForceReCalcforces a recalculation although a value is cached
Author
Matthias Dunda

Definition at line 115 of file TrifocalTensor.cpp.

HomgPoint2D TrifocalTensor::GetEpipole31 ( bool  ForceReCalc = false)
Returns
epipole in the third view according to the first
Parameters
ForceReCalcforces a recalculation although a value is cached
Author
Matthias Dunda

Definition at line 122 of file TrifocalTensor.cpp.

FMatrix TrifocalTensor::GetFMatrix21 ( bool  ForceReCalc = false)
Returns
the F-matrix between the first and the second view
Parameters
ForceReCalcforces a recalculation although a value is cached
Author
Matthias Dunda

Definition at line 128 of file TrifocalTensor.cpp.

References BIAS::Vector3< T >::CrossProduct(), and BIAS::Matrix3x3< T >::Mult().

FMatrix TrifocalTensor::GetFMatrix31 ( bool  ForceReCalc = false)
Returns
the F-matrix between the first and the third view
Parameters
ForceReCalcforces a recalculation although a value is cached
Author
Matthias Dunda

Definition at line 155 of file TrifocalTensor.cpp.

References BIAS::Vector3< T >::CrossProduct(), and BIAS::Matrix3x3< T >::Mult().

TRIFOCALTENSOR_TYPE BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::GetLength ( ) const
inherited
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::GetMatrices ( Matrix3x3< TRIFOCALTENSOR_TYPE > &  T1,
Matrix3x3< TRIFOCALTENSOR_TYPE > &  T2,
Matrix3x3< TRIFOCALTENSOR_TYPE > &  T3 
) const
inlineinherited
PMatrix TrifocalTensor::GetPMatrix2 ( bool  ForceReCalc = false)
Returns
the P-matrix for the second view (assuming P1=[I|0])
Parameters
ForceReCalcforces a recalculation although a value is cached
Author
Matthias Dunda

Definition at line 182 of file TrifocalTensor.cpp.

References BIAS::Matrix3x3< T >::Mult(), and BIAS::Vector3< T >::Normalize().

PMatrix TrifocalTensor::GetPMatrix3 ( bool  ForceReCalc = false)
Returns
the P-matrix for the third view (assuming P1=[I|0])
Parameters
ForceReCalcforces a recalculation although a value is cached
Author
Matthias Dunda

Definition at line 207 of file TrifocalTensor.cpp.

References BIAS::Matrix3x3< T >::Mult(), BIAS::Vector3< T >::Normalize(), and BIAS::Matrix3x3< T >::Transpose().

void TrifocalTensor::Init ( )

Definition at line 35 of file TrifocalTensor.cpp.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1 ( Vector3< TRIFOCALTENSOR_TYPE > &  v,
Matrix3x3< TRIFOCALTENSOR_TYPE > &  res 
)
inlineinherited

computes the contraction of index 1 from left with contravariant vector , i.e.

res[k][j] = sum_i v[i] * (*this)[k][j]

Author
woelk 07/2004

Referenced by BIAS::TrifocalTensorBase::CheckPointCorr().

Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction1 ( Vector3< TRIFOCALTENSOR_TYPE > &  v)
inlineinherited

Definition at line 60 of file Tensor3D3x3x3.hh.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2 ( Vector3< TRIFOCALTENSOR_TYPE > &  v,
Matrix3x3< TRIFOCALTENSOR_TYPE > &  res 
)
inlineinherited
Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction2 ( Vector3< TRIFOCALTENSOR_TYPE > &  v)
inlineinherited

Definition at line 67 of file Tensor3D3x3x3.hh.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction3 ( Vector3< TRIFOCALTENSOR_TYPE > &  v,
Matrix3x3< TRIFOCALTENSOR_TYPE > &  res 
)
inlineinherited
Matrix3x3<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::LeftContravariantContraction3 ( Vector3< TRIFOCALTENSOR_TYPE > &  v)
inlineinherited

Definition at line 74 of file Tensor3D3x3x3.hh.

void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::NewSize ( const int  i,
const int  j,
const int  k,
const TRIFOCALTENSOR_TYPE &  def = (T)0.0 
)
inherited
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::newsize ( const int  i,
const int  j,
const int  k,
const TRIFOCALTENSOR_TYPE &  def = (T)0.0 
)
inherited
TRIFOCALTENSOR_TYPE & BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k 
)
inlineinherited

direct data access through () operator: T_i^{jk}

Author
mdunda 07 2004

Definition at line 96 of file Tensor3D.hh.

TrifocalTensor & TrifocalTensor::operator= ( const TrifocalTensor t)

Definition at line 285 of file TrifocalTensor.cpp.

bool BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::operator== ( const Tensor3D< TRIFOCALTENSOR_TYPE > &  t)
inherited

checks if all tensor entries are equal (up-to-scale-equality is not checked)

Author
mdunda 07 2004
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply1 ( const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &  M,
Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &  result 
) const
inherited

Compute S_{ijk} = T_{pjk} M_{pi}.

Author
mdunda
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply2 ( const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &  M,
Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &  result 
) const
inherited

Compute S_{ijk} = T_{ipk} M_{pj}.

Author
mdunda
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::postmultiply3 ( const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &  M,
Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &  result 
) const
inherited

Compute S_{ijk} = T_{ijp} M_{pk}.

Author
mdunda
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply1 ( const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &  M,
Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &  result 
) const
inherited

compute S_{ijk} = M_{ip} T_{pjk}

Author
mdunda
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply2 ( const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &  M,
Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &  result 
) const
inherited

compute S_{ijk} = M_{jp} T_{ipk}

Author
mdunda
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::premultiply3 ( const BIAS::Matrix3x3< TRIFOCALTENSOR_TYPE > &  M,
Tensor3D3x3x3< TRIFOCALTENSOR_TYPE > &  result 
) const
inherited

compute S_{ijk} = M_{kp} T_{ijp}

Author
mdunda
void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::Scale ( TRIFOCALTENSOR_TYPE  factor)
inherited
void BIAS::Tensor3D3x3x3< TRIFOCALTENSOR_TYPE >::SetFromMatrices ( const Matrix3x3< TRIFOCALTENSOR_TYPE > &  T1,
const Matrix3x3< TRIFOCALTENSOR_TYPE > &  T2,
const Matrix3x3< TRIFOCALTENSOR_TYPE > &  T3 
)
inlineinherited

implementation

Referenced by BIAS::TrifocalTensorBase::Compose().

void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::SetFromVector ( const BIAS::Vector< TRIFOCALTENSOR_TYPE > &  v)
inherited

set the tensor by the rows of the vector.

Vector size must be at least Dim1*Dim2*Dim3!

Author
mdunda
void BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::SetZero ( )
inherited

set all elements to zero

BIAS::Vector<TRIFOCALTENSOR_TYPE > BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::ToVector ( )
inherited
Returns
all tensor elements in a vector
Author
mdunda
HomgPoint2D TrifocalTensor::TransferView3 ( Vector3< TRIFOCALTENSOR_TYPE > &  x1,
Vector3< TRIFOCALTENSOR_TYPE > &  x2 
)
Returns
the transferred point in the third view given points in the first and second view
Author
mdunda

Definition at line 258 of file TrifocalTensor.cpp.

References BIAS::HomgLine2D::GetPerpendicularLine(), and BIAS::Vector3< T >::Normalize().

Member Data Documentation

TRIFOCALTENSOR_TYPE * BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Data
protectedinherited

Definition at line 107 of file Tensor3D.hh.

TRIFOCALTENSOR_TYPE *** BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_DataArray
protectedinherited

Definition at line 111 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim1
protectedinherited

Definition at line 112 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim2
protectedinherited

Definition at line 112 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Dim3
protectedinherited

Definition at line 112 of file Tensor3D.hh.

int BIAS::Tensor3D< TRIFOCALTENSOR_TYPE >::_Size
protectedinherited

Definition at line 112 of file Tensor3D.hh.

BIAS::Matrix4x4<PMATRIX_TYPE> BIAS::TrifocalTensor::CanH_
protected

Definition at line 105 of file TrifocalTensor.hh.

BIAS::HomgPoint2D* BIAS::TrifocalTensor::Epipole21_
protected

Definition at line 106 of file TrifocalTensor.hh.

BIAS::HomgPoint2D* BIAS::TrifocalTensor::Epipole31_
protected

Definition at line 107 of file TrifocalTensor.hh.


The documentation for this class was generated from the following files: