예제 #1
0
파일: Form1.cs 프로젝트: yeerkkiller1/Go-AI
        private void btnConfigFilter_Click(object sender, EventArgs e)
        {
            if (frmFilter == null || frmFilter.IsDisposed)
                frmFilter = new frmCfgFilter();

            frmFilter.Show();
        }
예제 #2
0
파일: Form1.cs 프로젝트: yeerkkiller1/Go-AI
        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();
        }
예제 #3
0
파일: Form1.cs 프로젝트: yeerkkiller1/Go-AI
        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();
        }