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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:14