找传奇、传世资源到传世资源站!

实时图像视频显示

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

winform实时显示视频并截取图片,使用了emgucv实时图像视频显示 C#图形和图像处理-第1张
public void CaptureProcess(object sender, EventArgs arg) { frame = capture.QueryFrame(); imageBox_capture.Image = frame; } private void button_capture_start_Click(object sender, EventArgs e) { if (capture == null) { try { capture = new Capture(); } catch (NullReferenceException except) { MessageBox.Show(except.Message); } } if (capture != null) { if (capture_flag) { //Application.Idle = new EventHandler(CaptureProcess); capture_tick.Start(); button_capture_start.Text = "停止"; } else { //Application.Idle -= new EventHandler(CaptureProcess); capture_tick.Stop(); button_capture_start.Text = "开始"; } capture_flag = !capture_flag; } } private void button_capture_frame_Click(object sender, EventArgs e) { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Filter = "BMP文件|*.bmp|JPG文件|*.jpg|JPEG文件|*.jpeg|所有文件|*.*"; if (saveFileDialog.ShowDialog() == DialogResult.OK) { CvInvoke.cvSaveImage(saveFileDialog.FileName, this.frame, (IntPtr)0); } }

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复