我真的EgmuCVEmguCV TypeInitializationException
我试图捕捉摄像头图像用下面的代码是一个新手:
//Program.cs (Winform)
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.Util;
using Emgu.CV.Structure;
namespace EgmuCVTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Capture cp = new Capture();
ImageViewer imv = new ImageViewer();
Application.Idle += new EventHandler(delegate(object s, EventArgs ea)
{
imv.Image = cp.QueryFrame();
});
imv.ShowDialog();
}
}
}
我得到了如下错误:
我检查并在.exe文件夹中有所有必需的dll
对于我来说只是复制** ** cvextern.dll从'C:\ Emgu \ emgucv-windows-universal 3.0.0.2157 \ bin \ x86'到'... \ Visual Studio 2013 \ Projects \ ScreenAnalyzer \ TestProject \ bin \ Debug'工作以除去异常。 – 2015-11-27 10:08:26