text: #ifndef VISUAL_ODOM_H
  #define VISUAL_ODOM_H
  
  #include "opencv2/video/tracking.hpp"
  #include "opencv2/imgproc/imgproc.hpp"
  #include "opencv2/highgui/highgui.hpp"
  #include "opencv2/features2d/features2d.hpp"
  #include "opencv2/calib3d/calib3d.hpp"
  
  #include <iostream>
  #include <ctype.h>
  #include <algorithm>
  #include <iterator>
  #include <vector>
  #include <ctime>
  #include <sstream>
  #include <fstream>
  #include <string>
  #include <Eigen/Dense>
  #include <unsupported/Eigen/NonLinearOptimization>
  #include <unsupported/Eigen/NumericalDiff>
  #include <opencv2/core/eigen.hpp>
  
  #include "feature.h"
  #include "bucket.h"
  #include "utils.h"
  #include "Frame.h"
  #include "MapPoint.h"
  
  void visualOdometry(int current_frame_id, std::string filepath,
                      cv::Mat& projMatrl, cv::Mat& projMatrr,
                      cv::Mat& rotation, cv::Mat& translation_mono, cv::Mat& translation_stereo, 
                      cv::Mat& image_left_t0,
                      cv::Mat& image_right_t0,
                      FeatureSet& current_features,
                      cv::Mat& points4D);
  
  void visualOdometryIMU(int current_frame_id, std::string filepath,
                      cv::Mat& projMatrl, cv::Mat& projMatrr,
                      cv::Mat& rotation, cv::Mat& translation_mono, cv::Mat& translation_stereo, 
                      cv::Mat& image_left_t0,
                      cv::Mat& image_right_t0,
                      FeatureSet& current_features,
                      std::vector<std::vector<double>> time_gyros);
  
  
  void matchingFeatures(cv::Mat& imageLeft_t0, cv::Mat& imageRight_t0,
                        cv::Mat& imageLeft_t1, cv::Mat& imageRight_t1, 
                        FeatureSet& currentVOFeatures,
                        std::vector<MapPoint> MapPoints,
                        std::vector<cv::Point2f>&  pointsLeft_t0, 
                        std::vector<cv::Point2f>&  pointsRight_t0, 
                        std::vector<cv::Point2f>&  pointsLeft_t1, 
                        std::vector<cv::Point2f>&  pointsRight_t1);
  
  void removeExistPoints(std::vector<cv::Point2f>&  newPoints, 
                         std::vector<bool>& valid,
                         std::vector<cv::Point2f>&  currentPointsLeft, 
                         std::vector<cv::Point2f>&  oldPointsLeft);
  
  void distinguishNewPoints(std::vector<cv::Point2f>&  newPoints, 
                            std::vector<bool>& valid,
                            std::vector<MapPoint>& mapPoints,
                            int frameId_t0,
                            cv::Mat& points3DFrame_t0,
                            cv::Mat& points3DFrame_t1,
                            cv::Mat& points3DWorld,
                            std::vector<cv::Point2f>&  currentPointsLeft_t0, 
                            std::vector<cv::Point2f>&  currentPointsLeft_t1, 
                            std::vector<FeaturePoint>&  currentFeaturePointsLeft,
                            std::vector<FeaturePoint>&  oldFeaturePointsLeft);
  
  
  void trackingFrame2Frame(cv::Mat& projMatrl, cv::Mat& projMatrr,
                           std::vector<cv::Point2f>&  pointsLeft_t0,
                           std::vector<cv::Point2f>&  pointsLeft_t1, 
                           cv::Mat& points3D_t0,
                           cv::Mat& rotation,
                           cv::Mat& translation);
  
  void displayTracking(cv::Mat& imageLeft_t1, 
                       std::vector<cv::Point2f>&  pointsLeft_t0,
                       std::vector<cv::Point2f>&  pointsLeft_t1);
  
  #endif
  