PyMatcher.h
Go to the documentation of this file.
1 
7 #ifndef PYMATCHER_H
8 #define PYMATCHER_H
9 
10 #include <opencv2/core/types.hpp>
11 #include <opencv2/core/mat.hpp>
12 #include <vector>
13 
14 #include <Python.h>
15 
16 namespace rtabmap
17 {
18 
19 class PyMatcher
20 {
21 public:
22  PyMatcher(const std::string & pythonMatcherPath,
23  float matchThreshold = 0.2f,
24  int iterations = 20,
25  bool cuda = true,
26  const std::string & model = "indoor");
27  virtual ~PyMatcher();
28 
29  const std::string & path() const {return path_;}
30  float matchThreshold() const {return matchThreshold_;}
31  int iterations() const {return iterations_;}
32  bool cuda() const {return cuda_;}
33  const std::string & model() const {return model_;}
34 
35  std::vector<cv::DMatch> match(
36  const cv::Mat & descriptorsQuery,
37  const cv::Mat & descriptorsTrain,
38  const std::vector<cv::KeyPoint> & keypointsQuery,
39  const std::vector<cv::KeyPoint> & keypointsTrain,
40  const cv::Size & imageSize);
41 
42 private:
43  PyObject * pModule_;
44  PyObject * pFunc_;
45  std::string path_;
48  bool cuda_;
49  std::string model_;
50 };
51 
52 }
53 
54 #endif
const std::string & path() const
Definition: PyMatcher.h:29
f
int iterations() const
Definition: PyMatcher.h:31
bool cuda() const
Definition: PyMatcher.h:32
std::string model_
Definition: PyMatcher.h:49
PyObject * pModule_
Definition: PyMatcher.h:43
PyMatcher(const std::string &pythonMatcherPath, float matchThreshold=0.2f, int iterations=20, bool cuda=true, const std::string &model="indoor")
Definition: PyMatcher.cpp:65
float matchThreshold_
Definition: PyMatcher.h:46
virtual ~PyMatcher()
Definition: PyMatcher.cpp:114
const std::string & model() const
Definition: PyMatcher.h:33
float matchThreshold() const
Definition: PyMatcher.h:30
PyObject * pFunc_
Definition: PyMatcher.h:44
std::string path_
Definition: PyMatcher.h:45
std::vector< cv::DMatch > match(const cv::Mat &descriptorsQuery, const cv::Mat &descriptorsTrain, const std::vector< cv::KeyPoint > &keypointsQuery, const std::vector< cv::KeyPoint > &keypointsTrain, const cv::Size &imageSize)
Definition: PyMatcher.cpp:126


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:34:59