问题:

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'的更多相关文章

  1. Unhandled Exception:System.DllNotFoundException: Unable to load DLL"**":找不到指定的模块

    在项目中使用C#代码调用C++ DLL时.常常会出现这个问题:在开发者自己的电脑上运行没有问题,但是部署到客户电脑上时会出现下面问题: Unhandled Exception:System.DllNo ...

  2. [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), ...

  3. Unable to load dll 的解决方案

    前几天在做项目时,需要用到一个非托管的 dll 库,其实使用 .Net 的互操作技术可以很方便地调用非托管 dll 文件中的函数,但是在执行时出现了“Unable to load dll HRESUL ...

  4. System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.

    netcore 使用System.Drawing 出现如下错误: Unhandled Exception: System.TypeInitializationException: The type i ...

  5. 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 ...

  6. 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 ...

  7. EasyPlayer RTSP播放器运行出现: Unable to load DLL 找不到指定的模块。exception from HRESULT 0x8007007E 解决方案

    最近有EasyPlayer RTSP播放器的开发者反馈,在一台新装的Windows Server 2008的操作系统上运行EasyPlayer RTSP播放器出现"Unable to loa ...

  8. SqlSugar解决SQLite访问的问题:Unable to load DLL 'SQLite.Interop.dll'

    SqlSugar用的版本是4.5.9.5,访问SQLite数据提示错误.在本机调试一时没有什么错误,把代码发布到服务器上以后刚开始运行没有问题,一段时间后报错. English Message : C ...

  9. uwp - 解决使用EntityFramework时报错“unable to load dll 'sqlite3':the specified module could not be found”

    在使用uwp的ef过程中碰到一万个问题快折腾死我了,好在最后终于解决掉所有问题,但愿如此,因为在这之前先后发生不同的报错,不知道后面还会碰到新的问题不. 其中一个问题是这样的,生成能正常生成,但是启动 ...

随机推荐

  1. “您查看的网页正在试图关闭窗口。是否关闭此窗口”的屏蔽方法(JavaScript)

    原文:http://www.cnblogs.com/tigerhuolh/archive/2011/04/14/2015634.html 用JS代码关闭窗口时会提示“您查看的网页正在试图关闭窗口.是否 ...

  2. golang之终端操作,文件操作

    终端操作 操作终端相关的文件句柄常量os.Stdin:标准输入os.Stdout:标准输出os.Stderr:标准错误输出 关于终端操作的代码例子: package main import " ...

  3. Sublime Text 2.0.2,Build 2221注册码

    Help ->Enter License,输入如下序列号: ----- BEGIN LICENSE ----- Andrew Weber Single User License EA7E-855 ...

  4. 常用 Java Profiling 工具的分析与比较

    转自:http://www.ibm.com/developerworks/cn/java/j-lo-profiling/index.html 在 Java 程序的开发过程中,不可避免地会遇到内存使用. ...

  5. Java学习(构造方法、this关键字、super应用)

    构 造 方 法 定义:对象创建时使用的方法,即在new一个新对象时,对应构造方法,直接对属性赋值. 语句格式:    修饰符(public 等) 构造方法名(必须跟当前类名一样,否则报错)(参数列表) ...

  6. 【C#】实现INotifyPropertyChanged的3种方法

    class StudentItemViewModel:INotifyPropertyChanged { public event PropertyChangedEventHandler Propert ...

  7. git团队开发常用命令

    Git >>>>>>>>>>>> git clone <项目地址,http(s)> 把云端的项目克隆到本地 git ...

  8. hihocoder 1500 EL SUENO

    树上背包. 简单的树形$dp$,计算出摧毁每一个节点所需的最小费用,背包即可. #include<bits/stdc++.h> using namespace std; struct X ...

  9. 深度学习基础系列(一)| 一文看懂用kersa构建模型的各层含义(掌握输出尺寸和可训练参数数量的计算方法)

    我们在学习成熟网络模型时,如VGG.Inception.Resnet等,往往面临的第一个问题便是这些模型的各层参数是如何设置的呢?另外,我们如果要设计自己的网路模型时,又该如何设置各层参数呢?如果模型 ...

  10. [HNOI2006]最短母串问题 --- AC自动机 + 隐式图搜索

    [HNOI2006]最短母串问题 题目描述: 给定n个字符串(S1,S2.....,Sn),要求找到一个最短的字符串T,使得这n个字符串(S1,S2,......,Sn)都是T的子串. 输入格式: 第 ...