private void btnConfigFilter_Click(object sender, EventArgs e) { if (frmFilter == null || frmFilter.IsDisposed) frmFilter = new frmCfgFilter(); frmFilter.Show(); }
private void btnApplyFilter_Click(object sender, EventArgs e) { System.Diagnostics.Stopwatch sWatch = new System.Diagnostics.Stopwatch(); sWatch.Start(); if (frmFilter == null || frmFilter.IsDisposed) frmFilter = new frmCfgFilter(); frmFilter.Show(); float[] filter = frmFilter.GetFilters(); CLFilter.ApplyFilter(imgDt, filter, true, cmbWorkDim.SelectedIndex == 1); bmp = imgDt.GetStoredBitmap(bmp); pic.Image = bmp; sWatch.Stop(); lblFps.Text = sWatch.Elapsed.ToString(); }
private void btnStartWebCam_Click(object sender, EventArgs e) { if (frmFilter == null || frmFilter.IsDisposed) frmFilter = new frmCfgFilter(); frmFilter.Show(); filterWebCam = frmFilter.GetFilters(); FilterInfoCollection devs = new FilterInfoCollection(FilterCategory.VideoInputDevice); delegRefreshPic = RefreshPic; vcd = new VideoCaptureDevice(devs[0].MonikerString); vcd.NewFrame += new NewFrameEventHandler(vcd_NewFrame); vcd.DesiredFrameSize = new Size(600, 400); vcd.Start(); }