opencv on mbed

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Clustering and Search in Multi-Dimensional Spaces

Clustering and Search in Multi-Dimensional Spaces

This section documents OpenCV's interface to the FLANN library. More...

Data Structures

class  GenericIndex< Distance >
 The FLANN nearest neighbor index class. More...
class  Index_< T >

Functions

template<typename Distance >
int hierarchicalClustering (const Mat &features, Mat &centers, const ::cvflann::KMeansIndexParams &params, Distance d=Distance())
 Clusters features using hierarchical k-means algorithm.
template<typename ELEM_TYPE , typename DIST_TYPE >
FLANN_DEPRECATED int hierarchicalClustering (const Mat &features, Mat &centers, const ::cvflann::KMeansIndexParams &params)

Detailed Description

This section documents OpenCV's interface to the FLANN library.

FLANN (Fast Library for Approximate Nearest Neighbors) is a library that contains a collection of algorithms optimized for fast nearest neighbor search in large datasets and for high dimensional features. More information about FLANN can be found in Muja2009 .


Function Documentation

int cv::flann::hierarchicalClustering ( const Mat &  features,
Mat &  centers,
const ::cvflann::KMeansIndexParams &  params,
Distance  d = Distance() 
)

Clusters features using hierarchical k-means algorithm.

Parameters:
featuresThe points to be clustered. The matrix must have elements of type Distance::ElementType.
centersThe centers of the clusters obtained. The matrix must have type Distance::ResultType. The number of rows in this matrix represents the number of clusters desired, however, because of the way the cut in the hierarchical tree is chosen, the number of clusters computed will be the highest number of the form (branching-1)\*k+1 that's lower than the number of clusters desired, where branching is the tree's branching factor (see description of the KMeansIndexParams).
paramsParameters used in the construction of the hierarchical k-means tree.
dDistance to be used for clustering.

The method clusters the given feature vectors by constructing a hierarchical k-means tree and choosing a cut in the tree that minimizes the cluster's variance. It returns the number of clusters found.

Definition at line 518 of file flann.hpp.

FLANN_DEPRECATED int cv::flann::hierarchicalClustering ( const Mat &  features,
Mat &  centers,
const ::cvflann::KMeansIndexParams &  params 
)

Definition at line 538 of file flann.hpp.