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::TriangulationMidPoint Class Reference

Class for triangulation of 3d points from multiple projection rays using the mid-point method. More...

#include <Geometry/TriangulationMidPoint.hh>

+ Inheritance diagram for BIAS::TriangulationMidPoint:
+ Collaboration diagram for BIAS::TriangulationMidPoint:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
int Intersect (const std::vector< BIAS::Vector3< double > > &pos, const std::vector< BIAS::Vector3< double > > &dir, BIAS::Vector3< double > &res)
 Return point X that is closest in average to given rays which have parametric description by point and direction. More...
 
int Intersect (const std::vector< BIAS::Vector3< double > > &pos, const std::vector< BIAS::Vector3< double > > &dir, BIAS::Vector3< double > &res, double &dist)
 Return point X that is closest in average to given rays which have parametric description by point and direction. More...
 
BIAS::Vector3< double > Intersect (const std::vector< BIAS::Vector3< double > > &pos, const std::vector< BIAS::Vector3< double > > &dir)
 Return point X that is closest in average to given rays which have parametric description by point and direction. 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...
 
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 (const std::vector< BIAS::ProjectionParametersBase * > &cams, const std::vector< BIAS::HomgPoint2D > &points2d, BIAS::Vector3< double > &point3d, double &dist)
 Triangulate 3d point X from projection parameters and corresponding 2d image points (in pixels). More...
 
int Triangulate (const std::vector< BIAS::ProjectionParametersBase * > &cams, const std::vector< BIAS::HomgPoint2D > &points2d, BIAS::Vector3< double > &point3d)
 
int Triangulate (const std::vector< BIAS::PoseParametrization > &poses, const std::vector< BIAS::HomgPoint2D > &rays, BIAS::Vector3< double > &point3d, double &dist)
 Triangulate 3d point X from camera poses and corresponding rays in local (!) camera coordinate frames ("normalized"). More...
 
int Triangulate (const std::vector< BIAS::PoseParametrization > &poses, const std::vector< BIAS::HomgPoint2D > &rays, BIAS::Vector3< double > &point3d)
 
 TriangulationMidPoint ()
 
 ~TriangulationMidPoint ()
 

Static Public Member Functions

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

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
int Intersect_ (const std::vector< BIAS::Vector3< double > > &pos, const std::vector< BIAS::Vector3< double > > &dir, BIAS::Vector3< double > &res, double &dist, const bool computeDist)
 
int Triangulate_ (const std::vector< BIAS::ProjectionParametersBase * > &cams, const std::vector< BIAS::HomgPoint2D > &points2d, BIAS::Vector3< double > &point3d, double &dist, const bool computeDist)
 
int Triangulate_ (const std::vector< BIAS::PoseParametrization > &poses, const std::vector< BIAS::HomgPoint2D > &rays, BIAS::Vector3< double > &point3d, double &dist, const bool computeDist)
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 

Static Protected Attributes

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

Detailed Description

Class for triangulation of 3d points from multiple projection rays using the mid-point method.

   Given n projection rays (parametrized by camera center points
   C_1,...,C_n and normalized direction vectors d_1,...,d_n in
   world coordinate system), the corresponding 3d point X is
   computed by the mid-point method as the point with minimal
   mean squared distance to all rays, i.e. minimize sum of
   |C_i + l_i*d_i - X|^2 with respect to parameters X,l_1,...,l_n.

   Note that this method is neither affine nor projective
   invariant and behaves very poorly under such transformations,
   it should be used only with Euclidean transformations.

   See also R. I. Hartley, P. Sturm: Triangulation, in: Computer
   Vision and Image Understanding 68 (2), p.146--157, 1997.
Author
esquivel 09/2010

Definition at line 37 of file TriangulationMidPoint.hh.

Constructor & Destructor Documentation

TriangulationMidPoint::TriangulationMidPoint ( )

Definition at line 10 of file TriangulationMidPoint.cpp.

TriangulationMidPoint::~TriangulationMidPoint ( )

Definition at line 16 of file TriangulationMidPoint.cpp.

Member Function Documentation

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.

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 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 BIAS::TriangulationMidPoint::Intersect ( const std::vector< BIAS::Vector3< double > > &  pos,
const std::vector< BIAS::Vector3< double > > &  dir,
BIAS::Vector3< double > &  res 
)
inline

Return point X that is closest in average to given rays which have parametric description by point and direction.

Attention
Directions MUST BE normalized!
Returns
0 in case of no errror, <0 if errors, n>0 if intersection point lies not in direction of n-th ray.

Definition at line 51 of file TriangulationMidPoint.hh.

int BIAS::TriangulationMidPoint::Intersect ( const std::vector< BIAS::Vector3< double > > &  pos,
const std::vector< BIAS::Vector3< double > > &  dir,
BIAS::Vector3< double > &  res,
double &  dist 
)
inline

Return point X that is closest in average to given rays which have parametric description by point and direction.

Average distance to rays is returned in parameter dist.

Attention
Directions MUST BE normalized!
Returns
0 in case of no errror, <0 if errors, n>0 if intersection point lies not in direction of n-th ray.

Definition at line 66 of file TriangulationMidPoint.hh.

BIAS::Vector3<double> BIAS::TriangulationMidPoint::Intersect ( const std::vector< BIAS::Vector3< double > > &  pos,
const std::vector< BIAS::Vector3< double > > &  dir 
)
inline

Return point X that is closest in average to given rays which have parametric description by point and direction.

Attention
Directions MUST BE normalized!
Returns
0 in case of no errror, <0 if errors, n>0 if intersection point lies not in direction of n-th ray.

Definition at line 79 of file TriangulationMidPoint.hh.

int TriangulationMidPoint::Intersect_ ( const std::vector< BIAS::Vector3< double > > &  pos,
const std::vector< BIAS::Vector3< double > > &  dir,
BIAS::Vector3< double > &  res,
double &  dist,
const bool  computeDist 
)
protected
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
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 BIAS::TriangulationMidPoint::Triangulate ( const std::vector< BIAS::ProjectionParametersBase * > &  cams,
const std::vector< BIAS::HomgPoint2D > &  points2d,
BIAS::Vector3< double > &  point3d,
double &  dist 
)
inline

Triangulate 3d point X from projection parameters and corresponding 2d image points (in pixels).

Attention
2d image points MUST BE homogenized!
Returns
0 on success, <0 on error, n>0 if point is behind n-th camera

Definition at line 96 of file TriangulationMidPoint.hh.

int BIAS::TriangulationMidPoint::Triangulate ( const std::vector< BIAS::ProjectionParametersBase * > &  cams,
const std::vector< BIAS::HomgPoint2D > &  points2d,
BIAS::Vector3< double > &  point3d 
)
inline

Definition at line 103 of file TriangulationMidPoint.hh.

int BIAS::TriangulationMidPoint::Triangulate ( const std::vector< BIAS::PoseParametrization > &  poses,
const std::vector< BIAS::HomgPoint2D > &  rays,
BIAS::Vector3< double > &  point3d,
double &  dist 
)
inline

Triangulate 3d point X from camera poses and corresponding rays in local (!) camera coordinate frames ("normalized").

Attention
Directions of rays MUST BE normalized!
Returns
0 on success, <0 on error, n>0 if point is behind n-th camera

Definition at line 116 of file TriangulationMidPoint.hh.

int BIAS::TriangulationMidPoint::Triangulate ( const std::vector< BIAS::PoseParametrization > &  poses,
const std::vector< BIAS::HomgPoint2D > &  rays,
BIAS::Vector3< double > &  point3d 
)
inline

Definition at line 123 of file TriangulationMidPoint.hh.

int TriangulationMidPoint::Triangulate_ ( const std::vector< BIAS::ProjectionParametersBase * > &  cams,
const std::vector< BIAS::HomgPoint2D > &  points2d,
BIAS::Vector3< double > &  point3d,
double &  dist,
const bool  computeDist 
)
protected
int TriangulationMidPoint::Triangulate_ ( const std::vector< BIAS::PoseParametrization > &  poses,
const std::vector< BIAS::HomgPoint2D > &  rays,
BIAS::Vector3< double > &  point3d,
double &  dist,
const bool  computeDist 
)
protected

Definition at line 124 of file TriangulationMidPoint.cpp.

References BIAS::Equal(), and Intersect_().

Member Data Documentation

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

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: