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

Method work

include/openpose/face/wFaceRenderer.hpp:55–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected