Removed unused constructor.

This commit is contained in:
Jin Ma 2013-09-23 15:10:00 +08:00
parent 1bfe39f485
commit b88f5302e2
2 changed files with 1 additions and 12 deletions

View File

@ -1900,8 +1900,6 @@ namespace cv
public: public:
KNearestNeighbour(); KNearestNeighbour();
~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 train(const Mat& trainData, Mat& labels, Mat& sampleIdx = Mat().setTo(Scalar::all(0)),
bool isRegression = false, int max_k = 32, bool updateBase = false); 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); void find_nearest(const oclMat& samples, int k, oclMat& lables);
private: private:
int max_k, var_count;
int total;
bool regression;
oclMat samples_ocl; oclMat samples_ocl;
}; };
} }

View File

@ -63,13 +63,7 @@ KNearestNeighbour::KNearestNeighbour()
KNearestNeighbour::~KNearestNeighbour() KNearestNeighbour::~KNearestNeighbour()
{ {
clear(); clear();
} samples_ocl.release();
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);
} }
void KNearestNeighbour::clear() void KNearestNeighbour::clear()