EmguCV学习-摄像头采集
来源:互联网 发布:知君本无邪txt 编辑:程序博客网 时间:2024/06/05 18:32
作者:分享技术、分享生活
转自:http://www.cnblogs.com/fitel/archive/2012/10/23/2735345.html
一、目的:
测试Emgu安装是否正确,摄像头采集测试。
二、背景知识:
1.什么是EmguCV?
其实就是OpenCV的C#版,对于我这种熟悉.net人来说比较容易上手。
2.如何安装EmguCV?
详见http://www.emgu.com/wiki/index.php/Main_Page,或百度一下,很容易安装。
三、安装环境:
VisualStudio2008 + Emgu V2.0.5
四、测试步骤:
1.程序界面设计
2.程序代码
/* * Wrote by james at 2012-10-11 * jamesking.chao@gmail.com */using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Emgu.CV;using Emgu.CV.Structure;using Emgu.Util;using System.Threading;namespace Emgu学习_摄像头采集显示{ public partial class Form1 : Form { private Capture capt; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.btnBegin.Enabled = true; this.btnEnd.Enabled = false; } private void GetFrame(object sender, EventArgs e) { Image<Bgr, Byte> frame = capt.QueryFrame(); imageBox1.Image = frame; } private void button1_Click(object sender, EventArgs e) { try { if (capt == null) capt = new Capture(); } catch (NullReferenceException excpt) { MessageBox.Show(excpt.Message); } if (capt != null) { btnBegin.Enabled = false; btnEnd.Enabled = true; Application.Idle += new EventHandler(GetFrame); } } private void btnEnd_Click(object sender, EventArgs e) { if (capt != null) { btnBegin.Enabled = true; btnEnd.Enabled = false; Application.Idle -= new EventHandler(GetFrame); } } }}
3.运行效果
0 0
- EmguCV学习-摄像头采集
- emgucv读取摄像头
- Emgucv摄像头使用
- EmguCV学习
- OpenCV学习——摄像头采集视频
- EmguCV学习之例程详解(02):仅用5行代码实现的摄像头监视
- EmguCV的配置和获取摄像头画面
- EmguCV学习笔记:Image
- EmguCV学习(一)
- EmguCV学习(二)
- EmguCV学习(三)
- EmguCv学习--AdaptiveThreshold函数
- Opencv学习——摄像头采集、录像、截图小工具
- Opencv学习——摄像头采集、录像、截图小工具
- -06-OpenCV通过USB摄像头采集图像【Xilinx-Petalinux学习】
- V4L2采集摄像头数据
- V4L2摄像头采集数据
- V4L2摄像头采集数据
- JAVA SWING 多线程实现扫描同一个网段的IP,以及选定IP的端口
- SPSS常用函数
- fuel安装配置过程详解
- js将字符串按照逗号分割
- A. Ksenia and Pan Scales
- EmguCV学习-摄像头采集
- OJ_1075
- 动态添加jquery Moblie元素
- 查询Oracle数据库中各对象占用空间情况
- 题目1050:完数
- ArcGIS for WPF下的Google图层
- VoltDB Truncate Table优化,性能提高加速N倍,是不是史上最快呢?
- SharedPreferences
- Apache Log4j 2.0-rc1 发布