1 #ifndef OPENPOSE_CORE_W_KEYPOINT_SCALER_HPP
2 #define OPENPOSE_CORE_W_KEYPOINT_SCALER_HPP
10 template<
typename TDatums>
14 explicit WKeypointScaler(
const std::shared_ptr<KeypointScaler>& keypointScaler);
18 void work(TDatums& tDatums);
21 std::shared_ptr<KeypointScaler> spKeypointScaler;
33 template<
typename TDatums>
35 spKeypointScaler{keypointScaler}
39 template<
typename TDatums>
44 template<
typename TDatums>
56 for (
auto& tDatum : *tDatums)
58 std::vector<Array<float>> arraysToScale{tDatum.poseKeypoints, tDatum.handKeypoints[0],
59 tDatum.handKeypoints[1], tDatum.faceKeypoints};
60 spKeypointScaler->scale(arraysToScale, tDatum.scaleInputToOutput, tDatum.scaleNetToOutput,
61 Point<int>{tDatum.cvInputData.cols, tDatum.cvInputData.rows});
70 catch (
const std::exception& e)
74 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
81 #endif // OPENPOSE_CORE_W_KEYPOINT_SCALER_HPP
#define COMPILE_TEMPLATE_DATUM(templateName)
Definition: datum.hpp:339
Definition: wKeypointScaler.hpp:11
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="")
WKeypointScaler(const std::shared_ptr< KeypointScaler > &keypointScaler)
Definition: wKeypointScaler.hpp:34
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
void work(TDatums &tDatums)
Definition: wKeypointScaler.hpp:45
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)
static void timerEnd(const std::string &key)
void initializationOnThread()
Definition: wKeypointScaler.hpp:40