From f3b973b63014faa6a1393c15916b7c2d1638d165 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Tue, 14 Oct 2014 20:37:44 -0400 Subject: [PATCH] Removed unused DownsampleMetadata transform that also duplicated some functionality --- openbr/plugins/independent.cpp | 35 ----------------------------------- 1 file changed, 0 insertions(+), 35 deletions(-) diff --git a/openbr/plugins/independent.cpp b/openbr/plugins/independent.cpp index 998ed92..0039032 100644 --- a/openbr/plugins/independent.cpp +++ b/openbr/plugins/independent.cpp @@ -93,7 +93,6 @@ class DownsampleTrainingTransform : public Transform BR_PROPERTY(QStringList, gallery, QStringList()) BR_PROPERTY(QStringList, subjects, QStringList()) - Transform *simplify(bool &newTForm) { Transform *res = transform->simplify(newTForm); @@ -118,40 +117,6 @@ class DownsampleTrainingTransform : public Transform }; BR_REGISTER(Transform, DownsampleTrainingTransform) -class DownsampleMetadataTransform : public Transform -{ - Q_OBJECT - Q_PROPERTY(br::Transform* transform READ get_transform WRITE set_transform RESET reset_transform STORED true) - Q_PROPERTY(QString inputVariable READ get_inputVariable WRITE set_inputVariable RESET reset_inputVariable STORED false) - BR_PROPERTY(br::Transform*, transform, NULL) - BR_PROPERTY(QString, inputVariable, "Label") - - Transform *simplify(bool &newTForm) - { - Transform *res = transform->simplify(newTForm); - return res; - } - - void project(const Template &src, Template &dst) const - { - transform->project(src,dst); - } - - void train(const TemplateList &data) - { - if (!transform || !transform->trainable) - return; - - TemplateList downsampled = data; - for (int i=downsampled.size()-1; i>=0; i--) - if (!downsampled[i].file.contains(inputVariable)) - downsampled.removeAt(i); - - transform->train(downsampled); - } -}; -BR_REGISTER(Transform, DownsampleMetadataTransform) - /*! * \ingroup transforms * \brief Clones the transform so that it can be applied independently. -- libgit2 0.21.4