diff --git a/openbr/plugins/stasm4.cpp b/openbr/plugins/stasm4.cpp index 9dff4d6..eafb374 100644 --- a/openbr/plugins/stasm4.cpp +++ b/openbr/plugins/stasm4.cpp @@ -64,8 +64,8 @@ class StasmTransform : public UntrainableTransform BR_PROPERTY(bool, stasm3Format, false) Q_PROPERTY(bool clearLandmarks READ get_clearLandmarks WRITE set_clearLandmarks RESET reset_clearLandmarks STORED false) BR_PROPERTY(bool, clearLandmarks, false) - Q_PROPERTY(QVariantList pinEyes READ get_pinEyes WRITE set_pinEyes RESET reset_pinEyes STORED false) - BR_PROPERTY(QVariantList, pinEyes, QVariantList()) + Q_PROPERTY(QStringList pinEyes READ get_pinEyes WRITE set_pinEyes RESET reset_pinEyes STORED false) + BR_PROPERTY(QStringList, pinEyes, QStringList()) Resource stasmCascadeResource; @@ -102,19 +102,15 @@ class StasmTransform : public UntrainableTransform QPointF leftEye; if (src.file.contains("Affine_0") && src.file.contains("Affine_1")) { - rightEye = pinEyes.at(0).toPointF(); - leftEye = pinEyes.at(1).toPointF(); - if (!rightEye.isNull() && !leftEye.isNull()) - ok = true; + rightEye = QtUtils::toPoint(pinEyes.at(0),&ok); + leftEye = QtUtils::toPoint(pinEyes.at(1),&ok); } if (!ok) { - QString r = pinEyes.at(0).toString(); - QString l = pinEyes.at(1).toString(); - if (!r.isNull() && !l.isNull() && src.file.contains(r) && src.file.contains(l)) + if (src.file.contains(pinEyes.at(0)) && src.file.contains(pinEyes.at(1))) { - rightEye = src.file.get(pinEyes.at(0).toString(), QPointF()); - leftEye = src.file.get(pinEyes.at(1).toString(), QPointF()); + rightEye = src.file.get(pinEyes.at(0), QPointF()); + leftEye = src.file.get(pinEyes.at(1), QPointF()); ok = true; } }