From 0b17a8bb3322844a96c1bbf8a3e10c03d91c7604 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Mon, 9 Feb 2015 13:20:25 -0500 Subject: [PATCH] Cleanup --- openbr/plugins/tree.cpp | 15 --------------- 1 file changed, 0 insertions(+), 15 deletions(-) diff --git a/openbr/plugins/tree.cpp b/openbr/plugins/tree.cpp index 7734c4a..61a4e1f 100644 --- a/openbr/plugins/tree.cpp +++ b/openbr/plugins/tree.cpp @@ -339,10 +339,6 @@ private: Mat samples = OpenCVUtils::toMat(data.data()); Mat labels = OpenCVUtils::toMat(File::get(data, inputVariable)); - for (int i=0; i(i,0) != 1) labels.at(i,0) = 0; - } - Mat types = Mat(samples.cols + 1, 1, CV_8U); types.setTo(Scalar(CV_VAR_NUMERICAL)); types.at(samples.cols, 0) = CV_VAR_CATEGORICAL; @@ -357,17 +353,6 @@ private: boost.train( samples, CV_ROW_SAMPLE, labels, Mat(), Mat(), types, Mat(), params); - - QTime timer; - timer.start(); - int correct = 0; - for (int i=0; i(i,0)) - correct++; - } - - qDebug("Time to classify %d samples: %d ms\nAccuracy: %f\nSample dimensionality: %d",samples.rows,timer.elapsed(),(float)correct/samples.rows,samples.cols); } void project(const Template &src, Template &dst) const -- libgit2 0.21.4