1 #ifndef OPENPOSE_CORE_W_SCALE_AND_SIZE_EXTRACTOR_HPP
2 #define OPENPOSE_CORE_W_SCALE_AND_SIZE_EXTRACTOR_HPP
10 template<
typename TDatums>
20 void work(TDatums& tDatums);
23 const std::shared_ptr<ScaleAndSizeExtractor> spScaleAndSizeExtractor;
37 template<
typename TDatums>
39 const std::shared_ptr<ScaleAndSizeExtractor>& scaleAndSizeExtractor) :
40 spScaleAndSizeExtractor{scaleAndSizeExtractor}
44 template<
typename TDatums>
49 template<
typename TDatums>
54 template<
typename TDatums>
66 for (
auto& tDatumPtr : *tDatums)
68 const Point<int> inputSize{tDatumPtr->cvInputData.cols(), tDatumPtr->cvInputData.rows()};
69 std::tie(tDatumPtr->scaleInputToNetInputs, tDatumPtr->netInputSizes, tDatumPtr->scaleInputToOutput,
70 tDatumPtr->netOutputSize) = spScaleAndSizeExtractor->extract(inputSize);
79 catch (
const std::exception& e)
83 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)
WScaleAndSizeExtractor(const std::shared_ptr< ScaleAndSizeExtractor > &scaleAndSizeExtractor)
void initializationOnThread()
void work(TDatums &tDatums)
virtual ~WScaleAndSizeExtractor()
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="")