ORBextractor.h
Go to the documentation of this file.
1 
29 #ifndef RTABMAP_ORBEXTRACTOR_H
30 #define RTABMAP_ORBEXTRACTOR_H
31 
32 #include <vector>
33 #include <list>
34 #include <opencv2/core/core_c.h>
35 
36 
37 namespace rtabmap
38 {
39 
41 {
42 public:
44 
46 
47  std::vector<cv::KeyPoint> vKeys;
48  cv::Point2i UL, UR, BL, BR;
49  std::list<ExtractorNode>::iterator lit;
50  bool bNoMore;
51 };
52 
54 {
55 public:
56 
57  enum {HARRIS_SCORE=0, FAST_SCORE=1 };
58 
59  ORBextractor(int nfeatures, float scaleFactor, int nlevels,
60  int iniThFAST, int minThFAST, int patchSize, int edgeThreshold);
61 
63 
64  // Compute the ORB features and descriptors on an image.
65  // ORB are dispersed on the image using an octree.
66  // Mask is ignored in the current implementation.
67  void operator()( cv::InputArray image, cv::InputArray mask,
68  std::vector<cv::KeyPoint>& keypoints,
69  cv::OutputArray descriptors);
70 
71  int inline GetLevels(){
72  return nlevels;}
73 
74  float inline GetScaleFactor(){
75  return scaleFactor;}
76 
77  std::vector<float> inline GetScaleFactors(){
78  return mvScaleFactor;
79  }
80 
81  std::vector<float> inline GetInverseScaleFactors(){
82  return mvInvScaleFactor;
83  }
84 
85  std::vector<float> inline GetScaleSigmaSquares(){
86  return mvLevelSigma2;
87  }
88 
89  std::vector<float> inline GetInverseScaleSigmaSquares(){
90  return mvInvLevelSigma2;
91  }
92 
93  std::vector<cv::Mat> mvImagePyramid;
94 
95 protected:
96 
97  void ComputePyramid(cv::Mat image);
98  void ComputeKeyPointsOctTree(std::vector<std::vector<cv::KeyPoint> >& allKeypoints);
99  std::vector<cv::KeyPoint> DistributeOctTree(const std::vector<cv::KeyPoint>& vToDistributeKeys, const int &minX,
100  const int &maxX, const int &minY, const int &maxY, const int &nFeatures, const int &level);
101 
102  void ComputeKeyPointsOld(std::vector<std::vector<cv::KeyPoint> >& allKeypoints);
103  std::vector<cv::Point> pattern;
104 
106  double scaleFactor;
107  int nlevels;
113 
114 
115  std::vector<int> mnFeaturesPerLevel;
116 
117  std::vector<int> umax;
118 
119  std::vector<float> mvScaleFactor;
120  std::vector<float> mvInvScaleFactor;
121  std::vector<float> mvLevelSigma2;
122  std::vector<float> mvInvLevelSigma2;
123 };
124 
125 } //namespace rtabmap
126 
127 #endif
128 
GLM_FUNC_DECL genIType mask(genIType const &count)
std::vector< float > mvInvScaleFactor
Definition: ORBextractor.h:120
std::vector< float > mvInvLevelSigma2
Definition: ORBextractor.h:122
std::vector< float > GetScaleFactors()
Definition: ORBextractor.h:77
std::vector< float > mvScaleFactor
Definition: ORBextractor.h:119
std::vector< cv::Point > pattern
Definition: ORBextractor.h:103
void DivideNode(ExtractorNode &n1, ExtractorNode &n2, ExtractorNode &n3, ExtractorNode &n4)
std::vector< float > GetInverseScaleFactors()
Definition: ORBextractor.h:81
std::vector< float > GetScaleSigmaSquares()
Definition: ORBextractor.h:85
std::vector< cv::Mat > mvImagePyramid
Definition: ORBextractor.h:93
std::vector< int > umax
Definition: ORBextractor.h:117
std::list< ExtractorNode >::iterator lit
Definition: ORBextractor.h:49
#define false
Definition: ConvertUTF.c:56
std::vector< float > GetInverseScaleSigmaSquares()
Definition: ORBextractor.h:89
std::vector< int > mnFeaturesPerLevel
Definition: ORBextractor.h:115
std::vector< cv::KeyPoint > vKeys
Definition: ORBextractor.h:47
std::vector< float > mvLevelSigma2
Definition: ORBextractor.h:121


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:37:29