Commit d4cf88ed51b3bf323d964904dc129dbec930b435
1 parent
e6a7e66d
More cmake files
Showing
4 changed files
with
19 additions
and
3 deletions
openbr/plugins/register.cpp
| @@ -72,6 +72,8 @@ class AffineTransform : public UntrainableTransform | @@ -72,6 +72,8 @@ class AffineTransform : public UntrainableTransform | ||
| 72 | (src.file.contains("Affine_2") || twoPoints)) { | 72 | (src.file.contains("Affine_2") || twoPoints)) { |
| 73 | srcPoints[0] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_0")); | 73 | srcPoints[0] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_0")); |
| 74 | srcPoints[1] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_1")); | 74 | srcPoints[1] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_1")); |
| 75 | + dst.file.set("Affine_0", OpenCVUtils::fromPoint(dstPoints[0])); | ||
| 76 | + dst.file.set("Affine_1", OpenCVUtils::fromPoint(dstPoints[1])); | ||
| 75 | if (!twoPoints) srcPoints[2] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_2")); | 77 | if (!twoPoints) srcPoints[2] = OpenCVUtils::toPoint(src.file.get<QPointF>("Affine_2")); |
| 76 | } else { | 78 | } else { |
| 77 | const QList<Point2f> landmarks = OpenCVUtils::toPoints(src.file.points()); | 79 | const QList<Point2f> landmarks = OpenCVUtils::toPoints(src.file.points()); |
| @@ -93,9 +95,6 @@ class AffineTransform : public UntrainableTransform | @@ -93,9 +95,6 @@ class AffineTransform : public UntrainableTransform | ||
| 93 | if (twoPoints) srcPoints[2] = getThirdAffinePoint(srcPoints[0], srcPoints[1]); | 95 | if (twoPoints) srcPoints[2] = getThirdAffinePoint(srcPoints[0], srcPoints[1]); |
| 94 | 96 | ||
| 95 | warpAffine(src, dst, getAffineTransform(srcPoints, dstPoints), Size(width, height)); | 97 | warpAffine(src, dst, getAffineTransform(srcPoints, dstPoints), Size(width, height)); |
| 96 | - | ||
| 97 | - dst.file.set("Affine_0", OpenCVUtils::fromPoint(dstPoints[0])); | ||
| 98 | - dst.file.set("Affine_1", OpenCVUtils::fromPoint(dstPoints[1])); | ||
| 99 | } | 98 | } |
| 100 | }; | 99 | }; |
| 101 | 100 |
openbr/plugins/stasm.cpp
| @@ -53,6 +53,8 @@ class StasmTransform : public UntrainableTransform | @@ -53,6 +53,8 @@ class StasmTransform : public UntrainableTransform | ||
| 53 | //qDebug() << "PittPatt X: " << src.file.get<QPoint>("Affine_0").x() - src.m().cols/2 << src.file.get<QPoint>("Affine_1").x() - src.m().cols/2; | 53 | //qDebug() << "PittPatt X: " << src.file.get<QPoint>("Affine_0").x() - src.m().cols/2 << src.file.get<QPoint>("Affine_1").x() - src.m().cols/2; |
| 54 | //qDebug() << "PittPatt Y: " << src.m().rows/2 - src.file.get<QPoint>("Affine_0").y() << src.m().rows/2 - src.file.get<QPoint>("Affine_1").y(); | 54 | //qDebug() << "PittPatt Y: " << src.m().rows/2 - src.file.get<QPoint>("Affine_0").y() << src.m().rows/2 - src.file.get<QPoint>("Affine_1").y(); |
| 55 | 55 | ||
| 56 | + qDebug() << src.file.fileName(); | ||
| 57 | + | ||
| 56 | int numLandmarks; | 58 | int numLandmarks; |
| 57 | int landmarks[500]; | 59 | int landmarks[500]; |
| 58 | 60 |
openbr/plugins/stasm.cmake renamed to openbr/plugins/stasm3.cmake
openbr/plugins/stasm4.cmake
0 → 100644
| 1 | +set(BR_WITH_STASM OFF CACHE BOOL "Build with Stasm") | ||
| 2 | + | ||
| 3 | +if(${BR_WITH_STASM}) | ||
| 4 | + find_package(Stasm REQUIRED) | ||
| 5 | + set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/stasm.cpp) | ||
| 6 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Stasm_LIBS}) | ||
| 7 | + | ||
| 8 | + if(WIN32) | ||
| 9 | + install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION bin) | ||
| 10 | + else() | ||
| 11 | + install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION lib) | ||
| 12 | + endif() | ||
| 13 | + | ||
| 14 | + install(DIRECTORY ${Stasm_DIR}/models/ DESTINATION share/openbr/models/stasm) | ||
| 15 | +endif() |