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

BIAS::Triangulation Class Reference

Class for triangulation of 3Dpoints from 2D matches. More...

#include <Geometry/Triangulation.hh>

Inheritance diagram for BIAS::Triangulation:
Collaboration diagram for BIAS::Triangulation:

List of all members.

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
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
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'.
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'.
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
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.
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.
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.
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel
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()
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
int Triangulate (const ProjectionParametersBase *P1, const ProjectionParametersBase *P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
 deprecated
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
int Triangulate (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, BIAS::HomgPoint3D &point3d)
 deprecated
int Triangulate (const Pose &P1, const Pose &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
 deprecated
int Triangulate (PMatrix &P1, PMatrix &P2, const HomgPoint2D &p1, const HomgPoint2D &p2, BIAS::Vector3< double > &point3d)
 Triangulation for metric PMatrices (using C and Hinf)
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)
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)
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)
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
int Triangulate2D (PMatrix &P1, PMatrix &P2, HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint3D &point3d, double &dist, double &angle)
 does not use BackprojectPseudoInverse but get NormRayWorldCoo
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.
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.
int TriangulateProjective (const ProjectionParametersBase *P1, const ProjectionParametersBase *P2, const HomgPoint2D &p1, const HomgPoint2D &p2, HomgPoint3D &point3d)
 Triangulation for metric Poses (using C and R)
 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
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel

Protected Attributes

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

Static Protected Attributes

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

Detailed Description

Class for triangulation of 3Dpoints from 2D matches.

Test:
tested with TestTriangulation.cpp

Covariance matrix (refering to an uncertainty ellipsoid) is computed also

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) [inline, inherited]
void BIAS::Debug::AddDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 363 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( ) [inline, protected, inherited]

returns the next available debuglevel

Author:
woelk 09/2006

Definition at line 522 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::HomgPoint2D::Set(), BIAS::Vector3< T >::Set(), BIAS::Matrix3x3< T >::SetIdentity(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix3x3< T >::TransposedMult().

Referenced by Optimal().

bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const [inline, inherited]

Definition at line 351 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const [inline, inherited]
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::HomgPoint2D::Set(), BIAS::HomgPoint3D::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 [inline, inherited]
std::ostream& BIAS::Debug::GetDebugStream ( ) const [inline, inherited]

Definition at line 406 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const [inline, inherited]

Definition at line 415 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 432 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().

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

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

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const [inline, inherited]

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

Author:
woelk 09/2006

Definition at line 455 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name) [inline, inherited]
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 [inline, inherited]

Definition at line 384 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 377 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv) [inline, inherited]

Definition at line 370 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 326 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::SetDebugStream ( const std::ostream &  os) [inline, inherited]

Definition at line 399 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev) [inline, static, inherited]

Definition at line 425 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

prints all internally known debuglevels

Author:
woelk 09/2006

Definition at line 497 of file Debug.hh.

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 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< QUAT_TYPE >::MultVec(), and BIAS::Vector3< T >::NormL2().

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 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 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 ( PMatrix P1,
PMatrix P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
BIAS::Vector3< double > &  point3d 
)
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::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::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 ( 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::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::TriangulateProjective ( const ProjectionParametersBase P1,
const ProjectionParametersBase P2,
const HomgPoint2D p1,
const HomgPoint2D p2,
HomgPoint3D point3d 
)

Triangulation for metric Poses (using C and R)

Parameters:
point3d,:resulting 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

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

Definition at line 354 of file Triangulation.hh.

Referenced by _UpdateCovWeights(), and GetCovarianceAnalytic().

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 511 of file Debug.hh.

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

long int BIAS::Debug::_liNextDebugLevel [protected, inherited]

new concept, debuglevel are managed here in the debug class

Definition at line 517 of file Debug.hh.

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

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel [protected, inherited]

Definition at line 518 of file Debug.hh.

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

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 512 of file Debug.hh.

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

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 [static, protected, inherited]

Definition at line 514 of file Debug.hh.


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