1 #ifndef __TriangulationMidPoint_hh__
2 #define __TriangulationMidPoint_hh__
5 #include <Base/Debug/Debug.hh>
6 #include <Base/Geometry/HomgPoint2D.hh>
7 #include <Base/Geometry/PoseParametrization.hh>
8 #include <Base/Math/Vector3.hh>
9 #include <Geometry/ProjectionParametersBase.hh>
56 return Intersect_(pos, dir, res, dist,
false);
70 return Intersect_(pos, dir, res, dist,
true);
85 if (Intersect_(pos, dir, res, dist,
false) >= 0)
96 inline int Triangulate(
const std::vector< BIAS::ProjectionParametersBase* >& cams,
97 const std::vector< BIAS::HomgPoint2D >& points2d,
100 return Triangulate_(cams, points2d, point3d, dist,
true);
103 inline int Triangulate(
const std::vector< BIAS::ProjectionParametersBase* >& cams,
104 const std::vector< BIAS::HomgPoint2D >& points2d,
108 return Triangulate_(cams, points2d, point3d, dist,
false);
116 inline int Triangulate(
const std::vector< BIAS::PoseParametrization >& poses,
117 const std::vector< BIAS::HomgPoint2D >& rays,
120 return Triangulate_(poses, rays, point3d, dist,
true);
123 inline int Triangulate(
const std::vector< BIAS::PoseParametrization >& poses,
124 const std::vector< BIAS::HomgPoint2D >& rays,
128 return Triangulate_(poses, rays, point3d, dist,
false);
136 const bool computeDist);
138 int Triangulate_(
const std::vector< BIAS::ProjectionParametersBase* >& cams,
139 const std::vector< BIAS::HomgPoint2D >& points2d,
141 const bool computeDist);
143 int Triangulate_(
const std::vector< BIAS::PoseParametrization >& poses,
144 const std::vector< BIAS::HomgPoint2D >& rays,
146 const bool computeDist);
152 #endif // __TriangulationMidPoint_hh__
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...
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 an...
int Triangulate(const std::vector< BIAS::ProjectionParametersBase * > &cams, const std::vector< BIAS::HomgPoint2D > &points2d, BIAS::Vector3< double > &point3d)
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)...
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 an...
int Triangulate(const std::vector< BIAS::PoseParametrization > &poses, const std::vector< BIAS::HomgPoint2D > &rays, BIAS::Vector3< double > &point3d)
Class for triangulation of 3d points from multiple projection rays using the mid-point method...
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 an...