add kmeans

This commit is contained in:
yao
2013-07-03 13:13:04 +08:00
parent 6bf8f474fa
commit 8d8dc29ced
4 changed files with 728 additions and 0 deletions

View File

@@ -834,6 +834,18 @@ namespace cv
CV_EXPORTS void cornerMinEigenVal_dxdy(const oclMat &src, oclMat &dst, oclMat &Dx, oclMat &Dy,
int blockSize, int ksize, int bordertype = cv::BORDER_DEFAULT);
/////////////////////////////////// ML ///////////////////////////////////////////
//! Compute closest centers for each lines in source and lable it after center's index
// supports CV_32FC1/CV_32FC2/CV_32FC4 data type
void DistanceComputer(oclMat &dists, oclMat &labels, const oclMat &src, const oclMat &centers);
//!Does k-means procedure on GPU
// supports CV_32FC1/CV_32FC2/CV_32FC4 data type
CV_EXPORTS double kmeans(const oclMat &src, int K, oclMat &bestLabels,
TermCriteria criteria, int attemps, int flags, oclMat &centers);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////CascadeClassifier//////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////