Commit 7abaef47e76e083486aa8a38d1b70d08317c5951
1 parent
5ebf2011
RegisterAffine no longer overwrites input metadata
Showing
1 changed file
with
0 additions
and
7 deletions
openbr/plugins/imgproc/affine.cpp
| @@ -101,19 +101,12 @@ private: | @@ -101,19 +101,12 @@ private: | ||
| 101 | srcPoints[0] = landmarks[0]; | 101 | srcPoints[0] = landmarks[0]; |
| 102 | srcPoints[1] = landmarks[1]; | 102 | srcPoints[1] = landmarks[1]; |
| 103 | if (!twoPoints) srcPoints[2] = landmarks[2]; | 103 | if (!twoPoints) srcPoints[2] = landmarks[2]; |
| 104 | - | ||
| 105 | - dst.file.set("Affine_0", OpenCVUtils::fromPoint(landmarks[0])); | ||
| 106 | - dst.file.set("Affine_1", OpenCVUtils::fromPoint(landmarks[1])); | ||
| 107 | - if (!twoPoints) dst.file.set("Affine_2", OpenCVUtils::fromPoint(landmarks[2])); | ||
| 108 | } | 104 | } |
| 109 | } | 105 | } |
| 110 | if (twoPoints) srcPoints[2] = getThirdAffinePoint(srcPoints[0], srcPoints[1]); | 106 | if (twoPoints) srcPoints[2] = getThirdAffinePoint(srcPoints[0], srcPoints[1]); |
| 111 | 107 | ||
| 112 | Mat affineTransform = getAffineTransform(srcPoints, dstPoints); | 108 | Mat affineTransform = getAffineTransform(srcPoints, dstPoints); |
| 113 | warpAffine(src, dst, affineTransform, Size(width, height), method); | 109 | warpAffine(src, dst, affineTransform, Size(width, height), method); |
| 114 | - dst.file.set("Affine_0", OpenCVUtils::fromPoint(dstPoints[0])); | ||
| 115 | - dst.file.set("Affine_1", OpenCVUtils::fromPoint(dstPoints[1])); | ||
| 116 | - if (!twoPoints) dst.file.set("Affine_2", OpenCVUtils::fromPoint(dstPoints[2])); | ||
| 117 | 110 | ||
| 118 | if (warpPoints) { | 111 | if (warpPoints) { |
| 119 | QList<QPointF> points = src.file.points(); | 112 | QList<QPointF> points = src.file.points(); |