本文介绍了'OpenCvSharp.NativeMethods'的类型初始值设定项引发了异常。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OpenCVSharp库在C#中使用opencv。我正在尝试使用以下代码从文件加载图像:

I am using OpenCVSharp library to use opencv in C#. I'm trying to load image from a file using this code:

IplImage cap = Cv.LoadImage("D:\\eye1.jpg",LoadMode.AnyDepth);



但它显示异常:TypeInitializationException未处理;'OpenCvSharp.NativeMethods'的类型初始值设定项引发异常。我试过在谷歌搜索但无法获得任何帮助。


but it shows exception: "TypeInitializationException was unhandled;The type initializer for 'OpenCvSharp.NativeMethods' threw an exception." I have tried searching on google but can't get any help about it.

推荐答案


这篇关于'OpenCvSharp.NativeMethods'的类型初始值设定项引发了异常。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-15 22:11