From fac59bd2b26769f7e6c67412509c918feb0d29ae Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Sun, 10 Mar 2013 12:34:36 -0400 Subject: [PATCH] Merging --- sdk/plugins/regions.cpp | 2 +- sdk/plugins/stasm.cpp | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sdk/plugins/regions.cpp b/sdk/plugins/regions.cpp index 7f9aeb1..3bc9425 100644 --- a/sdk/plugins/regions.cpp +++ b/sdk/plugins/regions.cpp @@ -149,7 +149,7 @@ class RectFromLandmarksTransform : public UntrainableTransform void project(const Template &src, Template &dst) const { if (src.file.landmarks().isEmpty()) { - qWarning("No landmarks"); + qWarning("No landmarks for %s", qPrintable(src.file.fileName())); dst = src; return; } diff --git a/sdk/plugins/stasm.cpp b/sdk/plugins/stasm.cpp index 2f8305c..385d5c2 100644 --- a/sdk/plugins/stasm.cpp +++ b/sdk/plugins/stasm.cpp @@ -20,9 +20,9 @@ class StasmInitializer : public Initializer { Globals->abbreviations.insert("RectFromStasmEyes","RectFromLandmarks([27, 28, 29, 30, 31, 32, 33, 34, 35, 36],0.125,6.0)+Resize(44,168)"); // Globals->abbreviations.insert("RectFromStasmJaw","RectFromLandmarks([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],10)"); - Globals->abbreviations.insert("RectFromStasmBrow","RectFromLandmarks([15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],0.05,6.5)+Resize(44,230)"); - Globals->abbreviations.insert("RectFromStasmNose","RectFromLandmarks([37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47],0.05,1.25)"); - Globals->abbreviations.insert("RectFromStasmMouth","RectFromLandmarks([48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66],0.15,3.0)+Resize(44,110)"); + Globals->abbreviations.insert("RectFromStasmBrow","RectFromLandmarks([15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],0.25,6.5)+Resize(44,230)"); + Globals->abbreviations.insert("RectFromStasmNose","RectFromLandmarks([38, 39, 40, 41, 42, 43, 44, 67],0.1,1.5)+Resize(44,44)"); + Globals->abbreviations.insert("RectFromStasmMouth","RectFromLandmarks([48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66],0.3,3.0)+Resize(44,110)"); } }; @@ -53,13 +53,16 @@ class StasmTransform : public UntrainableTransform src.m(), (src.m().channels() == 3), qPrintable(Globals->sdkPath + "/share/openbr/models/stasm/mu-68-1d.conf"), qPrintable(Globals->sdkPath + "/share/openbr/models/stasm/mu-76-2d.conf"), qPrintable(Globals->sdkPath + "/share/openbr/models/stasm/")); if (nlandmarks == 0) { - qWarning("Unable to detect Stasm landmarks"); + qWarning("Unable to detect Stasm landmarks for %s", qPrintable(src.file.fileName())); dst.file.setBool("FTE"); - dst.m() = Mat(); + dst.m() = src.m(); + return; } for (int i = 0; i < nlandmarks; i++) dst.file.appendLandmark(QPointF(landmarks[2 * i], landmarks[2 * i + 1])); + + dst.m() = src.m(); } }; -- libgit2 0.21.4