diff --git a/sdk/plugins/meta.cpp b/sdk/plugins/meta.cpp index ce5a69b..a3b99a5 100644 --- a/sdk/plugins/meta.cpp +++ b/sdk/plugins/meta.cpp @@ -26,13 +26,13 @@ using namespace cv; namespace br { -static TemplateList Simplified(const TemplateList &templates) +static TemplateList Expanded(const TemplateList &templates) { - TemplateList simplified; + TemplateList expanded; foreach (const Template &t, templates) { if (t.isEmpty()) { if (!t.file.getBool("enrollAll")) - simplified.append(t); + expanded.append(t); continue; } @@ -46,13 +46,13 @@ static TemplateList Simplified(const TemplateList &templates) for (int i=0; i=0; i--){ + for (int i=length-1; i>=0; i--) { Transform *f = transforms.at(i); try { src >> *f; @@ -156,18 +156,17 @@ class PipeTransform : public MetaTransform } } } - }; BR_REGISTER(Transform, PipeTransform) /*! * \ingroup transforms - * \brief Transforms in series. + * \brief Transforms in series with expansion step. * \author Josh Klontz \cite jklontz * * The source br::Template is given to the first transform and the resulting br::Template is passed to the next transform, etc. - * Each matrix is reorganized into a new template before continuing. + * Each matrix is expanded into its own template between steps. * * \see PipeTransform */ @@ -185,7 +184,7 @@ class ExpandTransform : public MetaTransform for (int i=0; itrain(copy); copy >> *transforms[i]; - copy = Simplified(copy); + copy = Expanded(copy); incrementStep(); } @@ -211,17 +210,16 @@ class ExpandTransform : public MetaTransform dst = src; for (int i=0; i> *transforms[i]; - dst = Simplified(dst); + dst = Expanded(dst); } } void backProject(const Template &dst, Template &src) const { src = dst; - //reverse order in which transforms are processed + // Reverse order in which transforms are processed int length = transforms.length(); - //foreach (const Transform *f, transforms) { - for (int i=length-1; i>=0; i--){ + for (int i=length-1; i>=0; i--) { Transform *f = transforms.at(i); try { src >> *f; @@ -242,6 +240,8 @@ BR_REGISTER(Transform, ExpandTransform) * \author Josh Klontz \cite jklontz * * The source br::Template is seperately given to each transform and the results are appended together. + * + * \see PipeTransform */ class ForkTransform : public MetaTransform {