All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
gui.hpp
Go to the documentation of this file.
#ifndef OPENPOSE_GUI_GUI_HPP
#define OPENPOSE_GUI_GUI_HPP
#include <atomic>
#include <opencv2/core/core.hpp> // cv::Mat
#include <openpose/core/common.hpp>
#include <openpose/core/renderer.hpp>
#include <openpose/gui/frameDisplayer.hpp>
#include <openpose/pose/poseExtractorNet.hpp>
#include <openpose/face/faceExtractorNet.hpp>
#include <openpose/hand/handExtractorNet.hpp>
namespace op
{
class OP_API Gui
{
public:
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);
virtual ~Gui();
virtual void initializationOnThread();
void setImage(const cv::Mat& cvMatOutput);
void setImage(const std::vector<cv::Mat>& cvMatOutputs);
virtual void update();
protected:
std::shared_ptr<std::atomic<bool>> spIsRunning;
DisplayMode mDisplayMode;
DisplayMode mDisplayModeOriginal;
private:
// Frames display
FrameDisplayer mFrameDisplayer;
// Other variables
std::vector<std::shared_ptr<PoseExtractorNet>> mPoseExtractorNets;
std::vector<std::shared_ptr<FaceExtractorNet>> mFaceExtractorNets;
std::vector<std::shared_ptr<HandExtractorNet>> mHandExtractorNets;
std::vector<std::shared_ptr<Renderer>> mRenderers;
std::shared_ptr<std::pair<std::atomic<bool>, std::atomic<int>>> spVideoSeek;
};
}
#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