Commit 7b34a1cb92fdfe64a5650c9b1b379c96776e6481
1 parent
b91d2ea5
copied special case to SlidingWindow
Showing
1 changed file
with
9 additions
and
0 deletions
openbr/plugins/imgproc/slidingwindow.cpp
| ... | ... | @@ -77,6 +77,15 @@ class SlidingWindowTransform : public MetaTransform |
| 77 | 77 | Size maxObjectSize; |
| 78 | 78 | |
| 79 | 79 | foreach (const Template &t, src) { |
| 80 | + // As a special case, skip detection if the appropriate metadata already exists | |
| 81 | + if (t.file.contains("Face")) { | |
| 82 | + Template u = t; | |
| 83 | + u.file.setRects(QList<QRectF>() << t.file.get<QRectF>("Face")); | |
| 84 | + u.file.set("Confidence", t.file.get<float>("Confidence", 1)); | |
| 85 | + dst.append(u); | |
| 86 | + continue; | |
| 87 | + } | |
| 88 | + | |
| 80 | 89 | const bool enrollAll = t.file.getBool("enrollAll"); |
| 81 | 90 | |
| 82 | 91 | // Mirror the behavior of ExpandTransform in the special case | ... | ... |