Commit 5905bd193566324cd9f8458e62991efafbfc942a
1 parent
ceb1187c
Exposed minNeighbors in sliding window
Showing
1 changed file
with
3 additions
and
1 deletions
openbr/plugins/imgproc/slidingwindow.cpp
| ... | ... | @@ -48,6 +48,7 @@ class SlidingWindowTransform : public MetaTransform |
| 48 | 48 | Q_PROPERTY(float scaleFactor READ get_scaleFactor WRITE set_scaleFactor RESET reset_scaleFactor STORED false) |
| 49 | 49 | Q_PROPERTY(float confidenceThreshold READ get_confidenceThreshold WRITE set_confidenceThreshold RESET reset_confidenceThreshold STORED false) |
| 50 | 50 | Q_PROPERTY(float eps READ get_eps WRITE set_eps RESET reset_eps STORED false) |
| 51 | + Q_PROPERTY(float minNeighbors READ get_minNeighbors WRITE set_minNeighbors RESET reset_minNeighbors STORED false) | |
| 51 | 52 | |
| 52 | 53 | BR_PROPERTY(br::Classifier*, classifier, NULL) |
| 53 | 54 | BR_PROPERTY(int, minSize, 20) |
| ... | ... | @@ -55,6 +56,7 @@ class SlidingWindowTransform : public MetaTransform |
| 55 | 56 | BR_PROPERTY(float, scaleFactor, 1.2) |
| 56 | 57 | BR_PROPERTY(float, confidenceThreshold, 10) |
| 57 | 58 | BR_PROPERTY(float, eps, 0.2) |
| 59 | + BR_PROPERTY(int, minNeighbors, 3) | |
| 58 | 60 | |
| 59 | 61 | void train(const TemplateList &data) |
| 60 | 62 | { |
| ... | ... | @@ -147,7 +149,7 @@ class SlidingWindowTransform : public MetaTransform |
| 147 | 149 | } |
| 148 | 150 | } |
| 149 | 151 | |
| 150 | - OpenCVUtils::group(rects, confidences, confidenceThreshold, eps); | |
| 152 | + OpenCVUtils::group(rects, confidences, confidenceThreshold, minNeighbors, eps); | |
| 151 | 153 | |
| 152 | 154 | if (!enrollAll && rects.empty()) { |
| 153 | 155 | rects.append(Rect(0, 0, m.cols, m.rows)); | ... | ... |