1 #ifndef OPENPOSE_FILESTREAM_W_POSE_SAVER_HPP
2 #define OPENPOSE_FILESTREAM_W_POSE_SAVER_HPP
11 template<
typename TDatums>
15 explicit WPoseSaver(
const std::shared_ptr<KeypointSaver>& keypointSaver);
24 const std::shared_ptr<KeypointSaver> spKeypointSaver;
38 template<
typename TDatums>
40 spKeypointSaver{keypointSaver}
44 template<
typename TDatums>
49 template<
typename TDatums>
54 template<
typename TDatums>
66 auto& tDatumsNoPtr = *tDatums;
68 std::vector<Array<float>> keypointVector(tDatumsNoPtr.size());
69 for (
auto i = 0u; i < tDatumsNoPtr.size(); i++)
70 keypointVector[i] = tDatumsNoPtr[i].poseKeypoints;
71 const auto fileName = (!tDatumsNoPtr[0].name.empty() ? tDatumsNoPtr[0].name : std::to_string(tDatumsNoPtr[0].
id));
72 spKeypointSaver->saveKeypoints(keypointVector, fileName,
"pose");
80 catch (
const std::exception& e)
83 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
90 #endif // OPENPOSE_FILESTREAM_W_POSE_SAVER_HPP
Definition: workerConsumer.hpp:10
Definition: wPoseSaver.hpp:12
void initializationOnThread()
Definition: wPoseSaver.hpp:50
void workConsumer(const TDatums &tDatums)
Definition: wPoseSaver.hpp:55
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="")
virtual ~WPoseSaver()
Definition: wPoseSaver.hpp:45
WPoseSaver(const std::shared_ptr< KeypointSaver > &keypointSaver)
Definition: wPoseSaver.hpp:39
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)