c# - What does "No suitable directory found to load unmanaged modules" mean in EMGU? -


i'm emgu/cv noob using using emgu3.0 (emgucv-windows-universal 3.0.0.2157), visual studio 2013, , target platform of "any cpu". i'm trying c# "hello world" app @ http://www.emgu.com/wiki/index.php/hello_world_in_csharp#hello_world_-_version_2 looks this:

using emgu.cv; using emgu.cv.cvenum; using emgu.cv.structure; using emgu.cv.ui; using system.drawing;  ...  //create 3 channel image of 400x200 using (mat img = new mat(200, 400, depthtype.cv8u, 3))  {    img.setto(new bgr(255, 0, 0).mcvscalar); // set blue color     //draw "hello, world." on image using specific font    cvinvoke.puttext(       img,        "hello, world",        new system.drawing.point(10, 80),        fontface.hersheycomplex,        1.0,        new bgr(0, 255, 0).mcvscalar);     //show image using imageviewer emgu.cv.ui    imageviewer.show(img, "test window");  } 

it builds ok. when ran got "the type initializer 'emgu.cv.matinvoke' threw exception." . . . @ line . . .

using (mat img = new mat(200, 400, depthtype.cv8u, 3)) 

also, in output window there's clue. before exception there's message unmanaged modules . . .

no suitable directory found load unmanaged modules  first chance exception of type 'system.typeinitializationexception' occurred in emgu.cv.dll 

any idea what's happening here or how debug it?

note: there's question on opencv unmanaged dlls not found asp.net involves different error message - "system.dllnotfoundexception" under different circumstances, (it has no accepted answers). error message produced system think 1 i'm getting produced emgu itself. if engu experts see how applies mine i'd appreciate it.

the emgu cannot find opencv dlls. simplest solution :

  • go emgu installation , bin folder
  • find inside folders x86 , x64
  • copy these folders bin\debug bin\release folder of project.
  • try again.

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -