Rewrite distanceToCenters.
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
This commit is contained in:

committed by
Konstantin Matskevich

parent
2279c209c8
commit
68a8a11161
@@ -877,7 +877,10 @@ namespace cv
|
||||
|
||||
//! Compute closest centers for each lines in source and lable it after center's index
|
||||
// supports CV_32FC1/CV_32FC2/CV_32FC4 data type
|
||||
CV_EXPORTS void distanceToCenters(oclMat &dists, oclMat &labels, const oclMat &src, const oclMat ¢ers);
|
||||
// supports NORM_L1 and NORM_L2 distType
|
||||
// if indices is provided, only the indexed rows will be calculated and their results are in the same
|
||||
// order of indices
|
||||
CV_EXPORTS void distanceToCenters(oclMat &dists, oclMat &labels, const oclMat &src, const oclMat ¢ers, int distType = NORM_L2SQR, const oclMat &indices = oclMat());
|
||||
|
||||
//!Does k-means procedure on GPU
|
||||
// supports CV_32FC1/CV_32FC2/CV_32FC4 data type
|
||||
|
Reference in New Issue
Block a user