标签:
系统win7 32位,只在这一台电脑上出现这种问题,已知VS编译是X86,在数台电脑上测试都正常。
后来把opencv的dll路径例如 E:\...\x86 加入到系统环境变量中就正常了。
emgucv安装里opencv的dll路径是这个样子 C:\Emgu\emgucv-windows-universal 3.0.0.2157\bin\x86,发布时把bin下的dll包括x86等拷贝到程序安装目录下。
但很奇怪这一台电脑无法使用,理论上emgucv发布不需要环境变量的。
还是要继续研究,欢迎知道的解答下。
官方解释:
If you see this exception, please check the following
cudart64_42_9.dll, cvextern.dll, npp64_42_9.dll, opencv_calib3dXXX.dll, opencv_contribXXX.dll, opencv_coreXXX.dll, opencv_features2dXXX.dll, opencv_flannXXX.dll, opencv_highguiXXX.dll, opencv_imgprocXXX.dll, opencv_legacyXXX.dll, opencv_mlXXX.dll, opencv_nonfreXXX.dll, opencv_objectdetectXXX.dll, opencv_videoXXX.dll,</code?> where <code>XXX
is the OpenCV version number.opencv_calib3dXXX.dll, opencv_contribXXX.dll, opencv_coreXXX.dll, opencv_features2dXXX.dll, opencv_highguiXXX.dll, opencv_imgprocXXX.dll, opencv_legacyXXX.dll, opencv_mlXXX.dll, opencv_objectdetectXXX.dll, opencv_videoXXX.dll
where XXX
is the OpenCV version number.cvXXX.dll, cvauxXXX.dll, cxcoreXXX.dll, highguiXXX.dll, opencv_ffmpegXXX.dll, mlXXX.dllcvextern.dll
where XXX
is the OpenCV version number.Download Dependency Walker and use it to open the "cvextern.dll" file. Check if any dependency is missing.
In this case, please try to build and run the examples. After building the examples, try to run the "Hello World" Program.
If "Hello World" runs without any problem, compare it with you project, find the difference in configuration and fix it.
If "Hello World" get the same "The type initializer for ‘Emgu.CV.CvInvoke‘ threw an exception." message, try to find out the InnerException and report it to the discussion forum
"Emgu.CV.CvInvoke”的类型初始值设定项引发异常 解决办法
标签:
原文地址:http://www.cnblogs.com/jhlong/p/5439383.html