我正在尝试在 EmguCV 3.1 中运行 LicensePlateRecognition 的示例。但我总是收到错误 System.DllNotFoundException 并且消息是“cvextern.dll 无法加载”。我正在运行 Windows 7 和 Visual Studio 2013(计算机由我公司提供)。
我将文件夹中的上述dll和其他一些dll复制到调试文件夹中(配置文件设置为调试模式,我尝试了x86和x64版本)。在一次又一次地收到错误后,我开始怀疑这是因为我的显卡驱动程序(一些谷歌结果表明是这样)。我更新了该错误仍然存在。
经过更多谷歌搜索后,我找到了 Dependency Walker。缺少一个文件“IEShims.dll”。我下载了它并将其放入调试文件夹中,但没有成功。
我认为一些输出可能是相关的。
从 C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64 加载打开的 cv 二进制文件
LoadLibraryEx C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\opencv_ffmpeg310_64.dll 失败,错误代码 87:参数不正确。
无法加载文件 C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\opencv_ffmpeg310_64.dll。
LoadLibraryEx C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\cvextern.dll 失败,错误代码 87:参数不正确。
无法加载文件 C:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64\cvextern.dll。
有谁知道这是怎么回事?
该错误似乎源于
#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:错误 TI1002:输入文件“D:\Resources\cvextern.dll”不是有效的类型库。