From 9756e99f471fcb434e4ebcb61b7f4d3254ccca1e Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Wed, 24 Jul 2013 14:49:56 -0400 Subject: [PATCH] implemented FDDB file format --- openbr/plugins/gallery.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+), 0 deletions(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 030f250..03e45ab 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -881,6 +881,45 @@ class statGallery : public Gallery BR_REGISTER(Gallery, statGallery) +/*! + * \ingroup galleries + * \brief Implements the FDDB detection format. + * \author Josh Klontz \cite jklontz + * + * http://vis-www.cs.umass.edu/fddb/README.txt + */ +class FDDBGallery : public Gallery +{ + Q_OBJECT + + TemplateList readBlock(bool *done) + { + *done = true; + QStringList lines = QtUtils::readLines(file); + TemplateList templates; + while (!lines.empty()) { + const QString fileName = lines.takeFirst(); + int numDetects = lines.takeFirst().toInt(); + for (int i=0; i