SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
CVRaulMurOrb.h
Go to the documentation of this file.
1 /**
2  * \file CVRaulMurOrb.h
3  * \brief Declares the Raul Mur ORB feature detector and descriptor
4  * \details This File is based on the ORB Implementation of ORB_SLAM
5  * https://github.com/raulmur/ORB_SLAM2
6  * \date Spring 2017
7  * \remarks Please use clangformat to format the code. See more code style on
8  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
9  * \authors Pascal Zingg, Timon Tschanz, Michael Goettlicher, Marcus Hudritsch
10  * \copyright http://opensource.org/licenses/GPL-3.0
11 */
12 
13 #ifndef CVRAULMURORB_H
14 #define CVRAULMURORB_H
15 
16 #include <CVTypedefs.h>
17 
18 //-----------------------------------------------------------------------------
19 //! Orb detector and descriptor with distribution
20 class CVRaulMurOrb : public CVFeature2D
21 {
22 public:
23  enum
24  {
26  FAST_SCORE = 1
27  };
28 
30  float scaleFactor,
31  int nlevels,
32  int iniThFAST,
33  int minThFAST);
34 
35  // Compute the ORB features and descriptors on an image.
36  // ORB are dispersed on the image using an octree.
37  // Mask is ignored in the current implementation.
38  void detectAndCompute(CVInputArray image,
39  CVInputArray mask,
40  CVVKeyPoint& keypoints,
41  CVOutputArray descriptors,
42  bool useProvidedKeypoints);
43 
44  uint GetLevels() { return nlevels; }
45  float GetScaleFactor() { return (float)scaleFactor; }
46  vector<float> GetScaleFactors() { return mvScaleFactor; }
47  vector<float> GetInverseScaleFactors() { return mvInvScaleFactor; }
48  vector<float> GetScaleSigmaSquares() { return mvLevelSigma2; }
49  vector<float> GetInverseScaleSigmaSquares() { return mvInvLevelSigma2; }
50 
52 
53 protected:
54  void ComputePyramid(CVMat image);
55  void ComputeKeyPointsOctTree(CVVVKeyPoint& allKeypoints);
56  CVVKeyPoint DistributeOctTree(const CVVKeyPoint& vToDistributeKeys,
57  const int& minX,
58  const int& maxX,
59  const int& minY,
60  const int& maxY,
61  const int& nFeatures,
62  const int& level);
64  int nfeatures;
65  double scaleFactor;
66  uint nlevels;
67  int iniThFAST;
68  int minThFAST;
69  vector<int> mnFeaturesPerLevel;
70  vector<int> umax;
71  vector<float> mvScaleFactor;
72  vector<float> mvInvScaleFactor;
73  vector<float> mvLevelSigma2;
74  vector<float> mvInvLevelSigma2;
75 };
76 //----------------------------------------------------------------------------
77 #endif // CVRAULMURORB_H
const int nFeatures
vector< vector< cv::KeyPoint > > CVVVKeyPoint
Definition: CVTypedefs.h:102
cv::InputArray CVInputArray
Definition: CVTypedefs.h:63
cv::OutputArray CVOutputArray
Definition: CVTypedefs.h:64
cv::Mat CVMat
Definition: CVTypedefs.h:38
vector< cv::Mat > CVVMat
Definition: CVTypedefs.h:73
vector< cv::Point > CVVPoint
Definition: CVTypedefs.h:75
vector< cv::KeyPoint > CVVKeyPoint
Definition: CVTypedefs.h:88
cv::Feature2D CVFeature2D
Definition: CVTypedefs.h:65
Orb detector and descriptor with distribution.
Definition: CVRaulMurOrb.h:21
CVVKeyPoint DistributeOctTree(const CVVKeyPoint &vToDistributeKeys, const int &minX, const int &maxX, const int &minY, const int &maxY, const int &nFeatures, const int &level)
Create The tree and distribute it.
vector< int > umax
Definition: CVRaulMurOrb.h:70
vector< float > mvInvLevelSigma2
Definition: CVRaulMurOrb.h:74
uint GetLevels()
Definition: CVRaulMurOrb.h:44
vector< float > mvInvScaleFactor
Definition: CVRaulMurOrb.h:72
vector< float > GetInverseScaleFactors()
Definition: CVRaulMurOrb.h:47
vector< float > GetScaleSigmaSquares()
Definition: CVRaulMurOrb.h:48
CVVPoint pattern
Definition: CVRaulMurOrb.h:63
vector< int > mnFeaturesPerLevel
Definition: CVRaulMurOrb.h:69
vector< float > GetInverseScaleSigmaSquares()
Definition: CVRaulMurOrb.h:49
double scaleFactor
Definition: CVRaulMurOrb.h:65
CVRaulMurOrb(int nfeatures, float scaleFactor, int nlevels, int iniThFAST, int minThFAST)
void detectAndCompute(CVInputArray image, CVInputArray mask, CVVKeyPoint &keypoints, CVOutputArray descriptors, bool useProvidedKeypoints)
vector< float > mvLevelSigma2
Definition: CVRaulMurOrb.h:73
vector< float > mvScaleFactor
Definition: CVRaulMurOrb.h:71
float GetScaleFactor()
Definition: CVRaulMurOrb.h:45
vector< float > GetScaleFactors()
Definition: CVRaulMurOrb.h:46
CVVMat mvImagePyramid
Definition: CVRaulMurOrb.h:51
void ComputePyramid(CVMat image)
void ComputeKeyPointsOctTree(CVVVKeyPoint &allKeypoints)
Get the Keypoints and distribute them.