diff --git a/openbr/plugins/slidingwindow.cpp b/openbr/plugins/slidingwindow.cpp index 81468c8..8d38226 100644 --- a/openbr/plugins/slidingwindow.cpp +++ b/openbr/plugins/slidingwindow.cpp @@ -380,8 +380,10 @@ private: QList rects; QList confidences; foreach (const Template &t, src) { - rects.append(OpenCVUtils::toRect(t.file.get("Detection"))); - confidences.append(t.file.get("Confidence")); + if (t.file.contains("Detection")) { + rects.append(OpenCVUtils::toRect(t.file.get("Detection"))); + confidences.append(t.file.get("Confidence")); + } } // Compute overlap between rectangles and create discrete Laplacian matrix