Tôi đã viết chương trình đơn giản để mở hình ảnh và hiển thị hình ảnh trong VS 2010 trong C# sử dụng EmguCV nhưng tôi nhận được ngoại lệ sau đây:Loại initializer cho 'Emgu.CV.CvInvoke' ném một ngoại lệ
Các loại initializer cho 'Emgu.CV.CvInvoke' ném một ngoại lệ.
tại dòng Image<Bgr, Byte> myimg = new Image<Bgr, Byte>(openfile.FileName);
đây là mã của tôi ..
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.Util;
using Emgu.CV.Structure;
namespace imgdisplay2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void imageBox1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog openfile = new OpenFileDialog();
if (openfile.ShowDialog() == DialogResult.OK)
{
// imageBox1 =new Emgu.CV.UI.ImageBox() ;
Image<Bgr, Byte> myimg = new Image<Bgr, Byte>(openfile.FileName);
pictureBox1.Image = myimg.ToBitmap();
//imageBox1.Image =myimg ;
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
}
}
Mọi chi tiết về ngoại lệ? – Bort
Đăng InnerException, đó là một trong đó đếm. –