/// <summary> /// Handles the OnCameraFrame event of the camDevice control. /// </summary> void camDevice_OnCameraFrame(object sender, WebCameraEventArgs e) { // img processing: 20-30 ms Filters.Flip(e.Frame, false, true); _camDevice.Set(); //pictureBox.Image = chkGrayScale.Checked ? //ImageProcessing.Filters.ToGrayScale(e.Frame) : //e.Frame; _pictureBox.Image = e.Frame; try { this.lblDeviceInfo.Text = "FPS: " + (1000 / (Environment.TickCount - _time)).ToString(); } catch (DivideByZeroException) { // this only happens when changing the device } _time = Environment.TickCount; if (OnFrame != null) { OnFrame(this, new OnFrameEventArgs(e.Frame)); } }
/// <summary> /// Handles the OnCameraFrame event of the camDevice control. /// </summary> void camDevice_OnCameraFrame(object sender, WebCameraEventArgs e) { // TODO: _pictureBox.Image = e.Frame; if (OnFrame != null) { OnFrame(this, new OnFrameEventArgs(e.Frame)); } throw new NotImplementedException(); }