0
我工作在Windows 7 32位os上的Emgu cv和System.TypeInitializationException發生錯誤,我試過每個解決方案; 當我運行與Emgu來的例子是好的,但是當我創建我自己的項目時發生錯誤。Emgu System.TypeInitializationException在32位窗口7 OS
這是我的代碼;
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;
using Emgu.CV;
using Emgu.CV.Structure;
using Emgu.Util;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private Capture cap;
private bool capinpro;
public Form1()
{
InitializeComponent();
}
private void processframe(object o, EventArgs e)
{
Image<Bgr, byte> img = cap.QueryFrame();
imageBox1.Image = img;
}
private void button1_Click(object sender, EventArgs e)
{
if(cap!=null)
{
try
{
if (capinpro)
{
Application.Idle += processframe;
//i have also tried cap.start();
}
else
{
Application.Idle -= processframe;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
else
{
cap= new Capure();
}
}
}
}
錯誤發生在哪裏/何時? – joe
您是否包含所有程序集或僅包含一個? –
我已經包含了所有的參考文獻 – sami