Commit faddb0ef12aaff2f7afc7d347b749f4e95c0fc39

Authored by Scott Klum
1 parent 09be749f

Reverted such that this branch only contains stasm fixes

openbr/plugins/filter.cpp
@@ -45,8 +45,7 @@ class GammaTransform : public UntrainableTransform @@ -45,8 +45,7 @@ class GammaTransform : public UntrainableTransform
45 45
46 void project(const Template &src, Template &dst) const 46 void project(const Template &src, Template &dst) const
47 { 47 {
48 - if (src.m().depth() == CV_8U) LUT(src, lut, dst);  
49 - else pow(src, gamma, dst); 48 + LUT(src, lut, dst);
50 } 49 }
51 }; 50 };
52 51
openbr/plugins/svm.cpp
@@ -74,7 +74,7 @@ static void trainSVM(SVM &svm, Mat data, Mat lab, int kernel, int type, float C, @@ -74,7 +74,7 @@ static void trainSVM(SVM &svm, Mat data, Mat lab, int kernel, int type, float C,
74 svm.train_auto(data, lab, Mat(), Mat(), params, 5); 74 svm.train_auto(data, lab, Mat(), Mat(), params, 5);
75 } catch (...) { 75 } catch (...) {
76 qWarning("Some classes do not contain sufficient examples or are not discriminative enough for accurate SVM classification."); 76 qWarning("Some classes do not contain sufficient examples or are not discriminative enough for accurate SVM classification.");
77 - svm.train(data, lab, Mat(), Mat(), params); 77 + svm.train(data, lab);
78 } 78 }
79 } else { 79 } else {
80 params.C = C; 80 params.C = C;
@@ -161,8 +161,7 @@ private: @@ -161,8 +161,7 @@ private:
161 dst.m().at<float>(0, 0) = prediction; 161 dst.m().at<float>(0, 0) = prediction;
162 // positive values ==> first class 162 // positive values ==> first class
163 // negative values ==> second class 163 // negative values ==> second class
164 - if (type != EPS_SVR && type != NU_SVR)  
165 - prediction = prediction > 0 ? 0 : 1; 164 + prediction = prediction > 0 ? 0 : 1;
166 } 165 }
167 if (type == EPS_SVR || type == NU_SVR) { 166 if (type == EPS_SVR || type == NU_SVR) {
168 dst.file.set(outputVariable, prediction); 167 dst.file.set(outputVariable, prediction);