protected override void Work(StdSharedPtr <CustomDatum>[] datums) { try { if (datums != null) { // Debugging log OpenPose.LogIfDebug("", Priority.Low, -1, nameof(this.Work), ""); // Profiling speed var profilerKey = Profiler.TimerInit(-1, nameof(this.Work), ""); foreach (var datum in datums) { // THESE 2 ARE THE ONLY LINES THAT THE USER MUST MODIFY ON THIS HPP FILE, by using the proper // function and datum elements using (var cvOutputData = OpenPose.OP_OP2CVMAT(datum.Get().CvOutputData)) this._UserPostProcessing.DoSomething(cvOutputData, cvOutputData); // Profiling speed Profiler.TimerEnd(profilerKey); Profiler.PrintAveragedTimeMsOnIterationX(profilerKey, -1, nameof(this.Work), ""); // Debugging log OpenPose.LogIfDebug("", Priority.Low, -1, nameof(this.Work), ""); } } } catch (Exception e) { this.Stop(); datums = null; Console.WriteLine(e.Message); } }
public void DebugLog() { const string message = nameof(this.DebugLog); const string function = nameof(this.DebugLog); const string file = "OpenPoseTest.cs"; foreach (var priority in Enum.GetValues(typeof(Priority)).Cast <Priority>()) { OpenPose.LogIfDebug($"{message}", priority, -1, function, file); } }