Clustering
cv::cv::flann::hierarchicalClustering<ET,DT>
Comments from the Wiki

int hierarchicalClustering<ET,DT>(const Mat& features, Mat& centers, const KMeansIndexParams& params)
Clusters the given points by constructing a hierarchical kmeans tree and choosing a cut in the tree that minimizes the cluster’s variance.
Parameters: 
 features – The points to be clustered. The matrix must have elements of type ET.
 centers – The centers of the clusters obtained. The matrix must have type DT. 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 (branching1)*k+1 that’s lower than the number of clusters desired, where branching is the tree’s branching factor (see description of the KMeansIndexParams).
 params – Parameters used in the construction of the hierarchical kmeans tree

The function returns the number of clusters computed.
Help and Feedback
You did not find what you were looking for?