问题:

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. CentOS下NTP安装配置

      安装yum install ntp 配置文件 /etc/ntp.confrestrict default kod nomodifynotrap nopeer noqueryrestrict -6 ...

  2. HDU-2222

    Keywords Search Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  3. redis关闭保护模式

    1. set key出现的报错 在192.168.56.57客户端登录192.168.56.56的redis服务器时,报错如下: [root@localhost src]# ./redis-cli - ...

  4. 深入浅出Mysql索引

    索引的出现其实就是为了提高数据查询的效率,就像书的目录一样. 索引模型有三种常见.也比较简单的数据结构分别是哈希表.有序数组和搜索树. 哈希表 哈希表是一种以键 - 值(key-value)存储数据的 ...

  5. Python的hasattr() getattr() setattr() 函数使用方法(简介)

    hasattr(object, name)判断一个对象里面是否有name属性或者name方法,返回BOOL值,有name特性返回True, 否则返回False.需要注意的是name要用括号括起来 1 ...

  6. ASP.NET WebAPI 06 HttpMessageHandler管道

    HttpMessageHandler管道 在Web API的中,微软为了更好的进行架构扩展,采用的了一套管道设计----HttpMessageHander(其实WCF也有类似架构). 在整个管道中的头 ...

  7. LR参数和变量

    一.参数: 1. 在LR函数中可以直接使用参数.参数必须在双引号“”中才能应用.大部分情况下,可以直接用参数代替函数中双引号内的数据.如下使用方法: lr_save_string("http ...

  8. Codeforces Round #278 (Div. 1) B - Strip dp+st表+单调队列

    B - Strip 思路:简单dp,用st表+单调队列维护一下. #include<bits/stdc++.h> #define LL long long #define fi first ...

  9. 洛谷P3950 部落冲突 [LCT]

    题目传送门 部落冲突 格式难调,体面就不放了. 分析: julao们应该都看得出来就是个$LCT$板子,战争就$cut$,结束就$link$,询问就$find$.没了... 太久没打$LCT$,然后发 ...

  10. 【交叉染色法判断二分图】Claw Decomposition UVA - 11396

    题目链接:https://cn.vjudge.net/contest/209473#problem/C 先谈一下二分图相关: 一个图是二分图的充分必要条件: 该图对应无向图的所有回路必定是偶环(构成该 ...