From 6de2b1a0e69e9db56d03a0fa0fa5cb318c42a584 Mon Sep 17 00:00:00 2001 From: Ilya Lysenkov Date: Thu, 12 Apr 2012 09:20:43 +0000 Subject: [PATCH] Updated doc of flann::hierarchicalClustering (issue #1216) --- modules/flann/doc/flann_clustering.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/flann/doc/flann_clustering.rst b/modules/flann/doc/flann_clustering.rst index 4ea53bd692..951c0efd51 100644 --- a/modules/flann/doc/flann_clustering.rst +++ b/modules/flann/doc/flann_clustering.rst @@ -3,16 +3,18 @@ Clustering .. highlight:: cpp -flann::hierarchicalClustering +flann::hierarchicalClustering -------------------------------------------- Clusters features using hierarchical k-means algorithm. -.. ocv:function:: int flann::hierarchicalClustering(const Mat& features, Mat& centers, const KMeansIndexParams& params) +.. ocv:function:: int flann::hierarchicalClustering(const Mat& features, Mat& centers, const ::cvflann::KMeansIndexParams& params, Distance d = Distance()) - :param features: The points to be clustered. The matrix must have elements of type ET. + :param features: The points to be clustered. The matrix must have elements of type Distance::ElementType. - :param 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 ``(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). + :param centers: The 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). - :param params: Parameters used in the construction of the hierarchical k-means tree + :param params: Parameters used in the construction of the hierarchical k-means tree. + + :param d: Distance 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.