From d4cf88ed51b3bf323d964904dc129dbec930b435 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Tue, 25 Jun 2013 13:58:51 -0400 Subject: [PATCH] More cmake files --- openbr/plugins/register.cpp | 5 ++--- openbr/plugins/stasm.cmake | 15 --------------- openbr/plugins/stasm.cpp | 2 ++ openbr/plugins/stasm3.cmake | 15 +++++++++++++++ openbr/plugins/stasm4.cmake | 15 +++++++++++++++ 5 files changed, 34 insertions(+), 18 deletions(-) delete mode 100644 openbr/plugins/stasm.cmake create mode 100644 openbr/plugins/stasm3.cmake create mode 100644 openbr/plugins/stasm4.cmake 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.cmake b/openbr/plugins/stasm.cmake deleted file mode 100644 index d5636f4..0000000 --- a/openbr/plugins/stasm.cmake +++ /dev/null @@ -1,15 +0,0 @@ -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() 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/stasm3.cmake b/openbr/plugins/stasm3.cmake new file mode 100644 index 0000000..d5636f4 --- /dev/null +++ b/openbr/plugins/stasm3.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() 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() -- libgit2 0.21.4