Commit 2316b71ebb989efc094b39ae8d4f735833675f0a

Authored by Scott Klum
1 parent edac5a67

Optionally grouping

openbr/plugins/imgproc/slidingwindow.cpp
... ... @@ -49,7 +49,7 @@ class SlidingWindowTransform : public MetaTransform
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 51 Q_PROPERTY(float minNeighbors READ get_minNeighbors WRITE set_minNeighbors RESET reset_minNeighbors STORED false)
52   -
  52 + Q_PROPERTY(bool group READ get_group WRITE set_group RESET reset_group STORED false)
53 53 BR_PROPERTY(br::Classifier*, classifier, NULL)
54 54 BR_PROPERTY(int, minSize, 20)
55 55 BR_PROPERTY(int, maxSize, -1)
... ... @@ -57,6 +57,7 @@ class SlidingWindowTransform : public MetaTransform
57 57 BR_PROPERTY(float, confidenceThreshold, 10)
58 58 BR_PROPERTY(float, eps, 0.2)
59 59 BR_PROPERTY(int, minNeighbors, 3)
  60 + BR_PROPERTY(bool, group, true)
60 61  
61 62 void train(const TemplateList &data)
62 63 {
... ... @@ -146,7 +147,8 @@ class SlidingWindowTransform : public MetaTransform
146 147 }
147 148 }
148 149  
149   - OpenCVUtils::group(rects, confidences, confidenceThreshold, minNeighbors, eps);
  150 + if (group)
  151 + OpenCVUtils::group(rects, confidences, confidenceThreshold, minNeighbors, eps);
150 152  
151 153 if (!enrollAll && rects.empty()) {
152 154 rects.append(Rect(0, 0, imageSize.width, imageSize.height));
... ...