From a13b963102c2636f99d649f3155e985710654b31 Mon Sep 17 00:00:00 2001 From: Gines Hidalgo Date: Mon, 11 Jan 2021 09:42:18 -0500 Subject: [PATCH] Fixed Ubuntu compilation issues Signed-off-by: Gines Hidalgo --- examples/tests/handFromJsonTest.cpp | 7 ++++--- examples/tests/wrapperHandFromJsonTest.hpp | 5 ++--- include/openpose/utilities/flagsToOpenPose.hpp | 4 ++-- include/openpose/wrapper/wrapperAuxiliary.hpp | 3 +-- src/openpose/core/scaleAndSizeExtractor.cpp | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/examples/tests/handFromJsonTest.cpp b/examples/tests/handFromJsonTest.cpp index 63bae44d..b95772a3 100644 --- a/examples/tests/handFromJsonTest.cpp +++ b/examples/tests/handFromJsonTest.cpp @@ -50,9 +50,10 @@ int handFromJsonTest() op::WrapperHandFromJsonTest opWrapper; // Pose configuration (use WrapperStructPose{} for default and recommended configuration) op::WrapperStructPose wrapperStructPose{ - op::PoseMode::Disabled, op::flagsToPoint("656x368"), op::flagsToPoint("1280x720"), op::ScaleMode::InputResolution, - FLAGS_num_gpu, FLAGS_num_gpu_start, 1, 0.15f, op::RenderMode::None, op::PoseModel::BODY_25, true, 0.f, 0.f, - 0, "models/", {}, op::ScaleMode::ZeroToOneFixedAspect, false, 0.05f, -1, false}; + op::PoseMode::Disabled, op::flagsToPoint("656x368", "?x?"), -1.0, op::flagsToPoint("1280x720", "?x?"), + op::ScaleMode::InputResolution, FLAGS_num_gpu, FLAGS_num_gpu_start, 1, 0.15f, op::RenderMode::None, + op::PoseModel::BODY_25, true, 0.f, 0.f, 0, "models/", {}, op::ScaleMode::ZeroToOneFixedAspect, false, + 0.05f, -1, false}; wrapperStructPose.modelFolder = op::String(FLAGS_model_folder); // Hand configuration (use op::WrapperStructHand{} to disable it) const op::WrapperStructHand wrapperStructHand{ diff --git a/examples/tests/wrapperHandFromJsonTest.hpp b/examples/tests/wrapperHandFromJsonTest.hpp index ffa97a44..fa4bf76a 100644 --- a/examples/tests/wrapperHandFromJsonTest.hpp +++ b/examples/tests/wrapperHandFromJsonTest.hpp @@ -183,9 +183,8 @@ namespace op // Get input scales and sizes const auto scaleAndSizeExtractor = std::make_shared( - wrapperStructPose.netInputSize, finalOutputSize, wrapperStructPose.scalesNumber, - wrapperStructPose.scaleGap - ); + wrapperStructPose.netInputSize, (float)wrapperStructPose.netInputSizeDynamicBehavior, finalOutputSize, + wrapperStructPose.scalesNumber, wrapperStructPose.scaleGap); spWScaleAndSizeExtractor = std::make_shared>(scaleAndSizeExtractor); // Input cvMat to OpenPose format diff --git a/include/openpose/utilities/flagsToOpenPose.hpp b/include/openpose/utilities/flagsToOpenPose.hpp index 1b45d4b4..8cedea31 100644 --- a/include/openpose/utilities/flagsToOpenPose.hpp +++ b/include/openpose/utilities/flagsToOpenPose.hpp @@ -39,8 +39,8 @@ namespace op OP_API DisplayMode flagsToDisplayMode(const int display, const bool enabled3d); /** - * E.g., const auto netInputSize = flagsToPoint(op::String(FLAGS_net_resolution), "-1x368"); - * E.g., const Point resolution = flagsToPoint(resolutionString, "-1280x720"); + * E.g., const Point netInputSize = flagsToPoint(op::String(FLAGS_net_resolution), "-1x368"); + * E.g., const Point resolution = flagsToPoint(resolutionString, "1280x720"); */ OP_API Point flagsToPoint(const String& pointString, const String& pointExample); } diff --git a/include/openpose/wrapper/wrapperAuxiliary.hpp b/include/openpose/wrapper/wrapperAuxiliary.hpp index 6cd6f3a3..c2820df1 100644 --- a/include/openpose/wrapper/wrapperAuxiliary.hpp +++ b/include/openpose/wrapper/wrapperAuxiliary.hpp @@ -291,8 +291,7 @@ namespace op // Get input scales and sizes const auto scaleAndSizeExtractor = std::make_shared( wrapperStructPose.netInputSize, (float)wrapperStructPose.netInputSizeDynamicBehavior, finalOutputSize, - wrapperStructPose.scalesNumber, wrapperStructPose.scaleGap - ); + wrapperStructPose.scalesNumber, wrapperStructPose.scaleGap); scaleAndSizeExtractorW = std::make_shared>(scaleAndSizeExtractor); // Input cvMat to OpenPose input & output format diff --git a/src/openpose/core/scaleAndSizeExtractor.cpp b/src/openpose/core/scaleAndSizeExtractor.cpp index 26ad9af4..ad4e2bc3 100644 --- a/src/openpose/core/scaleAndSizeExtractor.cpp +++ b/src/openpose/core/scaleAndSizeExtractor.cpp @@ -59,7 +59,6 @@ namespace op else // if (poseNetInputSize.y <= 0) poseNetInputSize.y = 16 * positiveIntRound(1 / 16.f * fastMin(poseNetInputSize.x * mNetInputResolutionDynamicBehavior * 9.f / 16.f, poseNetInputSize.x * inputResolution.y / (float)inputResolution.x)); - poseNetInputSize.y = 16 * positiveIntRound(1 / 16.f * poseNetInputSize.x * inputResolution.y / (float)inputResolution.x); } else // No mNetInputResolutionDynamicBehavior behavior { -- GitLab