1 #ifndef OPENPOSE_GUI_W_GUI_3D_HPP
2 #define OPENPOSE_GUI_W_GUI_3D_HPP
11 template<
typename TDatums>
15 explicit WGui3D(
const std::shared_ptr<Gui3D>& gui3D);
24 std::shared_ptr<Gui3D> spGui3D;
38 template<
typename TDatums>
44 template<
typename TDatums>
49 template<
typename TDatums>
54 spGui3D->initializationOnThread();
56 catch (
const std::exception& e)
58 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
62 template<
typename TDatums>
68 if (tDatums !=
nullptr)
75 if (!tDatums->empty())
78 std::vector<Matrix> cvOutputDatas;
79 for (
auto& tDatumPtr : *tDatums)
80 cvOutputDatas.emplace_back(tDatumPtr->cvOutputData);
81 spGui3D->setImage(cvOutputDatas);
83 auto& tDatumPtr = (*tDatums)[0];
84 spGui3D->setKeypoints(
85 tDatumPtr->poseKeypoints3D, tDatumPtr->faceKeypoints3D, tDatumPtr->handKeypoints3D[0],
86 tDatumPtr->handKeypoints3D[1]);
91 if (!tDatums->empty())
93 auto& tDatumPtr = (*tDatums)[0];
94 tDatumPtr->cvOutputData3D = spGui3D->readCvMat();
97 if (!tDatums->empty())
106 catch (
const std::exception& e)
109 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
static void printAveragedTimeMsOnIterationX(const std::string &key, const int line, const std::string &function, const std::string &file, const unsigned long long x=DEFAULT_X)
static const std::string timerInit(const int line, const std::string &function, const std::string &file)
static void timerEnd(const std::string &key)
void initializationOnThread()
WGui3D(const std::shared_ptr< Gui3D > &gui3D)
void workConsumer(const TDatums &tDatums)
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void opLogIfDebug(const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")