相关文章推荐
好帅的香菜  ·  c++ ...·  4 月前    · 
力能扛鼎的领结  ·  曾媛 -·  1 年前    · 
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);
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. opencv_videoXXX.dll
(XXX - version of your OpenCV)
in the directory of your project (Project/bin/debug/).
And check that bit of libraries and your Visual Studio compiler match. (x86 or x64).
  • Read the question carefully.
  • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
  •