Classes | |
class | AutotunedIndex |
struct | AutotunedIndexParams |
struct | BranchStruct |
class | CompositeIndex |
struct | CompositeIndexParams |
struct | Datatype |
struct | Datatype< char > |
struct | Datatype< double > |
struct | Datatype< float > |
struct | Datatype< int > |
struct | Datatype< short > |
struct | Datatype< unsigned char > |
struct | Datatype< unsigned int > |
struct | Datatype< unsigned short > |
class | Heap |
struct | IndexHeader |
class | KDTreeIndex |
struct | KDTreeIndexParams |
class | KMeansIndex |
struct | KMeansIndexParams |
class | KNNResultSet |
class | LinearIndex |
struct | LinearIndexParams |
class | Logger |
class | Matrix |
class | NNIndex |
class | ObjectFactory |
class | PooledAllocator |
class | RadiusResultSet |
class | ResultSet |
class | StartStopTimer |
class | UniqueRandom |
class | UntypedMatrix |
struct | ZeroIterator |
Functions | |
template<typename T > | |
void | addValue (int pos, float val, float *vals, T *point, T *points, int n) |
template<typename T > | |
T * | allocate (size_t count=1) |
template<typename Iterator1 , typename Iterator2 > | |
double | chi_square_dist (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename T > | |
void | compute_ground_truth (const Matrix< T > &dataset, const Matrix< T > &testset, Matrix< int > &matches, int skip=0) |
template<typename ELEM_TYPE > | |
float | computeDistanceRaport (const Matrix< ELEM_TYPE > &inputData, ELEM_TYPE *target, int *neighbors, int *groundTruth, int veclen, int n) |
CV_EXPORTS int | countCorrectMatches (int *neighbors, int *groundTruth, int n) |
template<typename T > | |
NNIndex< T > * | create_index_by_type (const Matrix< T > &dataset, const IndexParams ¶ms) |
template<typename BaseClass , typename DerivedClass > | |
BaseClass * | createObject () |
template<typename Iterator1 , typename Iterator2 > | |
double | custom_dist (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
CV_EXPORTS double | euclidean_dist (const unsigned char *first1, const unsigned char *last1, unsigned char *first2, double acc) |
template<typename Iterator1 , typename Iterator2 > | |
double | euclidean_dist (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename T > | |
void | find_nearest (const Matrix< T > &dataset, T *query, int *matches, int nn, int skip=0) |
CV_EXPORTS flann_distance_t | flann_distance_type () |
CV_EXPORTS int | flann_minkowski_order () |
CV_EXPORTS const char * | FLANN_SIGNATURE () |
CV_EXPORTS const char * | FLANN_VERSION () |
template<typename Iterator1 , typename Iterator2 > | |
double | hellinger_dist (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename Iterator1 , typename Iterator2 > | |
double | hist_intersection_dist_sq (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename Iterator1 , typename Iterator2 > | |
double | hist_intersection_kernel (Iterator1 first1, Iterator1 last1, Iterator2 first2) |
template<typename Iterator1 , typename Iterator2 > | |
double | kl_divergence (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename T > | |
void | load_from_file (cvflann::Matrix< T > &flann_dataset, const std::string &filename, const std::string &name) |
CV_EXPORTS IndexHeader | load_header (FILE *stream) |
template<typename T > | |
void | load_value (FILE *stream, T &value, int count=1) |
CV_EXPORTS Logger & | logger () |
template<typename Iterator1 , typename Iterator2 > | |
double | manhattan_dist (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename Iterator1 , typename Iterator2 > | |
double | max_dist (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename Iterator1 , typename Iterator2 > | |
double | minkowski_dist (Iterator1 first1, Iterator1 last1, Iterator2 first2, double acc=0) |
template<typename T , typename F > | |
float | optimizeSimplexDownhill (T *points, int n, F func, float *vals=NULL) |
CV_EXPORTS double | rand_double (double high=1.0, double low=0) |
CV_EXPORTS int | rand_int (int high=RAND_MAX, int low=0) |
template<typename T > | |
Matrix< T > | random_sample (const Matrix< T > &srcMatrix, size_t size) |
template<typename T > | |
Matrix< T > | random_sample (Matrix< T > &srcMatrix, long size, bool remove=false) |
template<typename ELEM_TYPE > | |
void | save_header (FILE *stream, const NNIndex< ELEM_TYPE > &index) |
template<typename T > | |
void | save_to_file (const cvflann::Matrix< T > &flann_dataset, const std::string &filename, const std::string &name) |
template<typename T > | |
void | save_value (FILE *stream, const T &value, int count=1) |
template<typename ELEM_TYPE > | |
float | search_with_ground_truth (NNIndex< ELEM_TYPE > &index, const Matrix< ELEM_TYPE > &inputData, const Matrix< ELEM_TYPE > &testData, const Matrix< int > &matches, int nn, int checks, float &time, float &dist, int skipMatches) |
CV_EXPORTS void | seed_random (unsigned int seed) |
template<typename ELEM_TYPE > | |
float | test_index_checks (NNIndex< ELEM_TYPE > &index, const Matrix< ELEM_TYPE > &inputData, const Matrix< ELEM_TYPE > &testData, const Matrix< int > &matches, int checks, float &precision, int nn=1, int skipMatches=0) |
template<typename ELEM_TYPE > | |
float | test_index_precision (NNIndex< ELEM_TYPE > &index, const Matrix< ELEM_TYPE > &inputData, const Matrix< ELEM_TYPE > &testData, const Matrix< int > &matches, float precision, int &checks, int nn=1, int skipMatches=0) |
template<typename ELEM_TYPE > | |
float | test_index_precisions (NNIndex< ELEM_TYPE > &index, const Matrix< ELEM_TYPE > &inputData, const Matrix< ELEM_TYPE > &testData, const Matrix< int > &matches, float *precisions, int precisions_length, int nn=1, int skipMatches=0, float maxTime=0) |
CV_EXPORTS ZeroIterator< float > & | zero () |
Variables | |
const size_t | BLOCKSIZE = 8192 |
const size_t | WORDSIZE = 16 |
void cvflann::addValue | ( | int | pos, | |
float | val, | |||
float * | vals, | |||
T * | point, | |||
T * | points, | |||
int | n | |||
) | [inline] |
Adds val to array vals (and point to array points) and keeping the arrays sorted by vals.
Definition at line 41 of file simplex_downhill.h.
T* cvflann::allocate | ( | size_t | count = 1 |
) | [inline] |
Allocates (using C's malloc) a generic type T.
Params: count = number of instances to allocate. Returns: pointer (of type T*) to memory buffer
Definition at line 48 of file allocator.h.
double cvflann::chi_square_dist | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
void cvflann::compute_ground_truth | ( | const Matrix< T > & | dataset, | |
const Matrix< T > & | testset, | |||
Matrix< int > & | matches, | |||
int | skip = 0 | |||
) | [inline] |
Definition at line 85 of file ground_truth.h.
float cvflann::computeDistanceRaport | ( | const Matrix< ELEM_TYPE > & | inputData, | |
ELEM_TYPE * | target, | |||
int * | neighbors, | |||
int * | groundTruth, | |||
int | veclen, | |||
int | n | |||
) | [inline] |
Definition at line 53 of file index_testing.h.
CV_EXPORTS int cvflann::countCorrectMatches | ( | int * | neighbors, | |
int * | groundTruth, | |||
int | n | |||
) |
NNIndex<T>* cvflann::create_index_by_type | ( | const Matrix< T > & | dataset, | |
const IndexParams & | params | |||
) | [inline] |
Definition at line 44 of file all_indices.h.
BaseClass* cvflann::createObject | ( | ) | [inline] |
Definition at line 41 of file object_factory.h.
double cvflann::custom_dist | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
CV_EXPORTS double cvflann::euclidean_dist | ( | const unsigned char * | first1, | |
const unsigned char * | last1, | |||
unsigned char * | first2, | |||
double | acc | |||
) |
double cvflann::euclidean_dist | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
void cvflann::find_nearest | ( | const Matrix< T > & | dataset, | |
T * | query, | |||
int * | matches, | |||
int | nn, | |||
int | skip = 0 | |||
) | [inline] |
Definition at line 41 of file ground_truth.h.
CV_EXPORTS flann_distance_t cvflann::flann_distance_type | ( | ) |
CV_EXPORTS int cvflann::flann_minkowski_order | ( | ) |
CV_EXPORTS const char* cvflann::FLANN_SIGNATURE | ( | ) |
CV_EXPORTS const char* cvflann::FLANN_VERSION | ( | ) |
double cvflann::hellinger_dist | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
double cvflann::hist_intersection_dist_sq | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
double cvflann::hist_intersection_kernel | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2 | |||
) | [inline] |
double cvflann::kl_divergence | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
void cvflann::load_from_file | ( | cvflann::Matrix< T > & | flann_dataset, | |
const std::string & | filename, | |||
const std::string & | name | |||
) | [inline] |
CV_EXPORTS IndexHeader cvflann::load_header | ( | FILE * | stream | ) |
stream | - Stream to load from |
void cvflann::load_value | ( | FILE * | stream, | |
T & | value, | |||
int | count = 1 | |||
) | [inline] |
CV_EXPORTS Logger& cvflann::logger | ( | ) |
double cvflann::manhattan_dist | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
double cvflann::max_dist | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
double cvflann::minkowski_dist | ( | Iterator1 | first1, | |
Iterator1 | last1, | |||
Iterator2 | first2, | |||
double | acc = 0 | |||
) | [inline] |
float cvflann::optimizeSimplexDownhill | ( | T * | points, | |
int | n, | |||
F | func, | |||
float * | vals = NULL | |||
) | [inline] |
Simplex downhill optimization function. Preconditions: points is a 2D mattrix of size (n+1) x n func is the cost function taking n an array of n params and returning float vals is the cost function in the n+1 simplex points, if NULL it will be computed
Postcondition: returns optimum value and points[0..n] are the optimum parameters
Definition at line 69 of file simplex_downhill.h.
CV_EXPORTS double cvflann::rand_double | ( | double | high = 1.0 , |
|
double | low = 0 | |||
) |
CV_EXPORTS int cvflann::rand_int | ( | int | high = RAND_MAX , |
|
int | low = 0 | |||
) |
Matrix<T> cvflann::random_sample | ( | const Matrix< T > & | srcMatrix, | |
size_t | size | |||
) | [inline] |
Definition at line 74 of file sampling.h.
Matrix<T> cvflann::random_sample | ( | Matrix< T > & | srcMatrix, | |
long | size, | |||
bool | remove = false | |||
) | [inline] |
Definition at line 42 of file sampling.h.
void cvflann::save_header | ( | FILE * | stream, | |
const NNIndex< ELEM_TYPE > & | index | |||
) | [inline] |
void cvflann::save_to_file | ( | const cvflann::Matrix< T > & | flann_dataset, | |
const std::string & | filename, | |||
const std::string & | name | |||
) | [inline] |
void cvflann::save_value | ( | FILE * | stream, | |
const T & | value, | |||
int | count = 1 | |||
) | [inline] |
float cvflann::search_with_ground_truth | ( | NNIndex< ELEM_TYPE > & | index, | |
const Matrix< ELEM_TYPE > & | inputData, | |||
const Matrix< ELEM_TYPE > & | testData, | |||
const Matrix< int > & | matches, | |||
int | nn, | |||
int | checks, | |||
float & | time, | |||
float & | dist, | |||
int | skipMatches | |||
) | [inline] |
Definition at line 73 of file index_testing.h.
CV_EXPORTS void cvflann::seed_random | ( | unsigned int | seed | ) |
Seeds the random number generator
float cvflann::test_index_checks | ( | NNIndex< ELEM_TYPE > & | index, | |
const Matrix< ELEM_TYPE > & | inputData, | |||
const Matrix< ELEM_TYPE > & | testData, | |||
const Matrix< int > & | matches, | |||
int | checks, | |||
float & | precision, | |||
int | nn = 1 , |
|||
int | skipMatches = 0 | |||
) | [inline] |
Definition at line 120 of file index_testing.h.
float cvflann::test_index_precision | ( | NNIndex< ELEM_TYPE > & | index, | |
const Matrix< ELEM_TYPE > & | inputData, | |||
const Matrix< ELEM_TYPE > & | testData, | |||
const Matrix< int > & | matches, | |||
float | precision, | |||
int & | checks, | |||
int | nn = 1 , |
|||
int | skipMatches = 0 | |||
) | [inline] |
Definition at line 134 of file index_testing.h.
float cvflann::test_index_precisions | ( | NNIndex< ELEM_TYPE > & | index, | |
const Matrix< ELEM_TYPE > & | inputData, | |||
const Matrix< ELEM_TYPE > & | testData, | |||
const Matrix< int > & | matches, | |||
float * | precisions, | |||
int | precisions_length, | |||
int | nn = 1 , |
|||
int | skipMatches = 0 , |
|||
float | maxTime = 0 | |||
) | [inline] |
Definition at line 204 of file index_testing.h.
CV_EXPORTS ZeroIterator<float>& cvflann::zero | ( | ) |
const size_t cvflann::BLOCKSIZE = 8192 |
Definition at line 71 of file allocator.h.
const size_t cvflann::WORDSIZE = 16 |
Pooled storage allocator
The following routines allow for the efficient allocation of storage in small chunks from a specified pool. Rather than allowing each structure to be freed individually, an entire pool of storage is freed at once. This method has two advantages over just using malloc() and free(). First, it is far more efficient for allocating small objects, as there is no overhead for remembering all the information needed to free each object or consolidating fragmented memory. Second, the decision about how long to keep an object is made at the time of allocation, and there is no need to track down all the objects to free them.
Definition at line 70 of file allocator.h.