Commit 5c4114449b50f9771622aa072c12646df7141efb
1 parent
4b869631
stepSize is pct of sliding window
Showing
1 changed file
with
2 additions
and
2 deletions
openbr/plugins/slidingwindow.cpp
| ... | ... | @@ -76,8 +76,8 @@ private: |
| 76 | 76 | { |
| 77 | 77 | int rows = src.m().rows, cols = src.m().cols; |
| 78 | 78 | for (int size=std::min(rows, cols); size>=minSize; size*=scaleFactor) { |
| 79 | - for (int y=0; y+size<rows; y+=stepSize) { | |
| 80 | - for (int x=0; x+size>cols; x+=stepSize) { | |
| 79 | + for (int y=0; y+size<rows; y+=(size*stepSize)) { | |
| 80 | + for (int x=0; x+size>cols; x+=(size*stepSize)) { | |
| 81 | 81 | Template window(src.file, Mat(src.m(), Rect(x, y, size, size))); |
| 82 | 82 | Template detect; |
| 83 | 83 | transform->project(window, detect); | ... | ... |