diff --git a/examples/tests/handFromJsonTest.cpp b/examples/tests/handFromJsonTest.cpp index 63bae44da24ce2fb65e7b45b4a7936bc389cacd3..b95772a3bf22448fa82586d8443812406a1bab11 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 ffa97a44140f338dc82c98ff2f83c0f8b8281f89..fa4bf76a7d25e2639e155e8812e139a5ce169332 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 1b45d4b494bdbb31cb98209a58c6429c926a5157..8cedea31bff593aefd47e5fdeef8ae54dfd9256f 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 6cd6f3a3d223997f7494d4c3856b6abed218e167..c2820df17ad30e8b3a535184a7cf23b356474745 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 26ad9af4fd3c597cb6b0f69c74199a6b3f153cf0..ad4e2bc3888fe991b9d7d2bae098b929d8ef0a7e 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 {