예제 #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            Debug.SetDebugAction((s) =>
            {
                this.Invoke((MethodInvoker) delegate
                {
                    txtConsole.AppendText(s + Environment.NewLine);
                });
            });
            KeyUtils.WindowToSendKeysIn = Constants.KO_WINDOW;
        }
예제 #2
0
    // Start is called before the first frame update
    async void Start()
    {
#if ENABLE_WINMD_SUPPORT
        statusBlock.text     = "Starting camera...";
        _videoFrameProcessor = await VideoFrameProcessor.CreateAsync();

        Debug.Log("Created video frame processor");
        _faceTrackerProcessor = await FaceTrackerProcessor.CreateAsync(_videoFrameProcessor);

        statusBlock.text = "No faces detected";
        _isReadyToRender = true;
#endif
    }
예제 #3
0
 private void OnElapsed(object sender, ElapsedEventArgs e)
 {
     _timer.Stop();
     System.Diagnostics.Stopwatch watch = System.Diagnostics.Stopwatch.StartNew();
     try
     {
         //ReadDcMessage();
     }
     catch (Exception ex)
     {
         Console.WriteLine("Errorr: " + ex.Message);
     }
     watch.Stop();
     Debug.Log($"took {watch.ElapsedMilliseconds}");
 }
예제 #4
0
        private void ReadDcMessage()
        {
            System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
            watch.Start();
            var info = ImgUtils.ProcessImage(360, 300, 530, 320, 2f);

            if (info != null && info.Ex == null && !string.IsNullOrEmpty(info.Text))
            {
                watch.Stop();
                Debug.Log($"Text: {info.Text} in {watch.ElapsedMilliseconds} ms");
            }
            else
            {
                Debug.Log("Error: " + info.Ex);
            }
        }