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 void initializationOnThread();
19 void work(TDatums& tDatums);
22 const std::shared_ptr<JointAngleEstimation> spJointAngleEstimation;
36 template<
typename TDatums>
37 WJointAngleEstimation<TDatums>::WJointAngleEstimation(
const std::shared_ptr<JointAngleEstimation>& jointAngleEstimation) :
38 spJointAngleEstimation{jointAngleEstimation}
42 template<
typename TDatums>
43 void WJointAngleEstimation<TDatums>::initializationOnThread()
47 spJointAngleEstimation->initializationOnThread();
49 catch (
const std::exception& e)
51 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
55 template<
typename TDatums>
56 void WJointAngleEstimation<TDatums>::work(TDatums& tDatums)
67 auto& datum = tDatums->at(0);
68 const auto& poseKeypoints3D = datum.poseKeypoints3D;
69 const auto& faceKeypoints3D = datum.faceKeypoints3D;
70 const auto& handKeypoints3D = datum.handKeypoints3D;
72 spJointAngleEstimation->adamFastFit(
73 datum.adamPose, datum.adamTranslation, datum.vtVec, datum.j0Vec,
74 datum.adamFaceCoeffsExp, poseKeypoints3D, faceKeypoints3D, handKeypoints3D);
82 catch (
const std::exception& e)
86 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
93 #endif // OPENPOSE_3D_W_JOINT_ANGLE_ESTIMATION_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:31
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)