1 #ifndef OPENPOSE_FILESTREAM_W_FACE_SAVER_HPP
2 #define OPENPOSE_FILESTREAM_W_FACE_SAVER_HPP
11 template<
typename TDatums>
15 explicit WFaceSaver(
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]->faceKeypoints;
71 const auto fileName = (!tDatumsNoPtr[0]->name.empty()
72 ? tDatumsNoPtr[0]->name : std::to_string(tDatumsNoPtr[0]->
id));
73 spKeypointSaver->saveKeypoints(keypointVector, fileName,
"face");
81 catch (
const std::exception& e)
84 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
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)
static const std::string timerInit(const int line, const std::string &function, const std::string &file)
static void timerEnd(const std::string &key)
void workConsumer(const TDatums &tDatums)
WFaceSaver(const std::shared_ptr< KeypointSaver > &keypointSaver)
void initializationOnThread()
bool checkNoNullNorEmpty(const TPointerContainer &tPointerContainer)
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
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="")