From 3b6db8cde7d43ef0123b73793c1edc039e94daad Mon Sep 17 00:00:00 2001 From: Brendan Klare Date: Tue, 27 May 2014 20:48:48 -0400 Subject: [PATCH] Adding svm regressor output to dst template data --- openbr/plugins/svm.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openbr/plugins/svm.cpp b/openbr/plugins/svm.cpp index 27aecea..c374586 100644 --- a/openbr/plugins/svm.cpp +++ b/openbr/plugins/svm.cpp @@ -163,9 +163,12 @@ private: // negative values ==> second class prediction = prediction > 0 ? 0 : 1; } - if (type == EPS_SVR || type == NU_SVR) + if (type == EPS_SVR || type == NU_SVR) { dst.file.set(outputVariable, prediction); - else + dst.m() = Mat(1, 1, CV_32F); + dst.m().at(0, 0) = prediction; + + } else dst.file.set(outputVariable, reverseLookup[prediction]); } -- libgit2 0.21.4