OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
gui.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_GUI_GUI_HPP
2 #define OPENPOSE_GUI_GUI_HPP
3 
4 #include <atomic>
11 
12 namespace op
13 {
14  class OP_API Gui
15  {
16  public:
17  Gui(const Point<int>& outputSize, const bool fullScreen,
18  const std::shared_ptr<std::atomic<bool>>& isRunningSharedPtr,
19  const std::shared_ptr<std::pair<std::atomic<bool>, std::atomic<int>>>& videoSeekSharedPtr = nullptr,
20  const std::vector<std::shared_ptr<PoseExtractorNet>>& poseExtractorNets = {},
21  const std::vector<std::shared_ptr<FaceExtractorNet>>& faceExtractorNets = {},
22  const std::vector<std::shared_ptr<HandExtractorNet>>& handExtractorNets = {},
23  const std::vector<std::shared_ptr<Renderer>>& renderers = {},
24  const DisplayMode displayMode = DisplayMode::Display2D);
25 
26  virtual ~Gui();
27 
28  virtual void initializationOnThread();
29 
30  void setImage(const Matrix& cvMatOutput);
31 
32  void setImage(const std::vector<Matrix>& cvMatOutputs);
33 
34  virtual void update();
35 
36  protected:
37  std::shared_ptr<std::atomic<bool>> spIsRunning;
40 
41  private:
42  // Frames display
43  FrameDisplayer mFrameDisplayer;
44  // Other variables
45  std::vector<std::shared_ptr<PoseExtractorNet>> mPoseExtractorNets;
46  std::vector<std::shared_ptr<FaceExtractorNet>> mFaceExtractorNets;
47  std::vector<std::shared_ptr<HandExtractorNet>> mHandExtractorNets;
48  std::vector<std::shared_ptr<Renderer>> mRenderers;
49  std::shared_ptr<std::pair<std::atomic<bool>, std::atomic<int>>> spVideoSeek;
50  };
51 }
52 
53 #endif // OPENPOSE_GUI_GUI_HPP
Definition: gui.hpp:15
virtual void initializationOnThread()
std::shared_ptr< std::atomic< bool > > spIsRunning
Definition: gui.hpp:37
Gui(const Point< int > &outputSize, const bool fullScreen, const std::shared_ptr< std::atomic< bool >> &isRunningSharedPtr, const std::shared_ptr< std::pair< std::atomic< bool >, std::atomic< int >>> &videoSeekSharedPtr=nullptr, const std::vector< std::shared_ptr< PoseExtractorNet >> &poseExtractorNets={}, const std::vector< std::shared_ptr< FaceExtractorNet >> &faceExtractorNets={}, const std::vector< std::shared_ptr< HandExtractorNet >> &handExtractorNets={}, const std::vector< std::shared_ptr< Renderer >> &renderers={}, const DisplayMode displayMode=DisplayMode::Display2D)
DisplayMode mDisplayMode
Definition: gui.hpp:38
virtual ~Gui()
virtual void update()
void setImage(const Matrix &cvMatOutput)
DisplayMode mDisplayModeOriginal
Definition: gui.hpp:39
void setImage(const std::vector< Matrix > &cvMatOutputs)
#define OP_API
Definition: macros.hpp:18
DisplayMode
Definition: enumClasses.hpp:11