1 #ifndef __fovis_visual_odometry_hpp__
2 #define __fovis_visual_odometry_hpp__
6 #include <Eigen/Geometry>
8 #include "keypoint.hpp"
9 #include "camera_intrinsics.hpp"
11 #include "depth_source.hpp"
12 #include "motion_estimation.hpp"
22 class VisualOdometryPriv
25 friend class VisualOdometry;
26 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
29 Eigen::Isometry3d pose;
32 Eigen::Isometry3d ref_to_prev_frame;
35 Eigen::Isometry3d motion_estimate;
37 Eigen::MatrixXd motion_estimate_covariance;
39 Eigen::Matrix3d initial_homography_est;
40 Eigen::Isometry3d initial_motion_estimate;
41 Eigen::MatrixXd initial_motion_cov;
129 return _change_reference_frames;
137 return _estimator->getMotionEstimateStatus();
145 return _p->motion_estimate;
153 return _p->motion_estimate_covariance;
167 return _fast_threshold;
174 return _p->initial_homography_est;
199 Eigen::Quaterniond estimateInitialRotation(
const OdometryFrame* prev,
201 const Eigen::Isometry3d
202 &init_motion_estimate =
203 Eigen::Isometry3d::Identity());
213 VisualOdometryPriv* _p;
215 bool _change_reference_frames;
221 int _feature_window_size;
223 int _num_pyramid_levels;
229 int _fast_threshold_min;
230 int _fast_threshold_max;
231 int _target_pixels_per_feature;
232 float _fast_threshold_adaptive_gain;
234 bool _use_adaptive_threshold;
235 bool _use_homography_initialization;
239 int _ref_frame_change_threshold;
242 int _initial_rotation_pyramid_level;
const VisualOdometryOptions & getOptions() const
Definition: visual_odometry.hpp:180
void processFrame(const uint8_t *gray, DepthSource *depth_source)
MotionEstimateStatusCode getMotionEstimateStatus() const
Definition: visual_odometry.hpp:136
Stores data specific to an input frame.
Definition: frame.hpp:33
const Eigen::Isometry3d & getPose()
Definition: visual_odometry.hpp:104
Provides depth estimates for input image pixels.
Definition: depth_source.hpp:29
VisualOdometry(const Rectification *rectification, const VisualOdometryOptions &options)
const MotionEstimator * getMotionEstimator() const
Definition: visual_odometry.hpp:159
static VisualOdometryOptions getDefaultOptions()
const OdometryFrame * getReferenceFrame() const
Definition: visual_odometry.hpp:113
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
const Eigen::MatrixXd & getMotionEstimateCov() const
Definition: visual_odometry.hpp:152
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
const Eigen::Isometry3d & getMotionEstimate() const
Definition: visual_odometry.hpp:144
const Eigen::Matrix3d & getInitialHomography() const
Definition: visual_odometry.hpp:173
bool getChangeReferenceFrames() const
Definition: visual_odometry.hpp:128
int getFastThreshold() const
Definition: visual_odometry.hpp:166
const OdometryFrame * getTargetFrame() const
Definition: visual_odometry.hpp:120
Main visual odometry class.
Definition: visual_odometry.hpp:67