private void Pipe_OnProcessEvent(int layerIndex, IntPtr data, int width, int height, int outputIndex) { if (layerIndex == cameraView.VideoPipe.OutYuvIndex) { OeipLiveManager.Instance.PushVideoFrame(0, data, width, height, cameraView.VideoPipe.YUVFMT); } else if (layerIndex == cameraView.VideoPipe.DarknetIndex) { if (width > 0) { personBox = PInvokeHelper.GetPInvokeArray <PersonBox>(width, data); Loom.QueueOnMainThread(() => { if (personBox == null) { return; } string msg = string.Empty; foreach (var px in personBox) { msg += " " + px.prob; } label.text = $"人数:{width} {msg}"; }); } } }
private void Pipe_OnProcessEvent(int layerIndex, IntPtr data, int width, int height, int outputIndex) { if (layerIndex == VideoPipe.OutIndex) { displayWF.UpdateImage(width, height, data); } else if (layerIndex == VideoPipe.DarknetIndex) { if (width > 0) { personBox = PInvokeHelper.GetPInvokeArray <PersonBox>(width, data); Action action = () => { if (personBox == null) { return; } string msg = string.Empty; foreach (var px in personBox) { msg += " " + px.prob; } this.label3.Text = $"人数:{width} {msg}"; }; this.TryBeginInvoke(action); } else { Action action = () => { this.label3.Text = $"无人"; }; this.TryBeginInvoke(action); } } }