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; }
// 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 }
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}"); }
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); } }