OpenCV
3.1.0
Open Source Computer Vision
|
#include "result_set.h"
Classes | |
struct | DistIndex |
Public Member Functions | |
UniqueResultSet () | |
virtual void | clear ()=0 |
virtual void | copy (int *indices, DistanceType *dist, int n_neighbors=-1) const |
bool | full () const |
size_t | size () const |
virtual void | sortAndCopy (int *indices, DistanceType *dist, int n_neighbors=-1) const |
DistanceType | worstDist () const |
Public Member Functions inherited from cvflann::ResultSet< DistanceType > | |
virtual | ~ResultSet () |
virtual void | addPoint (DistanceType dist, int index)=0 |
Protected Attributes | |
std::set< DistIndex > | dist_indices_ |
bool | is_full_ |
DistanceType | worst_distance_ |
Class that holds the k NN neighbors Faster than KNNResultSet as it uses a binary heap and does not maintain two arrays
|
inline |
Default cosntructor
|
pure virtual |
Remove all elements in the set
Implemented in cvflann::KNNRadiusUniqueResultSet< DistanceType >, cvflann::RadiusUniqueResultSet< DistanceType >, and cvflann::KNNUniqueResultSet< DistanceType >.
|
inlinevirtual |
Copy the set to two C arrays
indices | pointer to a C array of indices |
dist | pointer to a C array of distances |
n_neighbors | the number of neighbors to copy |
|
inlinevirtual |
Check the status of the set
Implements cvflann::ResultSet< DistanceType >.
Reimplemented in cvflann::RadiusUniqueResultSet< DistanceType >.
|
inline |
The number of neighbors in the set
|
inlinevirtual |
Copy the set to two C arrays but sort it according to the distance first
indices | pointer to a C array of indices |
dist | pointer to a C array of distances |
n_neighbors | the number of neighbors to copy |
|
inlinevirtual |
The distance of the furthest neighbor If we don't have enough neighbors, it returns the max possible value
Implements cvflann::ResultSet< DistanceType >.
Reimplemented in cvflann::RadiusUniqueResultSet< DistanceType >.
|
protected |
The best candidates so far
|
protected |
Flag to say if the set is full
|
protected |
The worst distance found so far