Unable to load DLL 'opencv_core290'
问题:
In my winforms application I need to use some Emgu.CV libraries (I have installed Emgu 2.9).
Problem is that I get the following error:
System.TypeInitializationException was unhandled
     HResult=-2146233036Message=The type initializer for'Emgu.CV.OCR.Tesseract' threw an exception.Source=Emgu.CV.OCR
     TypeName=Emgu.CV.OCR.TesseractStackTrace:
         at Emgu.CV.OCR.Tesseract..ctor(String dataPath,String language,OcrEngineMode mode)
         at ANPR.LicensePlateDetector..ctor(String dataPath)in c:\Users\blabla\Visual Studio2012\Projects\ANPR\ANPR\LicensePlateDetector.cs:line 30
         at ANPR.Form1..ctor()in c:\Users\blabla\Visual Studio2012\Projects\ANPR\ANPR\Form1.cs:line 22InnerException:System.TypeInitializationExceptionHResult=-2146233036Message=The type initializer for'Emgu.CV.CvInvoke' threw an exception.Source=Emgu.CV
   TypeName=Emgu.CV.CvInvokeStackTrace:
        at Emgu.CV.CvInvoke.CV_MAKETYPE(Int32 depth,Int32 cn)
        at Emgu.CV.OCR.Tesseract..cctor()in c:\Emgu\emgucv-windows-universal-cuda 2.9.0.1922\Emgu.CV.OCR\Tesseract.cs:line 26InnerException:System.DllNotFoundExceptionHResult=-2146233052Message=Unable to load DLL 'opencv_core290':The specified module could not be found.(Exceptionfrom HRESULT:0x8007007E)Source=Emgu.CV
        TypeName=""StackTrace:
             at Emgu.CV.CvInvoke.cvRedirectError(CvErrorCallback errorHandler,IntPtr userdata,IntPtr prevUserdata)
             at Emgu.CV.CvInvoke..cctor()in c:\Emgu\emgucv-windows-universal-cuda 2.9.0.1922\Emgu.CV\PInvoke\CvInvoke.cs:line 266
This happens when trying to instantiate a new Tesseract object:
var tesseract =newTesseract("","eng",Tesseract.OcrEngineMode.OEM_TESSERACT_CUBE_COMBINED);
Since referencing "opencv_core290" does not work, I tried the workaround provided here. Basically, I copied the .dll to my project, added it by using "Add existing resource" and modified it's property to "Copy always". This did not work however. Thanks for any help!
解决方法:
I had this problem too. You should copy x86 and x64 folders from "yourEmguFolder/bin" to your project's output directory. Then build project again and run.
I solved it according to the description on this page EMGU WIKI
Unable to load DLL 'opencv_core290'的更多相关文章
- Unhandled Exception:System.DllNotFoundException: Unable to load DLL"**":找不到指定的模块
		
在项目中使用C#代码调用C++ DLL时.常常会出现这个问题:在开发者自己的电脑上运行没有问题,但是部署到客户电脑上时会出现下面问题: Unhandled Exception:System.DllNo ...
 - [ASP.NET 5]终于解决:Unable to load DLL 'api-ms-win-core-localization-obsolete-l1-2-0.dll'
		
11月12日,惊喜地发现SqlClient(System.Data.SqlClient.dll)跨平台了(对应的nuget包包是runtime.unix.System.Data.SqlClient), ...
 - Unable to load dll 的解决方案
		
前几天在做项目时,需要用到一个非托管的 dll 库,其实使用 .Net 的互操作技术可以很方便地调用非托管 dll 文件中的函数,但是在执行时出现了“Unable to load dll HRESUL ...
 - System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.
		
netcore 使用System.Drawing 出现如下错误: Unhandled Exception: System.TypeInitializationException: The type i ...
 - Unable to load DLL 'api-ms-win-core-localization-l1-2-0.dll': 找不到指定的模块
		
asp.net mvc 4.6 发布到WinServer2008R2 SP1 提示 错误 Unable to load DLL 'api-ms-win-core-localization-l1-2-0 ...
 - Centos 7 Asp.net core 使用QRCoder 报“Unable to load DLL 'gdiplus'"
		
环境: Centos7 .Net core 2.0 问题: 使用QRCoder 报“Unable to load DLL 'gdiplus'" 同 https://q.cnblogs.com ...
 - EasyPlayer RTSP播放器运行出现: Unable to load DLL 找不到指定的模块。exception from HRESULT 0x8007007E 解决方案
		
最近有EasyPlayer RTSP播放器的开发者反馈,在一台新装的Windows Server 2008的操作系统上运行EasyPlayer RTSP播放器出现"Unable to loa ...
 - SqlSugar解决SQLite访问的问题:Unable to load DLL 'SQLite.Interop.dll'
		
SqlSugar用的版本是4.5.9.5,访问SQLite数据提示错误.在本机调试一时没有什么错误,把代码发布到服务器上以后刚开始运行没有问题,一段时间后报错. English Message : C ...
 - uwp - 解决使用EntityFramework时报错“unable to load dll 'sqlite3':the specified module could not be found”
		
在使用uwp的ef过程中碰到一万个问题快折腾死我了,好在最后终于解决掉所有问题,但愿如此,因为在这之前先后发生不同的报错,不知道后面还会碰到新的问题不. 其中一个问题是这样的,生成能正常生成,但是启动 ...
 
随机推荐
- Ubuntu下Hadoop的安装和配置
			
最近又需要要搭hadoop环境,所以开始学习,下面是我的笔记,仅供大家参考! Hadoop安装: JDK1.6+ 操作系统:Linux,Window和Unix也可以做Hadoop的开发,只有Linux ...
 - log优化
			
isLoggable(Level level) 包含计算的日志记录用isLoggable判断下. debug info warn error ,一般记录error, 但是其他里面的计算还是 ...
 - 【58沈剑架构系列】DB主从一致性架构优化4种方法
			
需求缘起 大部分互联网的业务都是“读多写少”的场景,数据库层面,读性能往往成为瓶颈.如下图:业界通常采用“一主多从,读写分离,冗余多个读库”的数据库架构来提升数据库的读性能. 这种架构的一个潜在缺点是 ...
 - Python写网络爬虫爬取腾讯新闻内容
			
最近学了一段时间的Python,想写个爬虫,去网上找了找,然后参考了一下自己写了一个爬取给定页面的爬虫. Python的第三方库特别强大,提供了两个比较强大的库,一个requests, 另外一个Bea ...
 - 使用Unity解耦你的系统—PART3——依赖注入
			
继续学习Unity,在前几篇中已经将Unity的使用方法做了一个还算详细的介绍了,主要是如何通过代码及配置文件来注册对象之间的关系.Unity内置所有的生命周期管理使用介绍,及Unity的Regist ...
 - 【Java】 奇偶数的判断
			
判断方法(奇数): 错误判断方法:通过a%2==1来判断.(原因:负奇数对2取余的结果为-1) 正确判断方法:(1) 通过a%2!=0来判断. (2) ...
 - 【C#】线程问题
			
多线程编程对很多程序员来说并不容易,在启动访问相同数据的多个线程时,会间歇性地遇到难以发现的问题.如果使用任务.并行LINQ或Parallel类,也会遇到这些问题.为了避免这一系列问题,开发程序中必须 ...
 - 转:深入剖析 JavaScriptCore
			
ref:https://ming1016.github.io/2018/04/21/deeply-analyse-javascriptcore/ 深入剖析 JavaScriptCore
 - 洛谷P1291 [SHOI2002]百事世界杯之旅 [数学期望]
			
题目传送门 百事世界杯之旅 题目描述 “……在2002年6月之前购买的百事任何饮料的瓶盖上都会有一个百事球星的名字.只要凑齐所有百事球星的名字,就可参加百事世界杯之旅的抽奖活动,获得球星背包,随声听, ...
 - Python - 软件设计规范
			
为什么要设计好目录结构? "设计项目目录结构",就和"代码编码风格"一样,属于个人风格问题.对于这种风格上的规范,一直都存在两种态度: 一类同学认为,这种个人风 ...