Commit ec6e08e70caee652a27f4dcdc01bd992e7157d3f

Authored by Josh Klontz
1 parent a8291d6a

Have Cascade propagate empty templates when enrollAll is false, for #207

Showing 1 changed file with 7 additions and 0 deletions
openbr/plugins/cascade.cpp
... ... @@ -379,6 +379,13 @@ class CascadeTransform : public MetaTransform
379 379 foreach (const Template &t, src) {
380 380 const bool enrollAll = t.file.getBool("enrollAll");
381 381  
  382 + // Mirror the behavior of ExpandTransform in the special case
  383 + // of an empty template.
  384 + if (t.empty() && !enrollAll) {
  385 + dst.append(t);
  386 + continue;
  387 + }
  388 +
382 389 for (int i=0; i<t.size(); i++) {
383 390 const Mat &m = t[i];
384 391 std::vector<Rect> rects;
... ...