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)
62 opLogIfDebug(
"", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
64 const auto profilerKey = Profiler::timerInit(__LINE__, __FUNCTION__, __FILE__);
66 const auto& tDatumPtr = (*tDatums)[0];
67 if (!tDatumPtr->poseKeypoints3D.empty())
68 spBvhSaver->updateBvh(tDatumPtr->adamPose, tDatumPtr->adamTranslation, tDatumPtr->j0Vec);
70 Profiler::timerEnd(profilerKey);
71 Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__);
73 opLogIfDebug(
"", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
76 catch (
const std::exception& e)
79 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
#define COMPILE_TEMPLATE_DATUM(templateName)
#define DELETE_COPY(className)
bool checkNoNullNorEmpty(const TPointerContainer &tPointerContainer)
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="")