using Emgu.CV;
using Emgu.CV.Structure;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace EmguCvTest
{
public partial class Form1 : Form
{
Capture capture = null;
public Form1()
{
CvInvoke.UseOpenCL = false;//不使用OpenCL
InitializeComponent();
capture = new Emgu.CV.Capture();//初始化摄像头
Application.Idle += new EventHandler(Capture_ImageGrabbed);
}
private void Capture_ImageGrabbed(object sender,EventArgs e)
{
imageBox1.Image = capture.QueryFrame();
}
}
}
微信关注 奔跑的GISer 获取更多资源