1 #ifdef USE_3D_ADAM_MODEL
2 #ifndef OPENPOSE_3D_W_JOINT_ANGLE_ESTIMATION_HPP
3 #define OPENPOSE_3D_W_JOINT_ANGLE_ESTIMATION_HPP
11 template<
typename TDatums>
12 class WJointAngleEstimation :
public Worker<TDatums>
15 explicit WJointAngleEstimation(
const std::shared_ptr<JointAngleEstimation>& jointAngleEstimation);
17 virtual ~WJointAngleEstimation();
19 void initializationOnThread();
21 void work(TDatums& tDatums);
24 const std::shared_ptr<JointAngleEstimation> spJointAngleEstimation;
38 template<
typename TDatums>
39 WJointAngleEstimation<TDatums>::WJointAngleEstimation(
const std::shared_ptr<JointAngleEstimation>& jointAngleEstimation) :
40 spJointAngleEstimation{jointAngleEstimation}
44 template<
typename TDatums>
45 WJointAngleEstimation<TDatums>::~WJointAngleEstimation()
49 template<
typename TDatums>
50 void WJointAngleEstimation<TDatums>::initializationOnThread()
54 spJointAngleEstimation->initializationOnThread();
56 catch (
const std::exception& e)
58 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
62 template<
typename TDatums>
63 void WJointAngleEstimation<TDatums>::work(TDatums& tDatums)
74 auto& datum = tDatums->at(0);
75 const auto& poseKeypoints3D = datum.poseKeypoints3D;
76 const auto& faceKeypoints3D = datum.faceKeypoints3D;
77 const auto& handKeypoints3D = datum.handKeypoints3D;
79 spJointAngleEstimation->adamFastFit(
80 datum.adamPose, datum.adamTranslation, datum.vtVec, datum.j0Vec,
81 datum.adamFaceCoeffsExp, poseKeypoints3D, faceKeypoints3D, handKeypoints3D);
89 catch (
const std::exception& e)
93 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
100 #endif // OPENPOSE_3D_W_JOINT_ANGLE_ESTIMATION_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:34
static const std::string timerInit(const int line, const std::string &function, const std::string &file)
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void dLog(const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")
Definition: errorAndLog.hpp:53
bool checkNoNullNorEmpty(const TPointerContainer &tPointerContainer)
Definition: pointerContainer.hpp:7
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)
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
static void timerEnd(const std::string &key)