| 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 | } |
nothing calls this directly
no test coverage detected