From 7b34a1cb92fdfe64a5650c9b1b379c96776e6481 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 30 Jun 2015 11:20:04 -0400 Subject: [PATCH] copied special case to SlidingWindow --- openbr/plugins/imgproc/slidingwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) diff --git a/openbr/plugins/imgproc/slidingwindow.cpp b/openbr/plugins/imgproc/slidingwindow.cpp index 686dfd3..36ec0f3 100644 --- a/openbr/plugins/imgproc/slidingwindow.cpp +++ b/openbr/plugins/imgproc/slidingwindow.cpp @@ -77,6 +77,15 @@ class SlidingWindowTransform : public MetaTransform Size maxObjectSize; foreach (const Template &t, src) { + // As a special case, skip detection if the appropriate metadata already exists + if (t.file.contains("Face")) { + Template u = t; + u.file.setRects(QList() << t.file.get("Face")); + u.file.set("Confidence", t.file.get("Confidence", 1)); + dst.append(u); + continue; + } + const bool enrollAll = t.file.getBool("enrollAll"); // Mirror the behavior of ExpandTransform in the special case -- libgit2 0.21.4