用pycharm打开openpose所遇到的问题
1.无法导入openpose库
打开pycharm的File——setting——project——project structure 然后点击Resource Folders即可,具体如下图所示
2.运行时候出现了这个错误
emplaceAndPop(): incompatible function arguments. The following argument types are supported:
1. (self: openpose.pyopenpose.WrapperPython, arg0: std::vector<std::shared_ptrop::Datum, std::allocator<std::shared_ptrop::Datum > >) -> bool
Invoked with: <openpose.pyopenpose.WrapperPython object at 0x7fab91920e30>, [<openpose.pyopenpose.Datum object at 0x7fab91920fb8>]
Did you forget to #include <pybind11/stl.h>
? Or <pybind11/complex.h>,
<pybind11/functional.h>, <pybind11/chrono.h>, etc. Some automatic
conversions are optional and require extra headers to be included
when compiling your pybind11 module.
解决办法:只需要将代码中的opWrapper.emplaceAndPop([datum])换成opWrapper.emplaceAndPop(op.VectorDatum([datum]))即可