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);
20 void work(TDatums& tDatums);
23 std::shared_ptr<KeypointScaler> spKeypointScaler;
35 template<
typename TDatums>
37 spKeypointScaler{keypointScaler}
41 template<
typename TDatums>
46 template<
typename TDatums>
51 template<
typename TDatums>
63 for (
auto& tDatum : *tDatums)
65 std::vector<Array<float>> arraysToScale{tDatum.poseKeypoints, tDatum.handKeypoints[0],
66 tDatum.handKeypoints[1], tDatum.faceKeypoints};
67 spKeypointScaler->scale(arraysToScale, tDatum.scaleInputToOutput, tDatum.scaleNetToOutput,
68 Point<int>{tDatum.cvInputData.cols, tDatum.cvInputData.rows});
70 spKeypointScaler->scale(tDatum.poseCandidates, tDatum.scaleInputToOutput, tDatum.scaleNetToOutput,
71 Point<int>{tDatum.cvInputData.cols, tDatum.cvInputData.rows});
80 catch (
const std::exception& e)
84 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
91 #endif // OPENPOSE_CORE_W_KEYPOINT_SCALER_HPP
virtual ~WKeypointScaler()
Definition: wKeypointScaler.hpp:42
#define COMPILE_TEMPLATE_DATUM(templateName)
Definition: datum.hpp:390
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:36
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:52
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:47