Commit 17e0d318c059c7260321409367dc04db878153cc

Authored by Brendan Klare
1 parent 52484e12

Block project only when this transform is trained

openbr/plugins/slidingwindow.cpp
@@ -94,8 +94,10 @@ private: @@ -94,8 +94,10 @@ private:
94 void project(const Template &src, Template &dst) const 94 void project(const Template &src, Template &dst) const
95 { 95 {
96 dst = src; 96 dst = src;
97 - // no need to slide a window over ground truth data  
98 - if (src.file.getBool("Train", false)) return; 97 + if (skipProject) {
  98 + dst = src;
  99 + return;
  100 + }
99 101
100 dst.file.clearRects(); 102 dst.file.clearRects();
101 float scale = src.file.get<float>("scale", 1); 103 float scale = src.file.get<float>("scale", 1);
@@ -255,7 +257,10 @@ private: @@ -255,7 +257,10 @@ private:
255 void project(const Template &src, Template &dst) const 257 void project(const Template &src, Template &dst) const
256 { 258 {
257 dst = src; 259 dst = src;
258 - // do not scale images during training 260 + if (skipProject) {
  261 + dst = src;
  262 + return;
  263 + }
259 if (src.file.getBool("Train", false)) return; 264 if (src.file.getBool("Train", false)) return;
260 265
261 int rows = src.m().rows; 266 int rows = src.m().rows;