From faddb0ef12aaff2f7afc7d347b749f4e95c0fc39 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Thu, 2 Oct 2014 11:47:31 -0400 Subject: [PATCH] Reverted such that this branch only contains stasm fixes --- openbr/plugins/filter.cpp | 3 +-- openbr/plugins/svm.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/openbr/plugins/filter.cpp b/openbr/plugins/filter.cpp index c57ca1c..54b96d4 100644 --- a/openbr/plugins/filter.cpp +++ b/openbr/plugins/filter.cpp @@ -45,8 +45,7 @@ class GammaTransform : public UntrainableTransform void project(const Template &src, Template &dst) const { - if (src.m().depth() == CV_8U) LUT(src, lut, dst); - else pow(src, gamma, dst); + LUT(src, lut, dst); } }; diff --git a/openbr/plugins/svm.cpp b/openbr/plugins/svm.cpp index b7c3161..d24f674 100644 --- a/openbr/plugins/svm.cpp +++ b/openbr/plugins/svm.cpp @@ -74,7 +74,7 @@ static void trainSVM(SVM &svm, Mat data, Mat lab, int kernel, int type, float C, svm.train_auto(data, lab, Mat(), Mat(), params, 5); } catch (...) { qWarning("Some classes do not contain sufficient examples or are not discriminative enough for accurate SVM classification."); - svm.train(data, lab, Mat(), Mat(), params); + svm.train(data, lab); } } else { params.C = C; @@ -161,8 +161,7 @@ private: dst.m().at(0, 0) = prediction; // positive values ==> first class // negative values ==> second class - if (type != EPS_SVR && type != NU_SVR) - prediction = prediction > 0 ? 0 : 1; + prediction = prediction > 0 ? 0 : 1; } if (type == EPS_SVR || type == NU_SVR) { dst.file.set(outputVariable, prediction); -- libgit2 0.21.4