From 9622f9b919190efd292c13fec1685d07005ede0c Mon Sep 17 00:00:00 2001 From: JordanCheney Date: Wed, 21 Jan 2015 16:27:36 -0500 Subject: [PATCH] Make representation trainable and allow classifiers to return raw score --- openbr/openbr_plugin.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openbr/openbr_plugin.h b/openbr/openbr_plugin.h index 215513a..cd0ca79 100644 --- a/openbr/openbr_plugin.h +++ b/openbr/openbr_plugin.h @@ -1385,6 +1385,7 @@ public: static Representation *make(QString str, QObject *parent); /*!< \brief Make a representation from a string. */ virtual cv::Mat preprocess(const cv::Mat &image) const { return image; } + virtual void train(const QList &images, const QList &labels) { (void) images; (void)labels; } // By convention, an empty indices list will result in all feature responses being calculated // and returned. virtual cv::Mat evaluate(const cv::Mat &image, const QList &indices = QList()) const = 0; @@ -1400,7 +1401,7 @@ public: static Classifier *make(QString str, QObject *parent); /*!< \brief Make a classifier from a string. */ virtual void train(const QList &images, const QList &labels) = 0; - virtual float classify(const cv::Mat &image) const = 0; + virtual float classify(const cv::Mat &image, bool returnSum = false) const = 0; }; /*! -- libgit2 0.21.4