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

Method work

include/openpose/pose/wPoseRenderer.hpp:62–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61 template<typename TDatums>
62 void WPoseRenderer<TDatums>::work(TDatums& tDatums)
63 {
64 try
65 {
66 if (checkNoNullNorEmpty(tDatums))
67 {
68 // Debugging log
69 opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
70 // Profiling speed
71 const auto profilerKey = Profiler::timerInit(__LINE__, __FUNCTION__, __FILE__);
72 // Render people pose
73 for (auto& tDatumPtr : *tDatums)
74 tDatumPtr->elementRendered = spPoseRenderer->renderPose(
75 tDatumPtr->outputData, tDatumPtr->poseKeypoints, (float)tDatumPtr->scaleInputToOutput,
76 (float)tDatumPtr->scaleNetToOutput);
77 // Profiling speed
78 Profiler::timerEnd(profilerKey);
79 Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__);
80 // Debugging log
81 opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
82 }
83 }
84 catch (const std::exception& e)
85 {
86 this->stop();
87 tDatums = nullptr;
88 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
89 }
90 }
91
92 COMPILE_TEMPLATE_DATUM(WPoseRenderer);
93}

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected