无法在 C# 项目中加载 cvextern [英] unable to load cvextern in a c# project

查看:47
本文介绍了无法在 C# 项目中加载 cvextern的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试调试我的程序,在 c# 中使用 emgu 和 HaarCascade.我遇到了这样的异常:

i'm trying to debug my program, using emgu and HaarCascade in c#. i'm getting an exception like so :

无法加载 DLL 'cvextern':找不到指定的模块.(来自 HRESULT 的异常:0x8007007E)

Unable to load DLL 'cvextern': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

我已将文件 cvextern.dll 添加到我的项目中,并尝试了文件属性上的始终复制"和如果更新则复制"选项.此外,构建在 x64 平台上.

i've added the file cvextern.dll to my project and tried both "copy always" and "copy if newer" options on the properties of the file. also, the build is in platform x64.

这是我写的部分内容:

    private void Load_Click(object sender, EventArgs e)
    {
        OpenFileDialog dlg = new OpenFileDialog();
        dlg.Filter = "Photo Files (*.jpg)|*.JPG";
        dlg.CheckFileExists = true;
        if (dlg.ShowDialog() == DialogResult.OK)
        {
            Image<Bgr, Byte> My_Image = new Image<Bgr, byte>(dlg.FileName);
            HaarCascade face = new HaarCascade("haarcascade_frontalface_alt.xml");

异常在最后一行.

推荐答案

您收到的错误不仅仅在于 cvextern 这个 dll 实际上指向几乎所有其他 opencv dll 并且所有这些都是必需的.出现此错误时,您的项目中将需要以下 dll.

The error your receiving is not solely down to cvextern this dll actually points to almost all of the other opencv dlls and all are required. With this error you will require the following dll in your project.

请注意,220"是版本号,它将根据更新而更改.

Note that the "220" is the version number this will change according to updates.

  • cudart64_32_16.dll
  • cufft64_32_16.dll
  • cvextern.dll
  • npp64_32_16.dll
  • opencv_calib3d220.dll
  • opencv_contrib220.dll
  • opencv_core220.dll
  • opencv_features2d220.dll
  • opencv_flann220.dll
  • opencv_gpu220.dll
  • opencv_highgui220.dll
  • opencv_imgproc220.dll
  • opencv_legacy220.dll
  • opencv_ml220.dll
  • opencv_objdetect220.dll
  • opencv_video220.dll

在我关于 codeproject here 的文章中,此错误与其他错误一起讨论.

This error is covered along with others in my article on codeproject here.

任何其他问题让我知道,

Any other problems let me know,

干杯,

克里斯

这篇关于无法在 C# 项目中加载 cvextern的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆