用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]))即可
本文介绍了在PyCharm中使用OpenPose库时遇到的两个问题及其解决方案。首先,当无法导入OpenPose库时,可以在File-Settings-Project-Project Structure中设置Resource Folders。其次,运行时出现错误提示因缺少转换导致,解决方法是将代码中的opWrapper.emplaceAndPop([datum])替换为opWrapper.emplaceAndPop(op.VectorDatum([datum]))。
8509





