Commit 33ca8bf2ceaab624aeac2a0af1ab790d8454ee4e

Authored by Scott Klum
1 parent c5e279ae

Fixed some bad things

openbr/core/bee.cpp
@@ -96,7 +96,7 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign @@ -96,7 +96,7 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign
96 if ((key == "Index") || (key == "Subject")) continue; 96 if ((key == "Index") || (key == "Subject")) continue;
97 metadata.append(key+"=\""+QtUtils::toString(file.value(key))+"\""); 97 metadata.append(key+"=\""+QtUtils::toString(file.value(key))+"\"");
98 } 98 }
99 - lines.append("\t<biometric-signature name=\"" + file.name +"\">"); 99 + lines.append("\t<biometric-signature name=\"" + file.get<QString>("Subject") +"\">");
100 lines.append("\t\t<presentation file-name=\"" + file.name + "\" " + metadata.join(" ") + "/>"); 100 lines.append("\t\t<presentation file-name=\"" + file.name + "\" " + metadata.join(" ") + "/>");
101 lines.append("\t</biometric-signature>"); 101 lines.append("\t</biometric-signature>");
102 } 102 }
openbr/plugins/draw.cpp
@@ -50,7 +50,7 @@ class DrawTransform : public UntrainableTransform @@ -50,7 +50,7 @@ class DrawTransform : public UntrainableTransform
50 dst.m() = inPlace ? src.m() : src.m().clone(); 50 dst.m() = inPlace ? src.m() : src.m().clone();
51 51
52 if (points) { 52 if (points) {
53 - const QList<Point2f> pointsList = OpenCVUtils::toPoints(src.file.points()); 53 + const QList<Point2f> pointsList = OpenCVUtils::toPoints(src.file.namedPoints() + src.file.points());
54 for (int i=0; i<pointsList.size(); i++) { 54 for (int i=0; i<pointsList.size(); i++) {
55 const Point2f &point = pointsList[i]; 55 const Point2f &point = pointsList[i];
56 circle(dst, point, 3, color, -1); 56 circle(dst, point, 3, color, -1);
openbr/plugins/landmarks.cpp
@@ -294,6 +294,13 @@ class DelaunayTransform : public UntrainableTransform @@ -294,6 +294,13 @@ class DelaunayTransform : public UntrainableTransform
294 294
295 Rect boundingBox = boundingRect(mappedPoints.toVector().toStdVector()); 295 Rect boundingBox = boundingRect(mappedPoints.toVector().toStdVector());
296 296
  297 + boundingBox.x += 0; //boundingBox.width * .05;
  298 + boundingBox.y += boundingBox.height * .1; // 0.025 for nose, .05 for mouth, .10 for brow
  299 + boundingBox.width *= 1;//.975;
  300 + boundingBox.height *= .80; // .975 for nose, .95 for mouth, .925 for brow
  301 +
  302 + qDebug() << boundingBox;
  303 +
297 dst.m() = Mat(dst.m(), boundingBox); 304 dst.m() = Mat(dst.m(), boundingBox);
298 } 305 }
299 } 306 }
openbr/plugins/register.cpp
@@ -86,9 +86,6 @@ private: @@ -86,9 +86,6 @@ private:
86 (src.file.contains("Affine_2") || twoPoints)) { 86 (src.file.contains("Affine_2") || twoPoints)) {
87 srcPoints[0] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_0")); 87 srcPoints[0] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_0"));
88 srcPoints[1] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_1")); 88 srcPoints[1] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_1"));
89 -  
90 - dst.file.set("Affine_0", OpenCVUtils::fromPoint(dstPoints[0]));  
91 - dst.file.set("Affine_1", OpenCVUtils::fromPoint(dstPoints[1]));  
92 if (!twoPoints) srcPoints[2] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_2")); 89 if (!twoPoints) srcPoints[2] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_2"));
93 } else { 90 } else {
94 const QList<Point2f> landmarks = OpenCVUtils::toPoints(src.file.points()); 91 const QList<Point2f> landmarks = OpenCVUtils::toPoints(src.file.points());
@@ -103,7 +100,6 @@ private: @@ -103,7 +100,6 @@ private:
103 100
104 dst.file.set("Affine_0", OpenCVUtils::fromPoint(landmarks[0])); 101 dst.file.set("Affine_0", OpenCVUtils::fromPoint(landmarks[0]));
105 dst.file.set("Affine_1", OpenCVUtils::fromPoint(landmarks[1])); 102 dst.file.set("Affine_1", OpenCVUtils::fromPoint(landmarks[1]));
106 -  
107 if (!twoPoints) dst.file.set("Affine_2", OpenCVUtils::fromPoint(landmarks[2])); 103 if (!twoPoints) dst.file.set("Affine_2", OpenCVUtils::fromPoint(landmarks[2]));
108 } 104 }
109 } 105 }