コード例 #1
0
        protected override void Work(CustomDatum[] datums)
        {
            try
            {
                if (datums != null)
                {
                    // Debugging log
                    OpenPose.DebugLog("", Priority.Low, -1, nameof(this.Work), "");
                    // Profiling speed
                    var profilerKey = Profiler.TimerInit(-1, nameof(this.Work), "");

                    foreach (var datum in datums)
                    {
                        // THIS IS THE ONLY LINE THAT THE USER MUST MODIFY ON THIS HPP FILE, by using the proper function
                        // and datum elements
                        this._UserPostProcessing.DoSomething(datum.CvOutputData, datum.CvOutputData);
                        // Profiling speed
                        Profiler.TimerEnd(profilerKey);
                        Profiler.PrintAveragedTimeMsOnIterationX(profilerKey, -1, nameof(this.Work), "");
                        // Debugging log
                        OpenPose.DebugLog("", Priority.Low, -1, nameof(this.Work), "");
                    }
                }
            }
            catch (Exception e)
            {
                this.Stop();
                datums = null;
                Console.WriteLine(e.Message);
            }
        }
コード例 #2
0
        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.DebugLog($"{message}", priority, -1, function, file);
            }
        }