#include <opencv2/flann/autotuned_index.h>
Public Types | |
typedef Distance::ResultType | DistanceType |
typedef Distance::ElementType | ElementType |
Public Member Functions | |
AutotunedIndex (const Matrix< ElementType > &inputData, const IndexParams ¶ms=AutotunedIndexParams(), Distance d=Distance()) | |
AutotunedIndex (const AutotunedIndex &) | |
virtual | ~AutotunedIndex () |
virtual void | buildIndex () CV_OVERRIDE |
Method responsible with building the index. More... | |
virtual void | findNeighbors (ResultSet< DistanceType > &result, const ElementType *vec, const SearchParams &searchParams) CV_OVERRIDE |
Method that searches for nearest-neighbors. More... | |
IndexParams | getParameters () const CV_OVERRIDE |
SearchParams | getSearchParameters () const |
float | getSpeedup () const |
virtual flann_algorithm_t | getType () const CV_OVERRIDE |
Algorithm name. More... | |
virtual void | knnSearch (const Matrix< ElementType > &queries, Matrix< int > &indices, Matrix< DistanceType > &dists, int knn, const SearchParams ¶ms) |
Perform k-nearest neighbor search. More... | |
virtual void | loadIndex (FILE *stream) CV_OVERRIDE |
Loads the index from a stream. More... | |
AutotunedIndex & | operator= (const AutotunedIndex &) |
virtual int | radiusSearch (const Matrix< ElementType > &query, Matrix< int > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams ¶ms) |
Perform radius search. More... | |
virtual void | saveIndex (FILE *stream) CV_OVERRIDE |
Saves the index to a stream. More... | |
virtual size_t | size () const CV_OVERRIDE |
Number of features in this index. More... | |
virtual int | usedMemory () const CV_OVERRIDE |
The amount of memory (in bytes) this index uses. More... | |
virtual size_t | veclen () const CV_OVERRIDE |
The length of each vector in this index. More... | |
typedef Distance::ResultType cvflann::AutotunedIndex< Distance >::DistanceType |
typedef Distance::ElementType cvflann::AutotunedIndex< Distance >::ElementType |
|
inline |
cvflann::AutotunedIndex< Distance >::AutotunedIndex | ( | const AutotunedIndex< Distance > & | ) |
|
inlinevirtual |
|
inlinevirtual |
Method responsible with building the index.
Implements cvflann::NNIndex< Distance >.
References cvflann::create_index_by_type(), cvflann::Logger::info(), and cvflann::print_params().
|
inlinevirtual |
Method that searches for nearest-neighbors.
Implements cvflann::NNIndex< Distance >.
References cvflann::FLANN_CHECKS_AUTOTUNED.
|
inlinevirtual |
Implements cvflann::NNIndex< Distance >.
|
inline |
|
inline |
|
inlinevirtual |
Algorithm name.
Implements cvflann::NNIndex< Distance >.
References cvflann::KDTreeIndex< Distance >::buildIndex(), cvflann::KMeansIndex< Distance >::buildIndex(), cvflann::FLANN_CENTERS_RANDOM, cvflann::FLANN_INDEX_AUTOTUNED, cvflann::FLANN_INDEX_KDTREE, cvflann::FLANN_INDEX_KMEANS, cvflann::FLANN_INDEX_LINEAR, cvflann::Logger::info(), cv::kmeans(), cv::min(), cvflann::random_sample(), cvflann::Matrix< T >::rows, cvflann::KMeansIndex< Distance >::set_cb_index(), cvflann::StartStopTimer::start(), cvflann::StartStopTimer::stop(), cvflann::test_index_precision(), cvflann::KDTreeIndex< Distance >::usedMemory(), cvflann::KMeansIndex< Distance >::usedMemory(), and cvflann::StartStopTimer::value.
|
inlinevirtualinherited |
Perform k-nearest neighbor search.
[in] | queries | The query points for which to find the nearest neighbors |
[out] | indices | The indices of the nearest neighbors found |
[out] | dists | Distances to the nearest neighbors found |
[in] | knn | Number of nearest neighbors to return |
[in] | params | Search parameters |
Reimplemented in cvflann::Index< Distance >, cvflann::Index< cv::L2< ElementType > >, cvflann::Index< cv::L1< ElementType > >, cvflann::KDTreeSingleIndex< Distance >, and cvflann::LshIndex< Distance >.
|
inlinevirtual |
Loads the index from a stream.
Implements cvflann::NNIndex< Distance >.
References cvflann::load_value().
AutotunedIndex& cvflann::AutotunedIndex< Distance >::operator= | ( | const AutotunedIndex< Distance > & | ) |
|
inlinevirtualinherited |
Perform radius search.
[in] | query | The query point |
[out] | indices | The indinces of the neighbors found within the given radius |
[out] | dists | The distances to the nearest neighbors found |
[in] | radius | The radius used for search |
[in] | params | Search parameters |
Reimplemented in cvflann::Index< Distance >, cvflann::Index< cv::L2< ElementType > >, and cvflann::Index< cv::L1< ElementType > >.
|
inlinevirtual |
Saves the index to a stream.
Implements cvflann::NNIndex< Distance >.
References cvflann::save_value().
|
inlinevirtual |
Number of features in this index.
Implements cvflann::NNIndex< Distance >.
|
inlinevirtual |
The amount of memory (in bytes) this index uses.
Implements cvflann::NNIndex< Distance >.
|
inlinevirtual |
The length of each vector in this index.
Implements cvflann::NNIndex< Distance >.