From 0529fdedfd04b114668b8c057bea6406e3c31ad7 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Thu, 24 Jul 2014 12:30:41 -0400 Subject: [PATCH] Refactor FTE template exclusion --- openbr/frvt2012.cpp | 4 ++-- openbr/openbr_plugin.h | 4 +--- openbr/plugins/meta.cpp | 44 ++++++++++++++++++-------------------------- openbr/plugins/openbr_internal.h | 13 +++++++++++++ openbr/plugins/stream.cpp | 41 +++++++++++++++++------------------------ 5 files changed, 51 insertions(+), 55 deletions(-) diff --git a/openbr/frvt2012.cpp b/openbr/frvt2012.cpp index b0c2d29..654c108 100644 --- a/openbr/frvt2012.cpp +++ b/openbr/frvt2012.cpp @@ -133,7 +133,7 @@ int32_t SdkEstimator::estimate_age(const ONEFACE &input_face, int32_t &age) templates.append(templateFromONEFACE(input_face)); templates >> *frvt2012_age_transform.data(); age = templates.first().file.get("Age"); - return templates.first().file.failed() ? 4 : 0; + return templates.first().file.fte ? 4 : 0; } int32_t SdkEstimator::estimate_gender(const ONEFACE &input_face, int8_t &gender, double &mf) @@ -142,5 +142,5 @@ int32_t SdkEstimator::estimate_gender(const ONEFACE &input_face, int8_t &gender, templates.append(templateFromONEFACE(input_face)); templates >> *frvt2012_gender_transform.data(); mf = gender = templates.first().file.get("Gender") == "Male" ? 0 : 1; - return templates.first().file.failed() ? 4 : 0; + return templates.first().file.fte ? 4 : 0; } diff --git a/openbr/openbr_plugin.h b/openbr/openbr_plugin.h index 4873580..a4bde4c 100644 --- a/openbr/openbr_plugin.h +++ b/openbr/openbr_plugin.h @@ -308,8 +308,6 @@ struct BR_EXPORT File return result; } - inline bool failed() const { return fte; } /*!< \brief Returns \c true if the file failed to open or enroll, \c false otherwise. */ - QList namedPoints() const; /*!< \brief Returns points convertible from metadata keys. */ QList points() const; /*!< \brief Returns the file's points list. */ void appendPoint(const QPointF &point); /*!< \brief Adds a point to the file's point list. */ @@ -545,7 +543,7 @@ struct TemplateList : public QList