0
嗨,我正在開發一個campera捕獲應用程序。我目前正在使用EmguCV 2.0。我獲得與下面的行的代碼中的錯誤:在當前上下文中不存在名稱捕獲錯誤
圖片圖像= 捕獲 .QueryFrame();
我已經加入EmguCV像Emgu.CV,Emgu.CV.UI,Emgu.CV.ML,Emgu.Util所要求的所有引用,但仍然給人一種錯誤說:
錯誤1名'捕捉'沒有在當前的背景下存在C:\ Documents和Settings \ TLNA \我的文檔\ Visual Studio 2010的\項目\ webcamcapture \ webcamcapture \ Form1.cs中27 38 webcamcapture
我從here得到了這段代碼。完整的程序代碼如下: -
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.UI;
using Emgu.CV.Structure;
using Emgu.CV.ML;
namespace webcamcapture
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
Image<Bgr, Byte> image = capture.QueryFrame();
pictureBox1.Image = image.ToBitmap(pictureBox1.Width, pictureBox1.Height);
}
}
}
是否像Capture s = new Capture(); – Haxed 2010-06-12 06:13:56
好吧,我試過這個Capture capture = new Emgu.CV.Capture();但我得到一個空白表格。 – Haxed 2010-06-12 06:16:12
thk mate它的工作 – Haxed 2010-06-12 06:25:41