43 #ifndef OPENCV_MINIFLANN_HPP
44 #define OPENCV_MINIFLANN_HPP
48 #include "opencv2/core.hpp"
49 #include "opencv2/flann/defines.h"
58 FLANN_INDEX_TYPE_8U =
CV_8U,
59 FLANN_INDEX_TYPE_8S =
CV_8S,
60 FLANN_INDEX_TYPE_16U =
CV_16U,
61 FLANN_INDEX_TYPE_16S =
CV_16S,
62 FLANN_INDEX_TYPE_32S =
CV_32S,
63 FLANN_INDEX_TYPE_32F =
CV_32F,
64 FLANN_INDEX_TYPE_64F =
CV_64F,
65 FLANN_INDEX_TYPE_STRING,
66 FLANN_INDEX_TYPE_BOOL,
67 FLANN_INDEX_TYPE_ALGORITHM,
68 LAST_VALUE_FLANN_INDEX_TYPE = FLANN_INDEX_TYPE_ALGORITHM
77 int getInt(
const String& key,
int defaultVal=-1)
const;
78 double getDouble(
const String& key,
double defaultVal=-1)
const;
85 void setAlgorithm(
int value);
96 IndexParams(
const IndexParams &);
97 IndexParams& operator=(
const IndexParams &);
100 struct CV_EXPORTS KDTreeIndexParams :
public IndexParams
102 KDTreeIndexParams(
int trees=4);
105 struct CV_EXPORTS LinearIndexParams :
public IndexParams
110 struct CV_EXPORTS CompositeIndexParams :
public IndexParams
112 CompositeIndexParams(
int trees = 4,
int branching = 32,
int iterations = 11,
113 cvflann::flann_centers_init_t centers_init = cvflann::FLANN_CENTERS_RANDOM,
float cb_index = 0.2f );
116 struct CV_EXPORTS AutotunedIndexParams :
public IndexParams
118 AutotunedIndexParams(
float target_precision = 0.8f,
float build_weight = 0.01f,
119 float memory_weight = 0,
float sample_fraction = 0.1f);
122 struct CV_EXPORTS HierarchicalClusteringIndexParams :
public IndexParams
124 HierarchicalClusteringIndexParams(
int branching = 32,
125 cvflann::flann_centers_init_t centers_init = cvflann::FLANN_CENTERS_RANDOM,
int trees = 4,
int leaf_size = 100 );
128 struct CV_EXPORTS KMeansIndexParams :
public IndexParams
130 KMeansIndexParams(
int branching = 32,
int iterations = 11,
131 cvflann::flann_centers_init_t centers_init = cvflann::FLANN_CENTERS_RANDOM,
float cb_index = 0.2f );
134 struct CV_EXPORTS LshIndexParams :
public IndexParams
136 LshIndexParams(
int table_number,
int key_size,
int multi_probe_level);
139 struct CV_EXPORTS SavedIndexParams :
public IndexParams
144 struct CV_EXPORTS SearchParams :
public IndexParams
146 SearchParams(
int checks,
float eps,
bool sorted,
bool explore_all_trees );
147 SearchParams(
int checks = 32,
float eps = 0,
bool sorted =
true );
154 CV_WRAP Index(
InputArray features,
const IndexParams& params, cvflann::flann_distance_t
distType=cvflann::FLANN_DIST_L2);
157 CV_WRAP virtual void build(
InputArray features,
const IndexParams& params, cvflann::flann_distance_t
distType=cvflann::FLANN_DIST_L2);
159 OutputArray dists,
int knn,
const SearchParams& params=SearchParams());
163 const SearchParams& params=SearchParams());
167 CV_WRAP virtual void release();
168 CV_WRAP cvflann::flann_distance_t getDistance()
const;
169 CV_WRAP cvflann::flann_algorithm_t getAlgorithm()
const;
175 cvflann::flann_algorithm_t algo;
std::string String
Definition: cvstd.hpp:151
const _OutputArray & OutputArray
Definition: mat.hpp:444
CV__DEBUG_NS_END typedef const _InputArray & InputArray
Definition: mat.hpp:442
int CvScalar value
Definition: core_c.h:720
int index
Definition: core_c.h:634
const char const char ** filename
Definition: core_c.h:2630
#define CV_8S
Definition: interface.h:74
#define CV_64F
Definition: interface.h:79
#define CV_8U
Definition: interface.h:73
#define CV_32S
Definition: interface.h:77
#define CV_32F
Definition: interface.h:78
#define CV_16S
Definition: interface.h:76
#define CV_16U
Definition: interface.h:75
#define CV_EXPORTS
Definition: cvdef.h:435
#define CV_EXPORTS_W
Definition: cvdef.h:472
#define CV_WRAP
Definition: cvdef.h:481
CvPoint2D32f float * radius
Definition: imgproc_c.h:534
int CvMemStorage int double eps
Definition: imgproc_c.h:493
InputArray int distType
Definition: imgproc.hpp:3387
"black box" representation of the file storage associated with a file on disk.
Definition: calib3d.hpp:441