MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / work

Method work

include/openpose/core/wCvMatToOpOutput.hpp:55–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54 template<typename TDatums>
55 void WCvMatToOpOutput<TDatums>::work(TDatums& tDatums)
56 {
57 try
58 {
59 if (checkNoNullNorEmpty(tDatums))
60 {
61 // Debugging log
62 opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
63 // T* to T
64 auto& tDatumsNoPtr = *tDatums;
65 // Profiling speed
66 const auto profilerKey = Profiler::timerInit(__LINE__, __FUNCTION__, __FILE__);
67 // cv::Mat -> float*
68 for (auto& tDatumPtr : tDatumsNoPtr)
69 tDatumPtr->outputData = spCvMatToOpOutput->createArray(
70 tDatumPtr->cvInputData, tDatumPtr->scaleInputToOutput, tDatumPtr->netOutputSize);
71 // Profiling speed
72 Profiler::timerEnd(profilerKey);
73 Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__);
74 // Debugging log
75 opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
76 }
77 }
78 catch (const std::exception& e)
79 {
80 this->stop();
81 tDatums = nullptr;
82 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
83 }
84 }
85
86 COMPILE_TEMPLATE_DATUM(WCvMatToOpOutput);
87}

Callers

nothing calls this directly

Calls 6

checkNoNullNorEmptyFunction · 0.85
opLogIfDebugFunction · 0.85
whatMethod · 0.80
errorFunction · 0.50
createArrayMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected