From fbc931c834c3e44e7c999197b07d28c68cae7887 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Wed, 27 Feb 2013 11:48:07 -0500 Subject: [PATCH] better reduction support --- sdk/openbr_plugin.cpp | 1 + sdk/openbr_plugin.h | 11 +++++++++++ sdk/plugins/gallery.cpp | 6 +++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sdk/openbr_plugin.cpp b/sdk/openbr_plugin.cpp index 1725014..3b5ed91 100644 --- a/sdk/openbr_plugin.cpp +++ b/sdk/openbr_plugin.cpp @@ -452,6 +452,7 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) foreach (const br::File &file, gallery.split()) { QScopedPointer i(Gallery::make(file)); TemplateList newTemplates = i->read(); + if (gallery.getBool("reduce")) newTemplates = newTemplates.reduced(); const int crossValidate = gallery.getInt("crossValidate"); if (crossValidate > 0) srand(0); diff --git a/sdk/openbr_plugin.h b/sdk/openbr_plugin.h index 83a901a..33ed8d1 100644 --- a/sdk/openbr_plugin.h +++ b/sdk/openbr_plugin.h @@ -393,6 +393,17 @@ struct TemplateList : public QList