1 #ifndef __fovis_motion_estimation_hpp__
2 #define __fovis_motion_estimation_hpp__
7 #include <Eigen/Geometry>
9 #include "keypoint.hpp"
11 #include "camera_intrinsics.hpp"
12 #include "feature_match.hpp"
13 #include "feature_matcher.hpp"
14 #include "rectification.hpp"
20 enum MotionEstimateStatusCode
29 extern const char* MotionEstimateStatusCodeStrings[];
46 const Eigen::Isometry3d &init_motion_est,
47 const Eigen::MatrixXd &init_motion_cov);
49 bool isMotionEstimateValid()
const {
50 return _estimate_status == SUCCESS;
53 MotionEstimateStatusCode getMotionEstimateStatus()
const {
54 return _estimate_status;
57 const Eigen::Isometry3d& getMotionEstimate()
const {
58 return *_motion_estimate;
61 const Eigen::MatrixXd& getMotionEstimateCov()
const {
62 return *_motion_estimate_covariance;
69 int getNumMatches()
const {
73 int getNumInliers()
const {
77 int getNumReprojectionFailures()
const {
78 return _num_reprojection_failures;
81 double getMeanInlierReprojectionError()
const {
82 return _mean_reprojection_error;
85 void sanityCheck()
const;
89 void computeMaximallyConsistentClique();
90 void estimateRigidBodyTransform();
91 void refineMotionEstimate();
92 void computeReprojectionError();
102 int _matches_capacity;
114 double _mean_reprojection_error;
117 int _num_reprojection_failures;
127 Eigen::Isometry3d* _motion_estimate;
129 Eigen::MatrixXd* _motion_estimate_covariance;
133 double _max_mean_reprojection_error;
137 double _inlier_max_reprojection_error;
141 double _clique_inlier_threshold;
145 int _min_features_for_valid_motion_estimate;
151 double _max_feature_motion;
154 int _use_subpixel_refinement;
159 bool _update_target_features_with_refined;
161 MotionEstimateStatusCode _estimate_status;
Matches features between a reference and a target image.
Definition: feature_matcher.hpp:12
One level of a Gaussian image pyramid.
Definition: pyramid_level.hpp:21
Stores data specific to an input frame.
Definition: frame.hpp:33
Provides depth estimates for input image pixels.
Definition: depth_source.hpp:29
Represents a single image feature matched between two camera images taken at different times...
Definition: feature_match.hpp:41
Does the heavy lifting for frame-to-frame motion estimation.
Definition: motion_estimation.hpp:37
std::map< std::string, std::string > VisualOdometryOptions
Options.
Definition: options.hpp:106
Maps image coordinates from an input image to image coordinates on a rectified camera.
Definition: rectification.hpp:41
quick and dirty profiling tool.inspired by the matlab tic/toc command
Definition: camera_intrinsics.hpp:6