diff --git a/openbr/plugins/cascade.cpp b/openbr/plugins/cascade.cpp index 218b031..d91ac89 100644 --- a/openbr/plugins/cascade.cpp +++ b/openbr/plugins/cascade.cpp @@ -379,6 +379,13 @@ class CascadeTransform : public MetaTransform foreach (const Template &t, src) { const bool enrollAll = t.file.getBool("enrollAll"); + // Mirror the behavior of ExpandTransform in the special case + // of an empty template. + if (t.empty() && !enrollAll) { + dst.append(t); + continue; + } + for (int i=0; i rects;