From 2bd7f5b26fa9ecfc72ee3093f494df52c594a363 Mon Sep 17 00:00:00 2001 From: JordanCheney Date: Fri, 12 Dec 2014 11:48:36 -0500 Subject: [PATCH] Implementation of Classification Interface --- openbr/openbr_plugin.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+), 0 deletions(-) diff --git a/openbr/openbr_plugin.h b/openbr/openbr_plugin.h index e5e09c2..da9b8d0 100644 --- a/openbr/openbr_plugin.h +++ b/openbr/openbr_plugin.h @@ -1376,6 +1376,28 @@ private: { (void) targetGallery; (void) queryGallery; (void) output; return false; } }; +class BR_EXPORT Representation : public Object +{ + Q_OBJECT + +public: + virtual ~Representation() {} + + virtual cv::Mat init(cv::Mat &image) const; + virtual QList evaluate(const cv::Mat &image, const QList &indices) const; +}; + +class BR_EXPORT Classifier : public Object +{ + Q_OBJECT + +public: + virtual ~Classifier() {} + + virtual void train(const QList &images, const QList &labels); + virtual float classify(const QList &image) const; +}; + /*! * \brief Returns \c true if the algorithm is a classifier, \c false otherwise. * -- libgit2 0.21.4