OpenPose 1.0.0rc2 OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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>
5 #include <opencv2/core/core.hpp> // cv::Mat
6 #include <openpose/core/common.hpp>
7 #include <openpose/core/renderer.hpp>
8 #include <openpose/gui/frameDisplayer.hpp>
9 #include <openpose/pose/poseExtractorNet.hpp>
10 #include <openpose/face/faceExtractorNet.hpp>
11 #include <openpose/hand/handExtractorNet.hpp>
12
13 namespace op
14 {
15 class OP_API Gui
16 {
17 public:
18 Gui(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::Display2D);
26
27 virtual ~Gui();
28
29 virtual void initializationOnThread();
30
31 void setImage(const cv::Mat& cvMatOutput);
32
33 void setImage(const std::vector<cv::Mat>& cvMatOutputs);
34
35 virtual void update();
36
37 protected:
38 std::shared_ptr<std::atomic<bool>> spIsRunning;
39 DisplayMode mDisplayMode;
40 DisplayMode mDisplayModeOriginal;
41
42 private:
43 // Frames display
44 FrameDisplayer mFrameDisplayer;
45 // Other variables
46 std::vector<std::shared_ptr<PoseExtractorNet>> mPoseExtractorNets;
47 std::vector<std::shared_ptr<FaceExtractorNet>> mFaceExtractorNets;
48 std::vector<std::shared_ptr<HandExtractorNet>> mHandExtractorNets;
49 std::vector<std::shared_ptr<Renderer>> mRenderers;
50 std::shared_ptr<std::pair<std::atomic<bool>, std::atomic<int>>> spVideoSeek;
51 };
52 }
53
54 #endif // OPENPOSE_GUI_GUI_HPP
frameDisplayer.hpp
op::Gui::spIsRunning
std::shared_ptr< std::atomic< bool > > spIsRunning
Definition: gui.hpp:38
poseExtractorNet.hpp
op::FrameDisplayer
Definition: frameDisplayer.hpp:13
op::Point< int >
op::DisplayMode
DisplayMode
Definition: enumClasses.hpp:10
common.hpp
op::Gui::mDisplayModeOriginal
DisplayMode mDisplayModeOriginal
Definition: gui.hpp:40
op::Gui::mDisplayMode
DisplayMode mDisplayMode
Definition: gui.hpp:39
op::DisplayMode::Display2D
faceExtractorNet.hpp
cl::vector
std::vector< T, Alloc > vector
Definition: cl2.hpp:567
OP_API
#define OP_API
Definition: macros.hpp:19
handExtractorNet.hpp
op::Gui
Definition: gui.hpp:15
renderer.hpp