Commit 2bd7f5b26fa9ecfc72ee3093f494df52c594a363

Authored by JordanCheney
1 parent d24c2952

Implementation of Classification Interface

Showing 1 changed file with 22 additions and 0 deletions
openbr/openbr_plugin.h
... ... @@ -1376,6 +1376,28 @@ private:
1376 1376 { (void) targetGallery; (void) queryGallery; (void) output; return false; }
1377 1377 };
1378 1378  
  1379 +class BR_EXPORT Representation : public Object
  1380 +{
  1381 + Q_OBJECT
  1382 +
  1383 +public:
  1384 + virtual ~Representation() {}
  1385 +
  1386 + virtual cv::Mat init(cv::Mat &image) const;
  1387 + virtual QList<float> evaluate(const cv::Mat &image, const QList<int> &indices) const;
  1388 +};
  1389 +
  1390 +class BR_EXPORT Classifier : public Object
  1391 +{
  1392 + Q_OBJECT
  1393 +
  1394 +public:
  1395 + virtual ~Classifier() {}
  1396 +
  1397 + virtual void train(const QList<cv::Mat> &images, const QList<int> &labels);
  1398 + virtual float classify(const QList<cv::Mat> &image) const;
  1399 +};
  1400 +
1379 1401 /*!
1380 1402 * \brief Returns \c true if the algorithm is a classifier, \c false otherwise.
1381 1403 *
... ...