OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
guiAdam.hpp
Go to the documentation of this file.
1 #ifdef USE_3D_ADAM_MODEL
2 #ifndef OPENPOSE_GUI_GUI_ADAM_HPP
3 #define OPENPOSE_GUI_GUI_ADAM_HPP
4 
5 #ifdef USE_3D_ADAM_MODEL
6  #include <adam/totalmodel.h>
7 #endif
10 #include <openpose/gui/gui.hpp>
11 
12 namespace op
13 {
14  // This worker will do 3-D rendering
15  class OP_API GuiAdam : public Gui
16  {
17  public:
18  GuiAdam(const Point<int>& outputSize, const bool fullScreen,
19  const std::shared_ptr<std::atomic<bool>>& isRunningSharedPtr,
20  const std::shared_ptr<std::pair<std::atomic<bool>, std::atomic<int>>>& videoSeekSharedPtr = nullptr,
21  const std::vector<std::shared_ptr<PoseExtractorNet>>& poseExtractorNets = {},
22  const std::vector<std::shared_ptr<FaceExtractorNet>>& faceExtractorNets = {},
23  const std::vector<std::shared_ptr<HandExtractorNet>>& handExtractorNets = {},
24  const std::vector<std::shared_ptr<Renderer>>& renderers = {},
25  const DisplayMode displayMode = DisplayMode::DisplayAll,
26  const std::shared_ptr<const TotalModel>& totalModel = nullptr,
27  const std::string& adamRenderedVideoPath = "");
28 
29  virtual ~GuiAdam();
30 
31  virtual void initializationOnThread();
32 
33  void generateMesh(const Array<float>& poseKeypoints3D, const Array<float>& faceKeypoints3D,
34  const std::array<Array<float>, 2>& handKeypoints3D,
35  const double* const adamPosePtr,
36  const double* const adamTranslationPtr,
37  const double* const vtVecPtr, const int vtVecRows,
38  const double* const j0VecPtr, const int j0VecRows,
39  const double* const adamFaceCoeffsExpPtr);
40 
41  virtual void update();
42 
43  private:
44  // PIMPL idiom
45  // http://www.cppsamples.com/common-tasks/pimpl.html
46  struct ImplGuiAdam;
47  std::shared_ptr<ImplGuiAdam> spImpl;
48 
49  // PIMP requires DELETE_COPY & destructor, or extra code
50  // http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html
51  DELETE_COPY(GuiAdam);
52  };
53 }
54 
55 #endif // OPENPOSE_GUI_GUI_ADAM_HPP
56 #endif
#define OP_API
Definition: macros.hpp:18
#define DELETE_COPY(className)
Definition: macros.hpp:32
DisplayMode
Definition: enumClasses.hpp:11