Emgu配置 pictureBox与imageBox等
来源:互联网 发布:淘宝上架后用不用管了 编辑:程序博客网 时间:2024/06/03 21:10
(1)Emgu配置:
http://blog.sina.com.cn/s/blog_4a185333010156ig.html
写的非常全面。
注意:右键单击“解决方案资源管理器”中刚才所建项目下的“引用”,选择“添加引用”;在新弹出的窗口中选择“浏览”,到目录:C:\Emgu\emgucv-windows-x86 2.3.0.1416\bin下,选择:Emgu.CV.dll、Emgu.CV.ML.dll、Emgu.CV.UI.dll、Emgu.Util.dll、ZedGraph.dll等共五个DLL文件,并点击确定加入
可以在reference里面,add reference,就可以了。
(2)使用emgu打开摄像头
private Capture _capture;
private bool _captureInProgress;
private void ProcessFrame(object sender, EventArgs arg)
{
Image<Bgr, Byte> frame = _capture.QueryFrame();
imageBox1.Image = frame;
}
private void button2_Click(object sender, EventArgs e)
{
#region if capture is not created, create it now
if (_capture == null)
{
try
{
_capture = new Capture(0);
}
catch (NullReferenceException excpt)
{
MessageBox.Show(excpt.Message);
}
}
#endregion
if (_capture != null)
{
if (_captureInProgress)
{ //stop the capture
button2.Text = "打开摄像头";
Application.Idle -= ProcessFrame;
}
else
{
//start the capture
button2.Text = "关闭摄像头";
Application.Idle += ProcessFrame;
}
_captureInProgress = !_captureInProgress;
}
}
非常简单,比直接打开方便很多。
出现的问题:_capture = new Capture(0);
实例化的时候总是报错,是说unload opencv_core290.dll。
解决的办法是:将emgucv bin 中x86中的dll全部(注意是全部,只拷unload opencv_core290.dll不行,拷x86整个文件夹也不行,只修改path也不行)拷如新建的工程的bin 中的debug里。
修改path:计算机——属性——高级系统设置——高级——环境变量
(3)emgu中imagebox与picturebox
imagebox 是emgu 设置好厚,新出现的控件。
这个可以用: Image<Bgr, Byte> frame = _capture.QueryFrame();
imageBox1.Image = frame;
picturebox是窗体中原有的: Image<Bgr, Byte> frame = _capture.QueryFrame();
imageBox1.Image =frame.ToBitmap();
就是这个差别。
C# 调用带参数EXE文件及带启动参数EXE:http://blog.csdn.net/lonet/article/details/4742256
将C++程序写为dll文件,再进行调用:http://wenku.baidu.com/view/d1b7e9fd910ef12d2af9e73c.html
C#读txt文件的方法:http://wenku.baidu.com/view/8fab9e62caaedd3383c4d328.html
- Emgu配置 pictureBox与imageBox等
- emgu+vs2010 找不到ImageBox控件?
- emgu 配置
- Emgu CV2.3里 C#人脸检测例程 显示在Imagebox
- Windows7 64位机上Emgu CV2.4.2安装与配置
- 【Emgu】一起学EmguCV(一)配置与使用
- 【Emgu】一起学EmguCV(一)配置与使用
- WPF Image控件&Emgu Image控件&WinForm PictureBox控件
- EMGU CV环境配置
- Emgu Cv配置--VS2010、C#、Emgu CV配置
- VS2010、C#、Emgu CV配置
- Emgu与Aforge速度测试
- lable picturebox等控件背景颜色透明
- win8.1 下 VS2013 + Emgu Cv 配置
- win8.1 下 VS2013 + Emgu Cv 配置
- Emgu在VS2012中的安装和配置
- C#+vs2013+windows10配置emgu技巧
- 配置Emgu时常出现的错误-解决方案
- Oracle索引创建——新增数据创建索引,历史数据不创建索引
- MyBatis 详解
- 怎样批量删除.svn文件
- CSS3中和动画有关的属性transform、transition 和 animation
- java程序生成桌面可执行程序
- Emgu配置 pictureBox与imageBox等
- c# winform最大化覆盖全屏幕(formborderstyle=none)怎么处理?
- 第十三周项目一(3) 按条件输出数据
- MYSQL错误号大全
- 第13周项目5-字符串操作(6、每个数字字符出现的个数)
- Java Serializable接口实现问题
- Android客户端项目全局异常处理和服务器数据保存
- shell遍历一个日期范围
- 为什么C++编译器不能支持对模板的分离式编译