ORBextractor.h
Go to the documentation of this file.
1 
21 #ifndef ORBEXTRACTOR_H
22 #define ORBEXTRACTOR_H
23 
24 #include <vector>
25 #include <list>
26 #include <opencv/cv.h>
27 
28 
29 namespace ORB_SLAM2
30 {
31 
33 {
34 public:
36 
38 
39  std::vector<cv::KeyPoint> vKeys;
40  cv::Point2i UL, UR, BL, BR;
41  std::list<ExtractorNode>::iterator lit;
42  bool bNoMore;
43 };
44 
46 {
47 public:
48 
49  enum {HARRIS_SCORE=0, FAST_SCORE=1 };
50 
51  ORBextractor(int nfeatures, float scaleFactor, int nlevels,
52  int iniThFAST, int minThFAST);
53 
55 
56  // Compute the ORB features and descriptors on an image.
57  // ORB are dispersed on the image using an octree.
58  // Mask is ignored in the current implementation.
59  void operator()( cv::InputArray image, cv::InputArray mask,
60  std::vector<cv::KeyPoint>& keypoints,
61  cv::OutputArray descriptors);
62 
63  int inline GetLevels(){
64  return nlevels;}
65 
66  float inline GetScaleFactor(){
67  return scaleFactor;}
68 
69  std::vector<float> inline GetScaleFactors(){
70  return mvScaleFactor;
71  }
72 
73  std::vector<float> inline GetInverseScaleFactors(){
74  return mvInvScaleFactor;
75  }
76 
77  std::vector<float> inline GetScaleSigmaSquares(){
78  return mvLevelSigma2;
79  }
80 
81  std::vector<float> inline GetInverseScaleSigmaSquares(){
82  return mvInvLevelSigma2;
83  }
84 
85  std::vector<cv::Mat> mvImagePyramid;
86 
87 protected:
88 
89  void ComputePyramid(cv::Mat image);
90  void ComputeKeyPointsOctTree(std::vector<std::vector<cv::KeyPoint> >& allKeypoints);
91  std::vector<cv::KeyPoint> DistributeOctTree(const std::vector<cv::KeyPoint>& vToDistributeKeys, const int &minX,
92  const int &maxX, const int &minY, const int &maxY, const int &nFeatures, const int &level);
93 
94  void ComputeKeyPointsOld(std::vector<std::vector<cv::KeyPoint> >& allKeypoints);
95  std::vector<cv::Point> pattern;
96 
97  int nfeatures;
98  double scaleFactor;
99  int nlevels;
102 
103  std::vector<int> mnFeaturesPerLevel;
104 
105  std::vector<int> umax;
106 
107  std::vector<float> mvScaleFactor;
108  std::vector<float> mvInvScaleFactor;
109  std::vector<float> mvLevelSigma2;
110  std::vector<float> mvInvLevelSigma2;
111 };
112 
113 } //namespace ORB_SLAM
114 
115 #endif
116 
std::vector< float > mvScaleFactor
Definition: ORBextractor.h:107
std::vector< float > mvInvLevelSigma2
Definition: ORBextractor.h:110
std::vector< float > mvInvScaleFactor
Definition: ORBextractor.h:108
std::vector< float > GetScaleSigmaSquares()
Definition: ORBextractor.h:77
std::vector< cv::Mat > mvImagePyramid
Definition: ORBextractor.h:85
std::vector< float > mvLevelSigma2
Definition: ORBextractor.h:109
std::vector< int > umax
Definition: ORBextractor.h:105
std::vector< float > GetScaleFactors()
Definition: ORBextractor.h:69
std::vector< cv::KeyPoint > vKeys
Definition: ORBextractor.h:39
std::vector< int > mnFeaturesPerLevel
Definition: ORBextractor.h:103
std::vector< float > GetInverseScaleFactors()
Definition: ORBextractor.h:73
void DivideNode(ExtractorNode &n1, ExtractorNode &n2, ExtractorNode &n3, ExtractorNode &n4)
std::vector< cv::Point > pattern
Definition: ORBextractor.h:95
std::list< ExtractorNode >::iterator lit
Definition: ORBextractor.h:41
std::vector< float > GetInverseScaleSigmaSquares()
Definition: ORBextractor.h:81


orb_slam2_with_maps_odom
Author(s): teng zhang
autogenerated on Fri Sep 25 2020 03:24:47