From e02add410fd93c638e144b18b744c47cd85a9855 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Mon, 14 Jan 2013 16:35:28 -0500 Subject: [PATCH] added simmat and mask plugins --- sdk/plugins/format.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+), 0 deletions(-) diff --git a/sdk/plugins/format.cpp b/sdk/plugins/format.cpp index 38fe03b..5ae57d4 100644 --- a/sdk/plugins/format.cpp +++ b/sdk/plugins/format.cpp @@ -23,6 +23,8 @@ #include #include +#include "core/bee.h" + using namespace br; using namespace cv; @@ -123,6 +125,50 @@ BR_REGISTER(Format, DefaultFormat) /*! * \ingroup formats + * \brief Reads a NIST BEE similarity matrix. + * \author Josh Klontz \cite jklontz + */ +class mtxFormat : public Format +{ + Q_OBJECT + + Template read() const + { + return BEE::readSimmat(file); + } + + void write(const Template &t) const + { + BEE::writeSimmat(t, file); + } +}; + +BR_REGISTER(Format, mtxFormat) + +/*! + * \ingroup formats + * \brief Reads a NIST BEE mask matrix. + * \author Josh Klontz \cite jklontz + */ +class maskFormat : public Format +{ + Q_OBJECT + + Template read() const + { + return BEE::readMask(file); + } + + void write(const Template &t) const + { + BEE::writeMask(t, file); + } +}; + +BR_REGISTER(Format, maskFormat) + +/*! + * \ingroup formats * \brief Retrieves an image from a webcam. * \author Josh Klontz \cite jklontz */ -- libgit2 0.21.4