From b45ca3103e379640e4291ce782a9dbbc78f22d36 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 7 Apr 2015 15:17:53 -0400 Subject: [PATCH] lmat ==> lm --- openbr/plugins/cmake/likely.cmake | 4 ++-- openbr/plugins/format/lm.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ openbr/plugins/format/lmat.cpp | 40 ---------------------------------------- openbr/plugins/gallery/lm.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ openbr/plugins/gallery/lmat.cpp | 45 --------------------------------------------- 5 files changed, 87 insertions(+), 87 deletions(-) create mode 100644 openbr/plugins/format/lm.cpp delete mode 100644 openbr/plugins/format/lmat.cpp create mode 100644 openbr/plugins/gallery/lm.cpp delete mode 100644 openbr/plugins/gallery/lmat.cpp diff --git a/openbr/plugins/cmake/likely.cmake b/openbr/plugins/cmake/likely.cmake index ba894d6..6b7a114 100644 --- a/openbr/plugins/cmake/likely.cmake +++ b/openbr/plugins/cmake/likely.cmake @@ -5,6 +5,6 @@ if(${BR_WITH_LIKELY}) set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Likely_LIBS}) else() set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/core/likely.cpp) - set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/lmat.cpp) - set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/gallery/lmat.cpp) + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/lm.cpp) + set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/gallery/lm.cpp) endif() diff --git a/openbr/plugins/format/lm.cpp b/openbr/plugins/format/lm.cpp new file mode 100644 index 0000000..ac1308e --- /dev/null +++ b/openbr/plugins/format/lm.cpp @@ -0,0 +1,40 @@ +#include + +#include +#include + +namespace br +{ + +/*! + * \ingroup formats + * \brief Likely matrix format + * + * www.liblikely.org + * \author Josh Klontz \cite jklontz + */ +class lmFormat : public Format +{ + Q_OBJECT + + Template read() const + { + const likely_const_mat m = likely_read(qPrintable(file.name), likely_file_guess, likely_void); + 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, lmFormat) + +} // namespace br + +#include "format/lm.moc" diff --git a/openbr/plugins/format/lmat.cpp b/openbr/plugins/format/lmat.cpp deleted file mode 100644 index 9dc2ed2..0000000 --- a/openbr/plugins/format/lmat.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include - -#include -#include - -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, likely_void); - 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" diff --git a/openbr/plugins/gallery/lm.cpp b/openbr/plugins/gallery/lm.cpp new file mode 100644 index 0000000..606927e --- /dev/null +++ b/openbr/plugins/gallery/lm.cpp @@ -0,0 +1,45 @@ +#include +#include + +#include +#include + +namespace br +{ + +/*! + * \ingroup formats + * \brief Likely matrix format + * + * www.liblikely.org + * \author Josh Klontz \cite jklontz + */ +class lmGallery : public Gallery +{ + Q_OBJECT + QList mats; + + ~lmGallery() + { + const likely_const_mat m = likelyFromOpenCVMat(OpenCVUtils::toMatByRow(mats)); + likely_write(m, qPrintable(file.name)); + likely_release_mat(m); + } + + TemplateList readBlock(bool *done) + { + *done = true; + qFatal("Not supported."); + } + + void write(const Template &t) + { + mats.append(t); + } +}; + +BR_REGISTER(Gallery, lmGallery) + +} // namespace br + +#include "gallery/lm.moc" diff --git a/openbr/plugins/gallery/lmat.cpp b/openbr/plugins/gallery/lmat.cpp deleted file mode 100644 index 1818d01..0000000 --- a/openbr/plugins/gallery/lmat.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include - -#include -#include - -namespace br -{ - -/*! - * \ingroup formats - * \brief Likely matrix format - * - * www.liblikely.org - * \author Josh Klontz \cite jklontz - */ -class lmatGallery : public Gallery -{ - Q_OBJECT - QList mats; - - ~lmatGallery() - { - const likely_const_mat m = likelyFromOpenCVMat(OpenCVUtils::toMatByRow(mats)); - likely_write(m, qPrintable(file.name)); - likely_release_mat(m); - } - - TemplateList readBlock(bool *done) - { - *done = true; - qFatal("Not supported."); - } - - void write(const Template &t) - { - mats.append(t); - } -}; - -BR_REGISTER(Gallery, lmatGallery) - -} // namespace br - -#include "gallery/lmat.moc" -- libgit2 0.21.4