10#ifndef SFM_TRIANGULATE_HEADER
11#define SFM_TRIANGULATE_HEADER
31 CameraPose
const& pose1, CameraPose
const& pose2);
39 std::vector<CameraPose const*>
const& poses);
47 CameraPose
const& pose1, CameraPose
const& pose2);
89 bool triangulate (std::vector<CameraPose const*>
const& poses,
90 std::vector<math::Vec2f>
const& positions,
92 std::vector<std::size_t>* outliers =
nullptr)
const;
93 void print_statistics (
Statistics const& stats, std::ostream& out)
const;
97 double const cos_angle_thres;
103Triangulate::Options::Options (
void)
104 : error_threshold(0.01)
114 , num_behind_camera(0)
115 , num_too_small_angle(0)
122 , cos_angle_thres(
std::cos(options.angle_threshold))
Vector class for arbitrary dimensions and types.
Triangulation routine that triangulates a track from camera poses and 2D image positions while keepin...
Triangulate(Options const &options)
math::Vector< double, 3 > triangulate_match(Correspondence2D2D const &match, CameraPose const &pose1, CameraPose const &pose2)
Given an image correspondence in two views and the corresponding poses, this function triangulates th...
math::Vector< double, 3 > triangulate_track(std::vector< math::Vec2f > const &pos, std::vector< CameraPose const * > const &poses)
Given any number of 2D image positions and the corresponding camera poses, this function triangulates...
bool is_consistent_pose(Correspondence2D2D const &match, CameraPose const &pose1, CameraPose const &pose2)
Given a two-view pose configuration and a correspondence, this function returns true if the triangula...
#define SFM_NAMESPACE_END
#define SFM_NAMESPACE_BEGIN
double angle_threshold
Threshold on the triangulation angle (in radians).
double error_threshold
Threshold on reprojection error for outlier detection.
int min_num_views
Minimal number of views with small error (inliers).
int num_behind_camera
Number of tracks that appeared behind the camera.
int num_large_error
Number of tracks with too large reprojection error.
int num_too_small_angle
Number of tracks with too small triangulation angle.
int num_new_tracks
The number of successfully triangulated tracks.