merged all the latest changes from 2.4 to trunk

This commit is contained in:
Vadim Pisarevsky
2012-04-13 21:50:59 +00:00
parent 020f9a6047
commit 2fd1e2ea57
416 changed files with 12852 additions and 6070 deletions

View File

@@ -3,16 +3,18 @@ Clustering
.. highlight:: cpp
flann::hierarchicalClustering<ET,DT>
flann::hierarchicalClustering<Distance>
--------------------------------------------
Clusters features using hierarchical k-means algorithm.
.. ocv:function:: int flann::hierarchicalClustering<ET,DT>(const Mat& features, Mat& centers, const KMeansIndexParams& params)
.. ocv:function:: template<typename Distance> 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.

View File

@@ -71,7 +71,7 @@ The method constructs a fast search structure from a set of features using the s
* **centers_init** The algorithm to use for selecting the initial centers when performing a k-means clustering step. The possible values are ``CENTERS_RANDOM`` (picks the initial cluster centers randomly), ``CENTERS_GONZALES`` (picks the initial centers using Gonzales' algorithm) and ``CENTERS_KMEANSPP`` (picks the initial centers using the algorithm suggested in arthur_kmeanspp_2007 )
* **cb_index** This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When ``cb_index`` is zero the next kmeans domain to be explored is choosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.
* **cb_index** This parameter (cluster boundary index) influences the way exploration is performed in the hierarchical kmeans tree. When ``cb_index`` is zero the next kmeans domain to be explored is chosen to be the one with the closest center. A value greater then zero also takes into account the size of the domain.
*
**CompositeIndexParams** When using a parameters object of this type the index created combines the randomized kd-trees and the hierarchical k-means tree. ::
@@ -205,7 +205,7 @@ Saves the index to a file.
flann::Index_<T>::getIndexParameters
--------------------------------------------
Returns the index paramreters.
Returns the index parameters.
.. ocv:function:: const IndexParams* flann::Index_<T>::getIndexParameters()

View File

@@ -225,7 +225,11 @@ int GenericIndex<Distance>::radiusSearch(const Mat& query, Mat& indices, Mat& di
* @deprecated Use GenericIndex class instead
*/
template <typename T>
class FLANN_DEPRECATED Index_ {
class
#ifndef _MSC_VER
FLANN_DEPRECATED
#endif
Index_ {
public:
typedef typename L2<T>::ElementType ElementType;
typedef typename L2<T>::ResultType DistanceType;
@@ -277,6 +281,10 @@ private:
::cvflann::Index< L1<ElementType> >* nnIndex_L1;
};
#ifdef _MSC_VER
template <typename T>
class FLANN_DEPRECATED Index_;
#endif
template <typename T>
Index_<T>::Index_(const Mat& dataset, const ::cvflann::IndexParams& params)