加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – ‘Emgu.CV.CvInvoke’的类型初始化器抛出异常

发布时间:2020-12-15 06:51:10 所属栏目:百科 来源:网络整理
导读:我收到这个错误 The type initializer for ‘Emgu.CV.CvInvoke’ threw an exception. 当我尝试使用Emgu CV.我已经尝试了我能想到的一切,以解决这个问题,但它仍然提供相同的错误,当我点击它显示的按钮 Object reference not set to an instance of an object
我收到这个错误

The type initializer for ‘Emgu.CV.CvInvoke’ threw an exception.

当我尝试使用Emgu CV.我已经尝试了我能想到的一切,以解决这个问题,但它仍然提供相同的错误,当我点击它显示的按钮

Object reference not set to an instance of an object.

这是我正在尝试的代码:

void ProcessFunction(object sender,EventArgs e)
{
    imgOrg = capturecam.QueryFrame();
    if (imgOrg == null) return;
    imgProc = imgOrg.InRange(new Bgr(50,50,50),new Bgr(255,255,255));
    imgProc = imgProc.SmoothGaussian(9);
    imageBox1.Image = imgOrg;
    imageBox2.Image = imgProc;
}

我可能做错了什么,如何进一步调试?谢谢!

解决方法

我有同样的问题.我的内在异常是“无法加载DLL”opencv_core290“”.

您需要将x86和x64文件夹从“yourEmguFolder / bin”复制到项目的输出(bin)目录.然后再次建立项目并运行.

根据emgu wiki

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读