.net - EmguCV cvextern System.DllNotFoundException

标签 .net dll emgucv

我正在尝试在 EmguCV 3.1 中运行 LicensePlateRecognition 示例。但我总是收到错误 System.DllNotFoundException 并且消息是“无法加载 cvextern.dll”。我正在使用 Visual Studio 2013 运行 Windows 7(计算机由我公司提供)。

我将文件夹中的上述 dll 和其他一些 dll 复制到调试文件夹(配置文件设置为 Debug模式,我尝试了 x86 和 x64 版本)。一次又一次收到错误后,我开始怀疑这是因为我的视频卡驱动程序(一些谷歌结果建议如此)。我更新了它,错误仍然存​​在。

经过更多的谷歌搜索,我找到了 Dependency Walker。缺少一个文件“IEShims.dll”。我下载了它并将其放入调试文件夹,但没有运气。

我认为一些输出可能是相关的。

Loading open cv binary from C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64

LoadLibraryEx C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\opencv_ffmpeg310_64.dll failed with error code 87: The parameter is incorrect.

File C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\opencv_ffmpeg310_64.dll cannot be loaded.

LoadLibraryEx C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\cvextern.dll failed with error code 87: The parameter is incorrect.

File C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\cvextern.dll cannot be loaded.



有谁知道这有什么问题?

该错误似乎源于
#if !UNITY_IPHONE
     //Use the custom error handler
     RedirectError(CvErrorHandlerThrowException, IntPtr.Zero, IntPtr.Zero);
#endif

哪个在方法中
  /// <summary>
  /// Attempts to load opencv modules from the specific location
  /// </summary>
  /// <param name="modules">The names of opencv modules. e.g. "opencv_cxcore.dll" on windows.</param>
  /// <returns>True if all the modules has been loaded successfully</returns>
  public static bool DefaultLoadUnmanagedModules(String[] modules)

我尝试了一整天来寻找解决方案,但我真的不知道我现在能做什么。任何帮助表示赞赏。

编辑:我也试过 TlbImp 没有运气。

TlbImp : error TI1002 : The input file 'D:\Resources\cvextern.dll' is not a valid type library.

最佳答案

我在将项目从 Emgu 3.1.0.2282 升级到 3.1.0.2504-r16.12 时遇到类似问题后找到此页面

就我而言,这是因为我的 Win10 计算机没有 Visual C++ Redistributable for Visual Studio 2015安装。

更具体地说,在 Emgu 3.1.0.2282 中,“x86”和“x64”文件夹包含 msvcr120.dllmsvcp120.dll ,而在 3.1.0.2504 中,这些文件夹现在包含 vcruntime140.dllmsvcp140.dll .

更改日志或安装说明中没有提到新的依赖项,也没有迹象表明 cvextern.dll 由于 Visual C 运行时而失败 - 只有错误 bin\Debug\x64\cvextern.dll failed with error code 126: The specified module could not be found
我不需要复制 DLL 文件来解决这个问题:我的 bin 目录只包含 Emgu.CV.UIEmgu.CV.World DLL 文件,以及“x86”和“x64”文件夹(每个文件夹包含 4 个 DLL)。我提到这一点是为了让人们远离 Google 为旧版本 Emgu 提供的所有建议。

关于.net - EmguCV cvextern System.DllNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35955105/

相关文章:

javascript - .NET Core API 与来自 JavaScript 的 CORS

c++ - QT程序无法启动,因为缺少libgcc_s_dw2-1.dll

c# - 在哪里可以找到 Microsoft.Office.Interop.Word.dll (2010)?

c# - 在 OpenCVSharp 中水平翻转图像

c# - 数据访问层——模块化和可重用性

.Net 3.5 WebService 不能被 .Net 1.1 Windows App 调用

c# - Emgu OpenCV : Apply different Threshold values depending on text form[sharp/bold]

c# - 如何在 EmguCV C# 中实时刷新网络摄像头的直方图?

c# - 如何从 C# 就地更新命令行输出

c# - 知道 DLL 在什么上下文中运行