1 #ifdef USE_3D_ADAM_MODEL
2 #ifndef OPENPOSE_FILESTREAM_W_BVH_SAVER_HPP
3 #define OPENPOSE_FILESTREAM_W_BVH_SAVER_HPP
11 template<
typename TDatums>
12 class WBvhSaver :
public WorkerConsumer<TDatums>
15 explicit WBvhSaver(
const std::shared_ptr<BvhSaver>& bvhSaver);
19 void initializationOnThread();
21 void workConsumer(
const TDatums& tDatums);
24 std::shared_ptr<BvhSaver> spBvhSaver;
38 template<
typename TDatums>
39 WBvhSaver<TDatums>::WBvhSaver(
const std::shared_ptr<BvhSaver>& bvhSaver) :
44 template<
typename TDatums>
45 WBvhSaver<TDatums>::~WBvhSaver()
49 template<
typename TDatums>
50 void WBvhSaver<TDatums>::initializationOnThread()
54 template<
typename TDatums>
55 void WBvhSaver<TDatums>::workConsumer(
const TDatums& tDatums)
66 const auto& tDatum = (*tDatums)[0];
67 if (!tDatum.poseKeypoints3D.empty())
68 spBvhSaver->updateBvh(tDatum.adamPose, tDatum.adamTranslation, tDatum.j0Vec);
76 catch (
const std::exception& e)
79 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
86 #endif // OPENPOSE_FILESTREAM_W_BVH_SAVER_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:33
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)