From c8ab003586006bd6a35a3c4c2e0e60f8fce4cda7 Mon Sep 17 00:00:00 2001 From: caotto Date: Sat, 19 Jan 2013 17:40:42 -0500 Subject: [PATCH] Surface the FaceVACS face detector's interoccular distance parameters --- sdk/plugins/ct8.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/plugins/ct8.cpp b/sdk/plugins/ct8.cpp index 0028ecc..22e16fe 100644 --- a/sdk/plugins/ct8.cpp +++ b/sdk/plugins/ct8.cpp @@ -270,7 +270,12 @@ protected: struct CT8Detect : public UntrainableTransform , public CT8Context { +public: Q_OBJECT + + Q_PROPERTY(float minRelEyeDistance READ get_minRelEyeDistance WRITE set_minRelEyeDistance RESET reset_minRelEyeDistance STORED false) + Q_PROPERTY(float maxRelEyeDistance READ get_maxRelEyeDistance WRITE set_maxRelEyeDistance RESET reset_maxRelEyeDistance STORED false) + // Perform face, then eye detection using the facevacs SDK void project(const Template &src, Template &dst) const { @@ -279,8 +284,7 @@ struct CT8Detect : public UntrainableTransform FRsdk::CountedPtr i(new FRsdk::OpenCVImageBody(src)); FRsdk::Image img(i); - // .01 here should be a parameter -cao - FRsdk::Face::LocationSet faceLocations = faceFinder->find(img, 0.01f); + FRsdk::Face::LocationSet faceLocations = faceFinder->find(img, minRelEyeDistance, maxRelEyeDistance); // If the face finder doesn't find anything mark the output as a failure if (faceLocations.empty() ) { @@ -324,6 +328,9 @@ struct CT8Detect : public UntrainableTransform if (!Globals->enrollAll && dst.isEmpty()) dst += Mat(); } +private: + BR_PROPERTY(float, minRelEyeDistance, 0.01f) + BR_PROPERTY(float, maxRelEyeDistance, 0.4f) }; BR_REGISTER(Transform, CT8Detect) -- libgit2 0.21.4