From 097e9105746eaf97f61ba5997fb0caf0d3f9de8e Mon Sep 17 00:00:00 2001 From: Brendan Klare Date: Thu, 17 Oct 2013 17:37:42 -0400 Subject: [PATCH] FDDB import to list of rects for slidingWindow compatability --- openbr/plugins/gallery.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 43a52b2..1549bcd 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -857,18 +857,21 @@ class FDDBGallery : public Gallery for (int i=0; i faceList; //to be consistent with slidingWindow if (detect.size() == 5) { //rectangle - t.file.set("Face", QRectF(detect[0].toFloat(), detect[1].toFloat(), detect[2].toFloat(), detect[3].toFloat())); + faceList.append(QRectF(detect[0].toFloat(), detect[1].toFloat(), detect[2].toFloat(), detect[3].toFloat())); t.file.set("Confidence", detect[4].toFloat()); } else if (detect.size() == 6) { //ellipse float x = detect[3].toFloat(), y = detect[4].toFloat(), radius = detect[1].toFloat(); - t.file.set("Face", QRectF(x - radius,y - radius,radius * 2.0, radius * 2.0)); + faceList.append(QRectF(x - radius,y - radius,radius * 2.0, radius * 2.0)); t.file.set("Confidence", detect[5].toFloat()); } else { qFatal("Unknown FDDB annotation format."); } + t.file.set("Face", faceList); + t.file.set("Label",QString("face")); templates.append(t); } } -- libgit2 0.21.4