![]() |
OpenCV
3.4.0
Open Source Computer Vision
|
The FLANN nearest neighbor index class. This class is templated with the type of elements for which the index is built. More...
#include "flann.hpp"
Public Types | |
| typedef Distance::ResultType | DistanceType |
| typedef Distance::ElementType | ElementType |
Public Member Functions | |
| GenericIndex (const Mat &features, const ::cvflann::IndexParams ¶ms, Distance distance=Distance()) | |
| Constructs a nearest neighbor search index for a given dataset. More... | |
| ~GenericIndex () | |
| const ::cvflann::IndexParams * | getIndexParameters () |
| ::cvflann::IndexParams | getParameters () |
| void | knnSearch (const std::vector< ElementType > &query, std::vector< int > &indices, std::vector< DistanceType > &dists, int knn, const ::cvflann::SearchParams ¶ms) |
| Performs a K-nearest neighbor search for a given query point using the index. More... | |
| void | knnSearch (const Mat &queries, Mat &indices, Mat &dists, int knn, const ::cvflann::SearchParams ¶ms) |
| int | radiusSearch (const std::vector< ElementType > &query, std::vector< int > &indices, std::vector< DistanceType > &dists, DistanceType radius, const ::cvflann::SearchParams ¶ms) |
| int | radiusSearch (const Mat &query, Mat &indices, Mat &dists, DistanceType radius, const ::cvflann::SearchParams ¶ms) |
| void | save (String filename) |
| int | size () const |
| int | veclen () const |
The FLANN nearest neighbor index class. This class is templated with the type of elements for which the index is built.
| typedef Distance::ResultType cv::flann::GenericIndex< Distance >::DistanceType |
| typedef Distance::ElementType cv::flann::GenericIndex< Distance >::ElementType |
| cv::flann::GenericIndex< Distance >::GenericIndex | ( | const Mat & | features, |
| const ::cvflann::IndexParams & | params, | ||
| Distance | distance = Distance() |
||
| ) |
Constructs a nearest neighbor search index for a given dataset.
| features | Matrix of containing the features(points) to index. The size of the matrix is num_features x feature_dimensionality and the data type of the elements in the matrix must coincide with the type of the index. |
| params | Structure containing the index parameters. The type of index that will be constructed depends on the type of this parameter. See the description. |
| distance | The method constructs a fast search structure from a set of features using the specified algorithm with specified parameters, as defined by params. params is a reference to one of the following class IndexParams descendants: |
| cv::flann::GenericIndex< Distance >::~GenericIndex | ( | ) |
|
inline |
|
inline |
| void cv::flann::GenericIndex< Distance >::knnSearch | ( | const std::vector< ElementType > & | query, |
| std::vector< int > & | indices, | ||
| std::vector< DistanceType > & | dists, | ||
| int | knn, | ||
| const ::cvflann::SearchParams & | params | ||
| ) |
Performs a K-nearest neighbor search for a given query point using the index.
| query | The query point |
| indices | Vector that will contain the indices of the K-nearest neighbors found. It must have at least knn size. |
| dists | Vector that will contain the distances to the K-nearest neighbors found. It must have at least knn size. |
| knn | Number of nearest neighbors to search for. |
| params | SearchParams |
| void cv::flann::GenericIndex< Distance >::knnSearch | ( | const Mat & | queries, |
| Mat & | indices, | ||
| Mat & | dists, | ||
| int | knn, | ||
| const ::cvflann::SearchParams & | params | ||
| ) |
| int cv::flann::GenericIndex< Distance >::radiusSearch | ( | const std::vector< ElementType > & | query, |
| std::vector< int > & | indices, | ||
| std::vector< DistanceType > & | dists, | ||
| DistanceType | radius, | ||
| const ::cvflann::SearchParams & | params | ||
| ) |
| int cv::flann::GenericIndex< Distance >::radiusSearch | ( | const Mat & | query, |
| Mat & | indices, | ||
| Mat & | dists, | ||
| DistanceType | radius, | ||
| const ::cvflann::SearchParams & | params | ||
| ) |
|
inline |
|
inline |
|
inline |
1.8.12