diff --git a/openbr/plugins/register.cpp b/openbr/plugins/register.cpp index e32d126..926a6dc 100644 --- a/openbr/plugins/register.cpp +++ b/openbr/plugins/register.cpp @@ -72,6 +72,8 @@ class AffineTransform : public UntrainableTransform (src.file.contains("Affine_2") || twoPoints)) { srcPoints[0] = OpenCVUtils::toPoint(src.file.get("Affine_0")); srcPoints[1] = OpenCVUtils::toPoint(src.file.get("Affine_1")); + dst.file.set("Affine_0", OpenCVUtils::fromPoint(dstPoints[0])); + dst.file.set("Affine_1", OpenCVUtils::fromPoint(dstPoints[1])); if (!twoPoints) srcPoints[2] = OpenCVUtils::toPoint(src.file.get("Affine_2")); } else { const QList landmarks = OpenCVUtils::toPoints(src.file.points()); @@ -93,9 +95,6 @@ class AffineTransform : public UntrainableTransform if (twoPoints) srcPoints[2] = getThirdAffinePoint(srcPoints[0], srcPoints[1]); warpAffine(src, dst, getAffineTransform(srcPoints, dstPoints), Size(width, height)); - - dst.file.set("Affine_0", OpenCVUtils::fromPoint(dstPoints[0])); - dst.file.set("Affine_1", OpenCVUtils::fromPoint(dstPoints[1])); } }; diff --git a/openbr/plugins/stasm.cpp b/openbr/plugins/stasm.cpp index 8682438..a3eb4af 100644 --- a/openbr/plugins/stasm.cpp +++ b/openbr/plugins/stasm.cpp @@ -53,6 +53,8 @@ class StasmTransform : public UntrainableTransform //qDebug() << "PittPatt X: " << src.file.get("Affine_0").x() - src.m().cols/2 << src.file.get("Affine_1").x() - src.m().cols/2; //qDebug() << "PittPatt Y: " << src.m().rows/2 - src.file.get("Affine_0").y() << src.m().rows/2 - src.file.get("Affine_1").y(); + qDebug() << src.file.fileName(); + int numLandmarks; int landmarks[500]; diff --git a/openbr/plugins/stasm.cmake b/openbr/plugins/stasm3.cmake index d5636f4..d5636f4 100644 --- a/openbr/plugins/stasm.cmake +++ b/openbr/plugins/stasm3.cmake diff --git a/openbr/plugins/stasm4.cmake b/openbr/plugins/stasm4.cmake new file mode 100644 index 0000000..d5636f4 --- /dev/null +++ b/openbr/plugins/stasm4.cmake @@ -0,0 +1,15 @@ +set(BR_WITH_STASM OFF CACHE BOOL "Build with Stasm") + +if(${BR_WITH_STASM}) + find_package(Stasm REQUIRED) + set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/stasm.cpp) + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Stasm_LIBS}) + + if(WIN32) + install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION bin) + else() + install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION lib) + endif() + + install(DIRECTORY ${Stasm_DIR}/models/ DESTINATION share/openbr/models/stasm) +endif()