From 17e0d318c059c7260321409367dc04db878153cc Mon Sep 17 00:00:00 2001 From: Brendan Klare Date: Tue, 10 Dec 2013 12:22:31 -0500 Subject: [PATCH] Block project only when this transform is trained --- openbr/plugins/slidingwindow.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openbr/plugins/slidingwindow.cpp b/openbr/plugins/slidingwindow.cpp index a86b97d..745cdbe 100644 --- a/openbr/plugins/slidingwindow.cpp +++ b/openbr/plugins/slidingwindow.cpp @@ -94,8 +94,10 @@ private: void project(const Template &src, Template &dst) const { dst = src; - // no need to slide a window over ground truth data - if (src.file.getBool("Train", false)) return; + if (skipProject) { + dst = src; + return; + } dst.file.clearRects(); float scale = src.file.get("scale", 1); @@ -255,7 +257,10 @@ private: void project(const Template &src, Template &dst) const { dst = src; - // do not scale images during training + if (skipProject) { + dst = src; + return; + } if (src.file.getBool("Train", false)) return; int rows = src.m().rows; -- libgit2 0.21.4