OpenCV  4.1.1-pre
Open Source Computer Vision
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
cvflann::AutotunedIndex< Distance > Class Template Reference

#include <opencv2/flann/autotuned_index.h>

Inheritance diagram for cvflann::AutotunedIndex< Distance >:
Collaboration diagram for cvflann::AutotunedIndex< Distance >:

Public Types

typedef Distance::ResultType DistanceType
 
typedef Distance::ElementType ElementType
 

Public Member Functions

 AutotunedIndex (const Matrix< ElementType > &inputData, const IndexParams &params=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 &params)
 Perform k-nearest neighbor search. More...
 
virtual void loadIndex (FILE *stream) CV_OVERRIDE
 Loads the index from a stream. More...
 
AutotunedIndexoperator= (const AutotunedIndex &)
 
virtual int radiusSearch (const Matrix< ElementType > &query, Matrix< int > &indices, Matrix< DistanceType > &dists, float radius, const SearchParams &params)
 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...
 

Member Typedef Documentation

◆ DistanceType

template<typename Distance>
typedef Distance::ResultType cvflann::AutotunedIndex< Distance >::DistanceType

◆ ElementType

template<typename Distance>
typedef Distance::ElementType cvflann::AutotunedIndex< Distance >::ElementType

Constructor & Destructor Documentation

◆ AutotunedIndex() [1/2]

template<typename Distance>
cvflann::AutotunedIndex< Distance >::AutotunedIndex ( const Matrix< ElementType > &  inputData,
const IndexParams params = AutotunedIndexParams(),
Distance  d = Distance() 
)
inline

References cvflann::get_param().

Here is the call graph for this function:

◆ AutotunedIndex() [2/2]

template<typename Distance>
cvflann::AutotunedIndex< Distance >::AutotunedIndex ( const AutotunedIndex< Distance > &  )

◆ ~AutotunedIndex()

template<typename Distance>
virtual cvflann::AutotunedIndex< Distance >::~AutotunedIndex ( )
inlinevirtual

Member Function Documentation

◆ buildIndex()

template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::buildIndex ( )
inlinevirtual

Method responsible with building the index.

Implements cvflann::NNIndex< Distance >.

References cvflann::create_index_by_type(), cvflann::Logger::info(), and cvflann::print_params().

Here is the call graph for this function:

◆ findNeighbors()

template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::findNeighbors ( ResultSet< DistanceType > &  result,
const ElementType vec,
const SearchParams searchParams 
)
inlinevirtual

Method that searches for nearest-neighbors.

Implements cvflann::NNIndex< Distance >.

References cvflann::FLANN_CHECKS_AUTOTUNED.

◆ getParameters()

template<typename Distance>
IndexParams cvflann::AutotunedIndex< Distance >::getParameters ( ) const
inlinevirtual
Returns
The index parameters

Implements cvflann::NNIndex< Distance >.

◆ getSearchParameters()

template<typename Distance>
SearchParams cvflann::AutotunedIndex< Distance >::getSearchParameters ( ) const
inline

◆ getSpeedup()

template<typename Distance>
float cvflann::AutotunedIndex< Distance >::getSpeedup ( ) const
inline

◆ getType()

◆ knnSearch()

template<typename Distance>
virtual void cvflann::NNIndex< Distance >::knnSearch ( const Matrix< ElementType > &  queries,
Matrix< int > &  indices,
Matrix< DistanceType > &  dists,
int  knn,
const SearchParams params 
)
inlinevirtualinherited

Perform k-nearest neighbor search.

Parameters
[in]queriesThe query points for which to find the nearest neighbors
[out]indicesThe indices of the nearest neighbors found
[out]distsDistances to the nearest neighbors found
[in]knnNumber of nearest neighbors to return
[in]paramsSearch parameters

Reimplemented in cvflann::Index< Distance >, cvflann::Index< cv::L2< ElementType > >, cvflann::Index< cv::L1< ElementType > >, cvflann::KDTreeSingleIndex< Distance >, and cvflann::LshIndex< Distance >.

◆ loadIndex()

template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::loadIndex ( FILE *  stream)
inlinevirtual

Loads the index from a stream.

Implements cvflann::NNIndex< Distance >.

References cvflann::load_value().

Here is the call graph for this function:

◆ operator=()

template<typename Distance>
AutotunedIndex& cvflann::AutotunedIndex< Distance >::operator= ( const AutotunedIndex< Distance > &  )

◆ radiusSearch()

template<typename Distance>
virtual int cvflann::NNIndex< Distance >::radiusSearch ( const Matrix< ElementType > &  query,
Matrix< int > &  indices,
Matrix< DistanceType > &  dists,
float  radius,
const SearchParams params 
)
inlinevirtualinherited

Perform radius search.

Parameters
[in]queryThe query point
[out]indicesThe indinces of the neighbors found within the given radius
[out]distsThe distances to the nearest neighbors found
[in]radiusThe radius used for search
[in]paramsSearch parameters
Returns
Number of neighbors found

Reimplemented in cvflann::Index< Distance >, cvflann::Index< cv::L2< ElementType > >, and cvflann::Index< cv::L1< ElementType > >.

◆ saveIndex()

template<typename Distance>
virtual void cvflann::AutotunedIndex< Distance >::saveIndex ( FILE *  stream)
inlinevirtual

Saves the index to a stream.

Implements cvflann::NNIndex< Distance >.

References cvflann::save_value().

Here is the call graph for this function:

◆ size()

template<typename Distance>
virtual size_t cvflann::AutotunedIndex< Distance >::size ( ) const
inlinevirtual

Number of features in this index.

Implements cvflann::NNIndex< Distance >.

◆ usedMemory()

template<typename Distance>
virtual int cvflann::AutotunedIndex< Distance >::usedMemory ( ) const
inlinevirtual

The amount of memory (in bytes) this index uses.

Implements cvflann::NNIndex< Distance >.

◆ veclen()

template<typename Distance>
virtual size_t cvflann::AutotunedIndex< Distance >::veclen ( ) const
inlinevirtual

The length of each vector in this index.

Implements cvflann::NNIndex< Distance >.


The documentation for this class was generated from the following file: