From ac20fcb83ec1f780565ce7d35400b6674f68310f Mon Sep 17 00:00:00 2001 From: Brendan Klare Date: Mon, 2 Dec 2013 21:33:09 -0500 Subject: [PATCH] Bug fix in FaceFromEyes parameters --- openbr/plugins/regions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbr/plugins/regions.cpp b/openbr/plugins/regions.cpp index b634ed3..c6fe0e5 100644 --- a/openbr/plugins/regions.cpp +++ b/openbr/plugins/regions.cpp @@ -372,7 +372,7 @@ class FaceFromEyesTransform : public UntrainableTransform BR_PROPERTY(double, widthPadding, 0.7) BR_PROPERTY(double, verticalLocation, 0.25) BR_PROPERTY(int, leftEyeIdx, 0) - BR_PROPERTY(int, rightEyeIdx, 0) + BR_PROPERTY(int, rightEyeIdx, 1) void project(const Template &src, Template &dst) const { @@ -384,8 +384,8 @@ class FaceFromEyesTransform : public UntrainableTransform return; } - QPointF eyeL = src.file.points()[0]; - QPointF eyeR = src.file.points()[1]; + QPointF eyeL = src.file.points()[leftEyeIdx]; + QPointF eyeR = src.file.points()[rightEyeIdx]; QPointF eyeCenter((eyeL.x() + eyeR.x()) / 2, (eyeL.y() + eyeR.y()) / 2); float ipd = sqrt(pow(eyeL.x() - eyeR.x(), 2) + pow(eyeL.y() - eyeR.y(), 2)); float width = ipd + 2 * widthPadding * ipd; -- libgit2 0.21.4