mirror of
https://github.com/opencv/opencv.git
synced 2025-06-25 13:41:25 +08:00
Merge pull request #18062 from pemmanuelviel:pev-multiple-kmeans-trees
This commit is contained in:
commit
c3ced6db4e
@ -220,14 +220,8 @@ public:
|
|||||||
int branching = 32,
|
int branching = 32,
|
||||||
int iterations = 11,
|
int iterations = 11,
|
||||||
flann_centers_init_t centers_init = CENTERS_RANDOM,
|
flann_centers_init_t centers_init = CENTERS_RANDOM,
|
||||||
float cb_index = 0.2 );
|
float cb_index = 0.2,
|
||||||
|
int trees = 1);
|
||||||
KMeansIndexParams(
|
|
||||||
int branching,
|
|
||||||
int iterations,
|
|
||||||
flann_centers_init_t centers_init,
|
|
||||||
float cb_index,
|
|
||||||
int trees );
|
|
||||||
};
|
};
|
||||||
@endcode
|
@endcode
|
||||||
- **CompositeIndexParams** When using a parameters object of this type the index created
|
- **CompositeIndexParams** When using a parameters object of this type the index created
|
||||||
|
@ -57,8 +57,9 @@ namespace cvflann
|
|||||||
|
|
||||||
struct KMeansIndexParams : public IndexParams
|
struct KMeansIndexParams : public IndexParams
|
||||||
{
|
{
|
||||||
void indexParams(int branching, int iterations,
|
KMeansIndexParams(int branching = 32, int iterations = 11,
|
||||||
flann_centers_init_t centers_init, float cb_index, int trees)
|
flann_centers_init_t centers_init = FLANN_CENTERS_RANDOM,
|
||||||
|
float cb_index = 0.2, int trees = 1 )
|
||||||
{
|
{
|
||||||
(*this)["algorithm"] = FLANN_INDEX_KMEANS;
|
(*this)["algorithm"] = FLANN_INDEX_KMEANS;
|
||||||
// branching factor
|
// branching factor
|
||||||
@ -72,18 +73,6 @@ struct KMeansIndexParams : public IndexParams
|
|||||||
// number of kmeans trees to search in
|
// number of kmeans trees to search in
|
||||||
(*this)["trees"] = trees;
|
(*this)["trees"] = trees;
|
||||||
}
|
}
|
||||||
|
|
||||||
KMeansIndexParams(int branching = 32, int iterations = 11,
|
|
||||||
flann_centers_init_t centers_init = FLANN_CENTERS_RANDOM, float cb_index = 0.2 )
|
|
||||||
{
|
|
||||||
indexParams(branching, iterations, centers_init, cb_index, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
KMeansIndexParams(int branching, int iterations,
|
|
||||||
flann_centers_init_t centers_init, float cb_index, int trees)
|
|
||||||
{
|
|
||||||
indexParams(branching, iterations, centers_init, cb_index, trees);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user