Commit e02add410fd93c638e144b18b744c47cd85a9855
1 parent
027ec345
added simmat and mask plugins
Showing
1 changed file
with
46 additions
and
0 deletions
sdk/plugins/format.cpp
| @@ -23,6 +23,8 @@ | @@ -23,6 +23,8 @@ | ||
| 23 | #include <opencv2/highgui/highgui.hpp> | 23 | #include <opencv2/highgui/highgui.hpp> |
| 24 | #include <openbr_plugin.h> | 24 | #include <openbr_plugin.h> |
| 25 | 25 | ||
| 26 | +#include "core/bee.h" | ||
| 27 | + | ||
| 26 | using namespace br; | 28 | using namespace br; |
| 27 | using namespace cv; | 29 | using namespace cv; |
| 28 | 30 | ||
| @@ -123,6 +125,50 @@ BR_REGISTER(Format, DefaultFormat) | @@ -123,6 +125,50 @@ BR_REGISTER(Format, DefaultFormat) | ||
| 123 | 125 | ||
| 124 | /*! | 126 | /*! |
| 125 | * \ingroup formats | 127 | * \ingroup formats |
| 128 | + * \brief Reads a NIST BEE similarity matrix. | ||
| 129 | + * \author Josh Klontz \cite jklontz | ||
| 130 | + */ | ||
| 131 | +class mtxFormat : public Format | ||
| 132 | +{ | ||
| 133 | + Q_OBJECT | ||
| 134 | + | ||
| 135 | + Template read() const | ||
| 136 | + { | ||
| 137 | + return BEE::readSimmat(file); | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + void write(const Template &t) const | ||
| 141 | + { | ||
| 142 | + BEE::writeSimmat(t, file); | ||
| 143 | + } | ||
| 144 | +}; | ||
| 145 | + | ||
| 146 | +BR_REGISTER(Format, mtxFormat) | ||
| 147 | + | ||
| 148 | +/*! | ||
| 149 | + * \ingroup formats | ||
| 150 | + * \brief Reads a NIST BEE mask matrix. | ||
| 151 | + * \author Josh Klontz \cite jklontz | ||
| 152 | + */ | ||
| 153 | +class maskFormat : public Format | ||
| 154 | +{ | ||
| 155 | + Q_OBJECT | ||
| 156 | + | ||
| 157 | + Template read() const | ||
| 158 | + { | ||
| 159 | + return BEE::readMask(file); | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + void write(const Template &t) const | ||
| 163 | + { | ||
| 164 | + BEE::writeMask(t, file); | ||
| 165 | + } | ||
| 166 | +}; | ||
| 167 | + | ||
| 168 | +BR_REGISTER(Format, maskFormat) | ||
| 169 | + | ||
| 170 | +/*! | ||
| 171 | + * \ingroup formats | ||
| 126 | * \brief Retrieves an image from a webcam. | 172 | * \brief Retrieves an image from a webcam. |
| 127 | * \author Josh Klontz \cite jklontz | 173 | * \author Josh Klontz \cite jklontz |
| 128 | */ | 174 | */ |