From b88f5302e20da8d477eee6e9d361d1f3983784ca Mon Sep 17 00:00:00 2001 From: Jin Ma Date: Mon, 23 Sep 2013 15:10:00 +0800 Subject: [PATCH] Removed unused constructor. --- modules/ocl/include/opencv2/ocl/ocl.hpp | 5 ----- modules/ocl/src/knearest.cpp | 8 +------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/ocl/include/opencv2/ocl/ocl.hpp b/modules/ocl/include/opencv2/ocl/ocl.hpp index 8f46244fae..dc9183acba 100644 --- a/modules/ocl/include/opencv2/ocl/ocl.hpp +++ b/modules/ocl/include/opencv2/ocl/ocl.hpp @@ -1900,8 +1900,6 @@ namespace cv public: KNearestNeighbour(); ~KNearestNeighbour(); - KNearestNeighbour(const Mat& trainData, const Mat& labels, - const Mat& sampleIdx = Mat().setTo(Scalar::all(0)), bool isRegression = false, int max_k = 32); bool train(const Mat& trainData, Mat& labels, Mat& sampleIdx = Mat().setTo(Scalar::all(0)), bool isRegression = false, int max_k = 32, bool updateBase = false); @@ -1911,9 +1909,6 @@ namespace cv void find_nearest(const oclMat& samples, int k, oclMat& lables); private: - int max_k, var_count; - int total; - bool regression; oclMat samples_ocl; }; } diff --git a/modules/ocl/src/knearest.cpp b/modules/ocl/src/knearest.cpp index 4f78e85ea8..fd9f2fed57 100644 --- a/modules/ocl/src/knearest.cpp +++ b/modules/ocl/src/knearest.cpp @@ -63,13 +63,7 @@ KNearestNeighbour::KNearestNeighbour() KNearestNeighbour::~KNearestNeighbour() { clear(); -} - -KNearestNeighbour::KNearestNeighbour(const Mat& train_data, const Mat& responses, - const Mat& sample_idx, bool is_regression, int max_k) -{ - max_k = max_k; - CvKNearest::train(train_data, responses, sample_idx, is_regression, max_k); + samples_ocl.release(); } void KNearestNeighbour::clear()