Commit 967d7b03f2026f54af60fd41aa219289057e5380
1 parent
a4bb8f4c
Revert "Implemented variantlist instead of stringlist"
This reverts commit 09be749f8dad21c3d66f9d7d3cceadeb2b450e4e.
Showing
1 changed file
with
7 additions
and
11 deletions
openbr/plugins/stasm4.cpp
| @@ -64,8 +64,8 @@ class StasmTransform : public UntrainableTransform | @@ -64,8 +64,8 @@ class StasmTransform : public UntrainableTransform | ||
| 64 | BR_PROPERTY(bool, stasm3Format, false) | 64 | BR_PROPERTY(bool, stasm3Format, false) |
| 65 | Q_PROPERTY(bool clearLandmarks READ get_clearLandmarks WRITE set_clearLandmarks RESET reset_clearLandmarks STORED false) | 65 | Q_PROPERTY(bool clearLandmarks READ get_clearLandmarks WRITE set_clearLandmarks RESET reset_clearLandmarks STORED false) |
| 66 | BR_PROPERTY(bool, clearLandmarks, false) | 66 | BR_PROPERTY(bool, clearLandmarks, false) |
| 67 | - Q_PROPERTY(QVariantList pinEyes READ get_pinEyes WRITE set_pinEyes RESET reset_pinEyes STORED false) | ||
| 68 | - BR_PROPERTY(QVariantList, pinEyes, QVariantList()) | 67 | + Q_PROPERTY(QStringList pinEyes READ get_pinEyes WRITE set_pinEyes RESET reset_pinEyes STORED false) |
| 68 | + BR_PROPERTY(QStringList, pinEyes, QStringList()) | ||
| 69 | 69 | ||
| 70 | Resource<StasmCascadeClassifier> stasmCascadeResource; | 70 | Resource<StasmCascadeClassifier> stasmCascadeResource; |
| 71 | 71 | ||
| @@ -102,19 +102,15 @@ class StasmTransform : public UntrainableTransform | @@ -102,19 +102,15 @@ class StasmTransform : public UntrainableTransform | ||
| 102 | QPointF leftEye; | 102 | QPointF leftEye; |
| 103 | 103 | ||
| 104 | if (src.file.contains("Affine_0") && src.file.contains("Affine_1")) { | 104 | if (src.file.contains("Affine_0") && src.file.contains("Affine_1")) { |
| 105 | - rightEye = pinEyes.at(0).toPointF(); | ||
| 106 | - leftEye = pinEyes.at(1).toPointF(); | ||
| 107 | - if (!rightEye.isNull() && !leftEye.isNull()) | ||
| 108 | - ok = true; | 105 | + rightEye = QtUtils::toPoint(pinEyes.at(0),&ok); |
| 106 | + leftEye = QtUtils::toPoint(pinEyes.at(1),&ok); | ||
| 109 | } | 107 | } |
| 110 | 108 | ||
| 111 | if (!ok) { | 109 | if (!ok) { |
| 112 | - QString r = pinEyes.at(0).toString(); | ||
| 113 | - QString l = pinEyes.at(1).toString(); | ||
| 114 | - if (!r.isNull() && !l.isNull() && src.file.contains(r) && src.file.contains(l)) | 110 | + if (src.file.contains(pinEyes.at(0)) && src.file.contains(pinEyes.at(1))) |
| 115 | { | 111 | { |
| 116 | - rightEye = src.file.get<QPointF>(pinEyes.at(0).toString(), QPointF()); | ||
| 117 | - leftEye = src.file.get<QPointF>(pinEyes.at(1).toString(), QPointF()); | 112 | + rightEye = src.file.get<QPointF>(pinEyes.at(0), QPointF()); |
| 113 | + leftEye = src.file.get<QPointF>(pinEyes.at(1), QPointF()); | ||
| 118 | ok = true; | 114 | ok = true; |
| 119 | } | 115 | } |
| 120 | } | 116 | } |