PyDetector.h
Go to the documentation of this file.
1 
7 #ifndef PYMATCHER_H
8 #define PYMATCHER_H
9 
11 #include <opencv2/core/types.hpp>
12 #include <opencv2/core/mat.hpp>
13 #include <vector>
14 
16 #include <Python.h>
17 
18 namespace rtabmap
19 {
20 
21 class PyDetector : public Feature2D, public PythonInterface
22 {
23 public:
24  PyDetector(const ParametersMap & parameters = ParametersMap());
25  virtual ~PyDetector();
26 
27  virtual void parseParameters(const ParametersMap & parameters);
28  virtual Feature2D::Type getType() const {return kFeaturePyDetector;}
29 
30 private:
31  virtual std::vector<cv::KeyPoint> generateKeypointsImpl(const cv::Mat & image, const cv::Rect & roi, const cv::Mat & mask = cv::Mat());
32  virtual cv::Mat generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const;
33 
34 private:
35  PyObject * pModule_;
36  PyObject * pFunc_;
37  std::string path_;
38  bool cuda_;
39  cv::Mat descriptors_;
40 };
41 
42 }
43 
44 #endif
GLM_FUNC_DECL genIType mask(genIType const &count)
PyDetector(const ParametersMap &parameters=ParametersMap())
Definition: PyDetector.cpp:19
PyObject * pFunc_
Definition: PyDetector.h:36
std::map< std::string, std::string > ParametersMap
Definition: Parameters.h:43
virtual ~PyDetector()
Definition: PyDetector.cpp:63
virtual Feature2D::Type getType() const
Definition: PyDetector.h:28
std::string path_
Definition: PyDetector.h:37
virtual std::vector< cv::KeyPoint > generateKeypointsImpl(const cv::Mat &image, const cv::Rect &roi, const cv::Mat &mask=cv::Mat())
Definition: PyDetector.cpp:89
cv::Mat descriptors_
Definition: PyDetector.h:39
PyObject * pModule_
Definition: PyDetector.h:35
virtual void parseParameters(const ParametersMap &parameters)
Definition: PyDetector.cpp:79
virtual cv::Mat generateDescriptorsImpl(const cv::Mat &image, std::vector< cv::KeyPoint > &keypoints) const
Definition: PyDetector.cpp:228


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