corelib
src
python
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 "
rtabmap/core/PythonInterface.h
"
13
#include <vector>
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.2
f
,
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_
;
46
float
matchThreshold_
;
47
int
iterations_
;
48
bool
cuda_
;
49
std::string
model_
;
50
};
51
52
}
53
54
#endif
rtabmap::PyMatcher::path
const std::string & path() const
Definition:
PyMatcher.h:29
rtabmap::PyMatcher::~PyMatcher
virtual ~PyMatcher()
Definition:
PyMatcher.cpp:68
rtabmap::PyMatcher::iterations
int iterations() const
Definition:
PyMatcher.h:31
rtabmap::PyMatcher::cuda
bool cuda() const
Definition:
PyMatcher.h:32
rtabmap::PyMatcher::pModule_
PyObject * pModule_
Definition:
PyMatcher.h:43
PythonInterface.h
rtabmap::PyMatcher::pFunc_
PyObject * pFunc_
Definition:
PyMatcher.h:44
rtabmap::PyMatcher::cuda_
bool cuda_
Definition:
PyMatcher.h:48
rtabmap::PyMatcher::PyMatcher
PyMatcher(const std::string &pythonMatcherPath, float matchThreshold=0.2f, int iterations=20, bool cuda=true, const std::string &model="indoor")
Definition:
PyMatcher.cpp:21
f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
rtabmap::PyMatcher::path_
std::string path_
Definition:
PyMatcher.h:45
rtabmap::PyMatcher::matchThreshold
float matchThreshold() const
Definition:
PyMatcher.h:30
rtabmap::PyMatcher::match
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:81
rtabmap::PyMatcher::model
const std::string & model() const
Definition:
PyMatcher.h:33
rtabmap::PyMatcher::iterations_
int iterations_
Definition:
PyMatcher.h:47
rtabmap
Definition:
CameraARCore.cpp:35
rtabmap::PyMatcher
Definition:
PyMatcher.h:19
rtabmap::PyMatcher::model_
std::string model_
Definition:
PyMatcher.h:49
rtabmap::PyMatcher::matchThreshold_
float matchThreshold_
Definition:
PyMatcher.h:46
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:15