It supports NORM_L1 distance types now and can
use user provided indices.
Also fixed a bug of kmeans where distance pointers should be float instead
of double.
NORM_L2 changed to NORM_L2SQR, Accuracy and Perf tests are added
added ROI support in accuracy test of distanceToCenters
pull/1657/head
peng xiao12 years agocommitted byKonstantin Matskevich
@ -86,3 +86,27 @@ Finds centers of clusters and groups input samples around the clusters.
* **KMEANS_USE_INITIAL_LABELS** During the first (and possibly the only) attempt, use the user-supplied labels instead of computing them from the initial centers. For the second and further attempts, use the random or semi-random centers. Use one of ``KMEANS_*_CENTERS`` flag to specify the exact method.
* **KMEANS_USE_INITIAL_LABELS** During the first (and possibly the only) attempt, use the user-supplied labels instead of computing them from the initial centers. For the second and further attempts, use the random or semi-random centers. Use one of ``KMEANS_*_CENTERS`` flag to specify the exact method.
:param centers:Output matrix of the cluster centers, one row per each cluster center.
:param centers:Output matrix of the cluster centers, one row per each cluster center.
ocl::distanceToCenters
----------------------
For each samples in ``source``, find its closest neighour in ``centers``.