From 0a8576dc8e4e136126cdf508a8b9fa05bec1e221 Mon Sep 17 00:00:00 2001 From: Austin Van Blanton Date: Thu, 22 Aug 2013 11:09:15 -0400 Subject: [PATCH] x, y, and size should be doubles (stepSize and scaleFactor are doubles) --- openbr/plugins/slidingwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbr/plugins/slidingwindow.cpp b/openbr/plugins/slidingwindow.cpp index 3575d56..7bb8cb4 100644 --- a/openbr/plugins/slidingwindow.cpp +++ b/openbr/plugins/slidingwindow.cpp @@ -75,9 +75,9 @@ private: void project(const Template &src, Template &dst) const { int rows = src.m().rows, cols = src.m().cols; - for (int size=std::min(rows, cols); size>=minSize; size*=scaleFactor) { - for (int y=0; y+sizecols; x+=(size*stepSize)) { + for (double size=std::min(rows, cols); size>=minSize; size*=scaleFactor) { + for (double y=0; y+sizecols; x+=(size*stepSize)) { Template window(src.file, Mat(src.m(), Rect(x, y, size, size))); Template detect; transform->project(window, detect); -- libgit2 0.21.4