0

my NB crashed a few weeks ago and what was working well on my Linux Ubuntu, now does not. I need to install and make OpenPose working on my second notebook (the one from my job). Unfortunately, here I have only Windows 10 and it is not possible to install other OS. I was not able to make working correctly CMake, so I've taken my last chance and I am trying to run it in Visual Studio. I have added all libraries, executables and includes to my project and I tried to run my project. And now, some of GFLAGS are not working. Now, there are a few errors of following two types:

E0312 / no suitable user-defined conversion from "fLS::clstring" to "const op::String"

C++ no operator matches these operands
    operand types are: std::tuple<op::ProducerType &, std::string &> = std::pair<op::ProducerType, op::String>

Could you please help me with this error? I know what is wrong, but how can I fix it? I assume that it could be by another version of OpenPose between old and new notebook. But, how to fix it?

Thank you very much. Bye

Honza
  • 939
  • 2
  • 11
  • 28

1 Answers1

1

I assume you are using the latest OpenPose. From OpenPose 1.6.0 several changes are done in the code such as op::String as a container of std::string.

Given very limited information in the question, I propose the following workarounds-

  1. You may checkout OpenPose 1.5.1 by executing git checkout tags/v1.5.1
  2. If you want to stick to the latest version, use op::String function. An example showing the comparison is given below-
    // Older versions, i.e., OpenPose version < 1.6
    const auto outputSize = op::flagsToPoint(FLAGS_output_resolution, "-1x-1");
    // Newer versions, i.e., OpenPose version >= 1.6
    const auto outputSize = op::flagsToPoint(op::String(FLAGS_output_resolution), "-1x-1");
    

Lastly, I would appreciate it if you could provide additional details such as OpenPose Version, MWE, etc.

ravi
  • 6,140
  • 18
  • 77
  • 154
  • I am sorry, you are right, I should provide additional details. I installed openpose via MS Visual Studio following this instructions a month ago: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md. It is weird, but in the CMakeLists.txt of my openpose directory there is version 1.5.1. But if you are writing that `op::String` is used from 1.6, I has to be 1.6. And according to openpose github, 1.6 was released 10 days ago and I installed it a month ago. I am really confused. – Honza May 07 '20 at 07:33
  • 1
    After adding `op::String()`, some new errors appears. I will try to compile OpenPose again, but v1.5.1. But your answer was very helpful and it was a solution to my question, so I am checking it as the correct one. Thank you – Honza May 07 '20 at 07:34
  • Glad it helped! – ravi May 07 '20 at 07:40
  • Hi, is there a way to get or print OpenPose version? From source code or command line? Or is it in some file or something? I am not able to google it (I have not found it). Thank you – Honza May 07 '20 at 10:52
  • 1
    You should have created a new question, as it is unrelated to this question. Anyway you should be able to print OpenPose version using `std::cout << OPEN_POSE_VERSION_STRING;` Include `#include ` if compiler can't find it. – ravi May 07 '20 at 10:58