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

Class for triangulation of 3Dpoints from 2D matches. Covariance matrix (refering to an uncertainty ellipsoid) is computed also. More...

#include <Geometry/Triangulation.hh>

+ Inheritance diagram for BIAS::Triangulation:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
int CorrectCorrespondences (const FMatrix &F, HomgPoint2D &p1, HomgPoint2D &p2, bool refine=false)
 optimize 2d correspondences regarding F for triangulation More...
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int GetCovariance (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const Matrix2x2< double > &cov1, const HomgPoint2D &p2, const Matrix2x2< double > &cov2, HomgPoint3D &p, Matrix3x3< double > &cov, const int num, bool quasiEuclidean=false)
 returns an approximation to the 3D point p with uncertainty cov as derived from the 2D points p1 and p2 with uncertainties cov1 and cov2 More...
 
int GetCovariance2D (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3D, Matrix3x3< double > &covariance, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL)
 Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'. More...
 
int GetCovarianceAnalytic (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3D, Matrix3x3< double > &covariance, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL, const double &sigma=TRIANGULATION_DEFAULT_SIGMA)
 Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'. More...
 
int GetCovarianceProjective (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const HomgPoint2DCov &cov1, const HomgPoint2D &p2, const HomgPoint2DCov &cov2, HomgPoint3D &p, HomgPoint3DCov &cov)
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
int Intersect (Vector3< double > &pA, Vector3< double > &dirA, Vector3< double > &pB, Vector3< double > &dirB, Vector3< double > &res)
 analytic correct intersection of two lines, point returned has minimum distance to both lines. More...
 
int Intersect (Vector3< double > &pA, Vector3< double > &dirA, Vector3< double > &pB, Vector3< double > &dirB, Vector3< double > &res, double &dist)
 analytic correct intersection of two lines, point returned has minimum distance to both lines, distance between lines is returned in dist. More...
 
Vector3< double > Intersect (Vector3< double > &a1, Vector3< double > &a2, Vector3< double > &b1, Vector3< double > &b2)
 analytic correct intersection of two lines, point returned has minimum distance to both lines. More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
int Optimal (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d)
 method from Hartley Zisserman chapter 12.5 pp 315 first uses CorrectCorrespondences() and then calls TriangulateLinear() More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
int Triangulate (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, BIAS::Vector3< double > &point3d)
 Triangulation for metric PMatrices (using C and Hinf) More...
 
int Triangulate (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, BIAS::HomgPoint3D &point3d)
 deprecated More...
 
int Triangulate (const ProjectionParametersBase *P1, const ProjectionParametersBase *P2, const HomgPoint2D &p1, const HomgPoint2D &p2, Vector3< double > &point3d)
 Triangulation for metric Poses (using C and R) More...
 
int Triangulate (const ProjectionParametersBase *P1, const ProjectionParametersBase *P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
 deprecated More...
 
int Triangulate (const Pose &P1, const Pose &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, Vector3< double > &point3d)
 Triangulation for metric Poses (using C and R) More...
 
int Triangulate (const Pose &P1, const Pose &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
 deprecated More...
 
int Triangulate (const Vector3< double > &C1, const Quaternion< double > &Q1, const Vector3< double > &C2, const Quaternion< double > &Q2, const HomgPoint2D &p1, const HomgPoint2D &p2, Vector3< double > &point3d)
 Triangulation for metric Poses (using C and Q) More...
 
int Triangulate (const Vector3< double > &C1, const Quaternion< double > &Q1, const Vector3< double > &C2, const Quaternion< double > &Q2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
 deprecated More...
 
int Triangulate2D (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d, double &dist, double &angle)
 does not use BackprojectPseudoInverse but get NormRayWorldCoo More...
 
int Triangulate2D (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d, Matrix3x3< double > &CovMatrix, double &dist, double &angle, const double &triangdeltapixel=TRIANGULATION_DEFAULT_DELTAPIXEL)
 as above, but also determines the covariance matrix More...
 
int TriangulateLinear (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d)
 Triangulates a 3d point without decomposition of P matrix, use this method in selfcalibration scenarios. More...
 
int TriangulateLinear (std::vector< PMatrix > pmatrices, std::vector< HomgPoint2D > homgPoints2D, HomgPoint3D &point3d)
 Triangulates a 3d point without decomposition of P matrix, use this method in selfcalibration scenarios. More...
 
int TriangulateProjective (const ProjectionParametersBase *P1, const ProjectionParametersBase *P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
 Triangulation for metric Poses (using C and R) More...
 
 Triangulation ()
 
 ~Triangulation ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

void _UpdateCovWeights (const double &TriangDeltaPixels=TRIANGULATION_DEFAULT_DELTAPIXEL, const double &sigma=TRIANGULATION_DEFAULT_SIGMA)
 called by constructor to set up neighbourhood weights for covariance computation More...
 
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 

Protected Attributes

double _dTriangDeltaPixels
 value to go up/down/left/right for "manual" covariance computation More...
 
double _dTriangSigmaPixels
 
long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
Matrix3x3< double > cov_weights_
 neighbourhood weights for covariance computation More...
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

Class for triangulation of 3Dpoints from 2D matches. Covariance matrix (refering to an uncertainty ellipsoid) is computed also.

Test:
tested with TestTriangulation.cpp

all functions so far only for 2 images (no trifocal).

Author
: Felix Woelk and Jan Frahm
Examples:
ExampleAutoCalib.cpp, ExampleFMatrix.cpp, ExampleTriangulate.cpp, ExampleTriangulate2.cpp, and ExampleTriangulateOptimal.cpp.

Definition at line 75 of file Triangulation.hh.

Constructor & Destructor Documentation

Triangulation::Triangulation ( )

Definition at line 44 of file Triangulation.cpp.

References _UpdateCovWeights(), and BIAS::Debug::NewDebugLevel().

Triangulation::~Triangulation ( )

Definition at line 63 of file Triangulation.cpp.

Member Function Documentation

void Triangulation::_UpdateCovWeights ( const double &  TriangDeltaPixels = TRIANGULATION_DEFAULT_DELTAPIXEL,
const double &  sigma = TRIANGULATION_DEFAULT_SIGMA 
)
protected

called by constructor to set up neighbourhood weights for covariance computation

Definition at line 711 of file Triangulation.cpp.

References _dTriangDeltaPixels, _dTriangSigmaPixels, and cov_weights_.

Referenced by GetCovariance2D(), GetCovarianceAnalytic(), and Triangulation().

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

int Triangulation::CorrectCorrespondences ( const FMatrix F,
HomgPoint2D p1,
HomgPoint2D p2,
bool  refine = false 
)

optimize 2d correspondences regarding F for triangulation

In projective reconstruction you have to optimize the correspondences regarding epipolar geometry for the 3d point to be projectively optimal before you use TriangulateLinear() See section Hartley/Zisserman "Multiple View Geometry", section "optimal triangulation", section 12.5, pp.315

if refine==true, a non linear optimization for the real roots of the 6 degree polynomial is done using the powell algorithm from minpack

Hereby F maps point from image 1 into lines in image 2, i.e. F_{12}.

Author
woelk 08/2004 heavily tested (ExampleTriangulateOptimal)

see mupad assume(a, Type::Real): assume(b, Type::Real): assume(c, Type::Real): assume(d, Type::Real): assume(f, Type::Real): assume(mfp, Type::Real): assume(t, Type::Real):

g:=t*((a*t+b)^2+mfp^2*(c*t+d)^2)^2-(a*d-b*c)*(1+f^2*t^2)^2*(a*t+b)*(c*t+d):

g:=simplify(expand(g)):

PRETTYPRINT := FALSE:

res:=poly(collect(g, [t]), [t]);

fprint(Unquoted, 0, "coeff[0]=", coeff(res, t, 0), "; // t^0"): fprint(Unquoted, 0, "coeff[1]=", coeff(res, t, 1), "; // t^1"): fprint(Unquoted, 0, "coeff[2]=", coeff(res, t, 2), "; // t^2"): fprint(Unquoted, 0, "coeff[3]=", coeff(res, t, 3), "; // t^3"): fprint(Unquoted, 0, "coeff[4]=", coeff(res, t, 4), "; // t^4"): fprint(Unquoted, 0, "coeff[5]=", coeff(res, t, 5), "; // t^5"): fprint(Unquoted, 0, "coeff[6]=", coeff(res, t, 6), "; // t^6"):

Definition at line 191 of file Triangulation.cpp.

References BIAS::Debug::AddDebugLevel(), BIAS::PolynomialSolve::CheckCoefficients(), BIAS::Debug::DebugLevelIsSet(), BIAS::PolynomialSolve::EvaluatePolynomial(), BIAS::FMatrix::GetEpipoles(), BIAS::HomgPoint2D::Homogenize(), BIAS::PolynomialSolve::NonLinearRefine(), BIAS::PolynomialSolve::Numeric(), BIAS::Vector3< T >::Set(), BIAS::HomgPoint2D::Set(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix3x3< T >::TransposedMult().

Referenced by Optimal().

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

int Triangulation::GetCovariance ( PMatrix P1,
PMatrix P2,
const HomgPoint2D p1,
const Matrix2x2< double > &  cov1,
const HomgPoint2D p2,
const Matrix2x2< double > &  cov2,
HomgPoint3D p,
Matrix3x3< double > &  cov,
const int  num,
bool  quasiEuclidean = false 
)

returns an approximation to the 3D point p with uncertainty cov as derived from the 2D points p1 and p2 with uncertainties cov1 and cov2

Generates randomly num 2D coordinates distributed according to cov1 centered around p1 and num 2D coordinates distributed according to cov2 centered around p2. For every possible combination of these two 2D point clouds a 3D point is triangulated resulting in a 3D point cloud of maximum num*num points. The mean and the covariance of this 3D point cloud is calculated and returned in p (mean) and cov. The 3D point p, which is the mean of the point cloud, is generally not* aequivalent to the 3D point resulting from simple triangulation using p1 and p2.

The 2D points p1 and p2 must be homogenized and are not allowed to be at infinity.

!! untested !!

Returns
the number of points in 3D cloud. The covariance of the 3D approximation cov is only valid if more than 1 point was triangulated
Author
woelk 07/2005

Definition at line 992 of file Triangulation.cpp.

References BIAS::Random::GetNormalDistributed(), BIAS::HomgPoint3D::Homogenize(), BIAS::HomgPoint2D::IsAtInfinity(), BIAS::HomgPoint2D::IsHomogenized(), BIAS::MatrixZero, BIAS::HomgPoint3D::Set(), BIAS::HomgPoint2D::Set(), BIAS::Matrix3x3< T >::SetZero(), BIAS::Matrix2x2< T >::SetZero(), Triangulate(), and TriangulateLinear().

int Triangulation::GetCovariance2D ( PMatrix P1,
PMatrix P2,
HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint3D point3D,
Matrix3x3< double > &  covariance,
const double &  triangdeltapixel = TRIANGULATION_DEFAULT_DELTAPIXEL 
)

Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'.

It is calculated by triangulation of all neighboring pixels within +- triangdeltapixel of p1 and p2 and taking the variance with 'point'. Uses Triangulate2D. returns 0 in case of success returns -4 in case of error (too little triangulations succeeded)

Author
Daniel Grest, Oct 2002 tested

Definition at line 748 of file Triangulation.cpp.

References _dTriangDeltaPixels, _UpdateCovWeights(), cov_weights_, BIAS::HomgPoint3D::Homogenize(), BIAS::HomgPoint2D::Homogenize(), BIAS::HomgPoint2D::Set(), BIAS::Matrix3x3< T >::SetZero(), and Triangulate2D().

Referenced by Triangulate2D().

int Triangulation::GetCovarianceAnalytic ( PMatrix P1,
PMatrix P2,
HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint3D point3D,
Matrix3x3< double > &  covariance,
const double &  triangdeltapixel = TRIANGULATION_DEFAULT_DELTAPIXEL,
const double &  sigma = TRIANGULATION_DEFAULT_SIGMA 
)

Calculates and returns the uncertainty as normalized covariance matrix in 'covariance'.

It is calculated by triangulation of all neighboring pixels within +- triangdeltapixel of p1 and p2 and taking the variance with 'point'. Uses Triangulate.

Author
Daniel Grest, Oct 2002
Parameters
P1PMatrix for image one
P1PMatrix for image two
p1Homogenized(!) point in image one
p2Homogenized(!) point in image two
triangdeltapixeloffset in all directions and both images tested
Returns
0 in case of success, <0 otherwise

Definition at line 851 of file Triangulation.cpp.

References _dTriangDeltaPixels, _dTriangSigmaPixels, _UpdateCovWeights(), cov_weights_, BIAS::HomgPoint3D::IsHomogenized(), BIAS::HomgPoint2D::IsHomogenized(), BIAS::HomgPoint2D::Set(), BIAS::Matrix3x3< T >::SetZero(), and Triangulate().

int Triangulation::GetCovarianceProjective ( PMatrix P1,
PMatrix P2,
const HomgPoint2D p1,
const HomgPoint2DCov cov1,
const HomgPoint2D p2,
const HomgPoint2DCov cov2,
HomgPoint3D p,
HomgPoint3DCov cov 
)
int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

int Triangulation::Intersect ( Vector3< double > &  pA,
Vector3< double > &  dirA,
Vector3< double > &  pB,
Vector3< double > &  dirB,
Vector3< double > &  res 
)

analytic correct intersection of two lines, point returned has minimum distance to both lines.

Lines have parametric description by point and direction. IMPORTANT: directions MUST BE normalized!!

Returns
0 in case of no errror, <0 if errors, 1 if intersection point lies not in direction of dirB, 2 if intersection point lies not in direction of dirA

Refer to Kanatani Statistical Opt. for Geometric Comp. , page 108

Author
grest, Sept. 2003
Examples:
ExampleTriangulate.cpp.

Definition at line 1263 of file Triangulation.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Multiply(), BIAS::Vector3< T >::NormL2(), and BIAS::Vector3< T >::ScalarProduct().

Referenced by Intersect(), and Triangulate().

int Triangulation::Intersect ( Vector3< double > &  pA,
Vector3< double > &  dirA,
Vector3< double > &  pB,
Vector3< double > &  dirB,
Vector3< double > &  res,
double &  dist 
)

analytic correct intersection of two lines, point returned has minimum distance to both lines, distance between lines is returned in dist.

Lines have parametric description by point and direction. IMPORTANT: directions MUST BE normalized!!

Returns
0 in case of no errror, <0 if errors, 1 if intersection point lies not in direction of dirB
Attention
sanity check regarding dirA is not done !

Refer to Kanatani Statistical Opt. for Geometric Comp. , page 108

Author
grest, Sept. 2003

Definition at line 1333 of file Triangulation.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Multiply(), BIAS::Vector3< T >::NormL2(), and BIAS::Vector3< T >::ScalarProduct().

Vector3< double > Triangulation::Intersect ( Vector3< double > &  a1,
Vector3< double > &  a2,
Vector3< double > &  b1,
Vector3< double > &  b2 
)

analytic correct intersection of two lines, point returned has minimum distance to both lines.

Line A is described by points a1,a2 and line B by b1,b2 Refer to Kanatani Statistical Opt. for Geometric Comp. ,page108

Author
grest, Sept. 2003

Definition at line 975 of file Triangulation.cpp.

References Intersect(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::NormL2().

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
int Triangulation::Optimal ( PMatrix P1,
PMatrix P2,
HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint3D point3d 
)

method from Hartley Zisserman chapter 12.5 pp 315 first uses CorrectCorrespondences() and then calls TriangulateLinear()

Author
woelk 08/2004
Examples:
ExampleTriangulateOptimal.cpp.

Definition at line 68 of file Triangulation.cpp.

References CorrectCorrespondences(), BIAS::Vector3< T >::ScalarProduct(), and TriangulateLinear().

Referenced by GetCovarianceProjective(), and BIAS::FMatrixEstimation::GoldStandard().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

int Triangulation::Triangulate ( PMatrix P1,
PMatrix P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
BIAS::Vector3< double > &  point3d 
)
int Triangulation::Triangulate ( PMatrix P1,
PMatrix P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
BIAS::HomgPoint3D point3d 
)

deprecated

Definition at line 607 of file Triangulation.cpp.

References BIAS::HomgPoint3D::Set(), and Triangulate().

int Triangulation::Triangulate ( const ProjectionParametersBase P1,
const ProjectionParametersBase P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
Vector3< double > &  point3d 
)

Triangulation for metric Poses (using C and R)

Parameters
point3d(output) guaranteed to be homogenized, inf causes error
Returns
0 on success
<0 on error
>0 if point is behind a camera woelk 07/2006

Definition at line 540 of file Triangulation.cpp.

References BIAS::ProjectionParametersBase::GetC(), Intersect(), BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and BIAS::ProjectionParametersBase::UnProjectToRay().

int Triangulation::Triangulate ( const ProjectionParametersBase P1,
const ProjectionParametersBase P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
HomgPoint3D point3d 
)

deprecated

Definition at line 525 of file Triangulation.cpp.

References BIAS::HomgPoint3D::Set(), and Triangulate().

int Triangulation::Triangulate ( const Pose P1,
const Pose P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
Vector3< double > &  point3d 
)

Triangulation for metric Poses (using C and R)

Parameters
point3d(output) guaranteed to be homogenized, inf causes error
Returns
0 on success
<0 on error
>0 if point is behind a camera woelk 07/2006

Definition at line 471 of file Triangulation.cpp.

References BIAS::CoordinateTransform3D::GetC(), BIAS::CoordinateTransform3D::GetR(), Intersect(), and BIAS::Vector3< T >::NormL2().

int Triangulation::Triangulate ( const Pose P1,
const Pose P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
HomgPoint3D point3d 
)

deprecated

Definition at line 458 of file Triangulation.cpp.

References BIAS::HomgPoint3D::Set(), and Triangulate().

int Triangulation::Triangulate ( const Vector3< double > &  C1,
const Quaternion< double > &  Q1,
const Vector3< double > &  C2,
const Quaternion< double > &  Q2,
const HomgPoint2D p1,
const HomgPoint2D p2,
Vector3< double > &  point3d 
)

Triangulation for metric Poses (using C and Q)

Author
woelk 09/2007

Definition at line 441 of file Triangulation.cpp.

References Intersect(), BIAS::Quaternion< T >::MultVec(), and BIAS::Vector3< T >::NormL2().

int Triangulation::Triangulate ( const Vector3< double > &  C1,
const Quaternion< double > &  Q1,
const Vector3< double > &  C2,
const Quaternion< double > &  Q2,
const HomgPoint2D p1,
const HomgPoint2D p2,
HomgPoint3D point3d 
)

deprecated

Definition at line 426 of file Triangulation.cpp.

References BIAS::HomgPoint3D::Set(), and Triangulate().

int Triangulation::Triangulate2D ( PMatrix P1,
PMatrix P2,
HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint3D point3d,
double &  dist,
double &  angle 
)

does not use BackprojectPseudoInverse but get NormRayWorldCoo

Also calculates the minimal distance between the two rays (dist) and the cos of the angle between the two rays (angle) (scalarproduct) input: P1, P2, p1, p2 output: point3d, dist

Returns
0 on success -1 if interpolated point lies behind the cameras -2 if lines do not intersect -3 if camera center not extractable from P (faster)
Author
Woelk 11 2002
Examples:
ExampleTriangulate2.cpp, and ExampleTriangulateOptimal.cpp.

Definition at line 622 of file Triangulation.cpp.

References BIAS::PMatrix::GetC(), BIAS::PMatrix::GetNormRayWorldCoo(), BIAS::Vector3< T >::ScalarProduct(), and BIAS::HomgPoint3D::Set().

Referenced by GetCovariance2D(), and Triangulate2D().

int Triangulation::Triangulate2D ( PMatrix P1,
PMatrix P2,
HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint3D point3d,
Matrix3x3< double > &  CovMatrix,
double &  dist,
double &  angle,
const double &  triangdeltapixel = TRIANGULATION_DEFAULT_DELTAPIXEL 
)

as above, but also determines the covariance matrix

Returns
-4 if GetCovariance2D failed
Author
Woelk 11 2002

Definition at line 697 of file Triangulation.cpp.

References GetCovariance2D(), and Triangulate2D().

int Triangulation::TriangulateLinear ( PMatrix P1,
PMatrix P2,
HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint3D point3d 
)

Triangulates a 3d point without decomposition of P matrix, use this method in selfcalibration scenarios.

Homogeneous DLT algorithm using SVD, see Hartley/Zisserman: "Multiple View Geometry", p.297 For projective reconstructions first optimize 2d points using CorrectCorrespondences() regarding epipolar geometry

Attention
NOT YET TESTED AT ALL, since CorrectCorrespondences missing
Author
koeser, 10/2003

Definition at line 87 of file Triangulation.cpp.

References BIAS::Matrix< T >::GetRow(), BIAS::SVD::GetVT(), BIAS::HomgPoint3D::Homogenize(), and BIAS::Matrix< T >::NormalizeRows().

Referenced by GetCovariance(), and Optimal().

int Triangulation::TriangulateLinear ( std::vector< PMatrix pmatrices,
std::vector< HomgPoint2D homgPoints2D,
HomgPoint3D point3d 
)

Triangulates a 3d point without decomposition of P matrix, use this method in selfcalibration scenarios.

Homogeneous DLT algorithm using SVD, see Hartley/Zisserman: "Multiple View Geometry", p.297 For projective reconstructions first optimize 2d points using CorrectCorrespondences() regarding epipolar geometry

Attention
tested with only some examples
Author
cmenk, 10/2006

Definition at line 124 of file Triangulation.cpp.

References BIAS::Matrix< T >::GetRow(), BIAS::SVD::GetVT(), BIAS::HomgPoint3D::Homogenize(), and BIAS::Matrix< T >::NormalizeRows().

int Triangulation::TriangulateProjective ( const ProjectionParametersBase P1,
const ProjectionParametersBase P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
HomgPoint3D point3d 
)

Triangulation for metric Poses (using C and R)

Parameters
point3dresulting 3D point. It may be at infinity.
Author
woelk 06/2008 (c) www.vision-n.de

Definition at line 506 of file Triangulation.cpp.

References BIAS::HomgPoint3D::Set(), Triangulate(), and BIAS::ProjectionParametersBase::UnProjectToRay().

Member Data Documentation

double BIAS::Triangulation::_dTriangDeltaPixels
protected

value to go up/down/left/right for "manual" covariance computation

Definition at line 353 of file Triangulation.hh.

Referenced by _UpdateCovWeights(), GetCovariance2D(), and GetCovarianceAnalytic().

double BIAS::Triangulation::_dTriangSigmaPixels
protected

Definition at line 354 of file Triangulation.hh.

Referenced by _UpdateCovWeights(), and GetCovarianceAnalytic().

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

Matrix3x3<double> BIAS::Triangulation::cov_weights_
protected

neighbourhood weights for covariance computation

Definition at line 351 of file Triangulation.hh.

Referenced by _UpdateCovWeights(), GetCovariance2D(), and GetCovarianceAnalytic().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.


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