Commit a585324de115493ff67044bfb7023bdc5d3c1f46

Authored by Brendan Klare
2 parents d1a00190 919686eb

Merge branch 'master' of https://github.com/biometrics/openbr

openbr/plugins/slidingwindow.cpp
... ... @@ -78,15 +78,20 @@ private:
78 78 stream >> windowHeight;
79 79 }
80 80  
81   -protected: // Let IntegralSlidingWindowTransform access this
82 81 void project(const Template &src, Template &dst) const
83 82 {
  83 + float scale = src.file.get<float>("scale", 1);
  84 + projectHelp(src, dst, windowWidth, windowHeight, scale);
  85 + }
  86 +
  87 +protected: // Let IntegralSlidingWindowTransform access this
  88 + void projectHelp(const Template &src, Template &dst, int windowWidth, int windowHeight, float scale = 1) const
  89 + {
84 90 dst = src;
85 91 // no need to slide a window over ground truth data
86 92 if (src.file.getBool("Train", false)) return;
87 93  
88 94 dst.file.clearRects();
89   - float scale = src.file.get<float>("scale", 1);
90 95 Template windowTemplate(src.file, src);
91 96 QList<float> confidences = dst.file.getList<float>("Confidences", QList<float>());
92 97 for (float y = 0; y + windowHeight < src.m().rows; y += windowHeight*stepFraction) {
... ... @@ -125,7 +130,7 @@ class IntegralSlidingWindowTransform : public SlidingWindowTransform
125 130 void project(const Template &src, Template &dst) const
126 131 {
127 132 // TODO: call SlidingWindowTransform::project on multiple scales
128   - SlidingWindowTransform::project(src, dst);
  133 + SlidingWindowTransform::projectHelp(src, dst, 24, 24);
129 134 }
130 135 };
131 136  
... ...