Example #1
0
        private void btnConfigFilter_Click(object sender, EventArgs e)
        {
            if (frmFilter == null || frmFilter.IsDisposed)
                frmFilter = new frmCfgFilter();

            frmFilter.Show();
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }