lmat.cpp
739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <openbr/plugins/openbr_internal.h>
namespace br
{
/*!
* \ingroup formats
* \brief Likely matrix format
*
* www.liblikely.org
* \author Josh Klontz \cite jklontz
*/
class lmatFormat : public Format
{
Q_OBJECT
Template read() const
{
const likely_const_mat m = likely_read(qPrintable(file.name), likely_file_guess);
const Template result(likelyToOpenCVMat(m));
likely_release_mat(m);
return result;
}
void write(const Template &t) const
{
const likely_const_mat m = likelyFromOpenCVMat(t);
likely_write(m, qPrintable(file.name));
likely_release_mat(m);
}
};
BR_REGISTER(Format, lmatFormat)
} // namespace br
#include "format/lmat.moc"