{"id":2786,"date":"2022-08-30T15:27:46","date_gmt":"2022-08-30T15:27:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/16\/unable-to-load-dll-opencv_core242-the-specified-module-could-not-be-found-emgu-cv-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:46","modified_gmt":"2022-08-30T15:27:46","slug":"unable-to-load-dll-opencv_core242-the-specified-module-could-not-be-found-emgu-cv-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/unable-to-load-dll-opencv_core242-the-specified-module-could-not-be-found-emgu-cv-collection-of-common-programming-errors\/","title":{"rendered":"Unable to load DLL &#39;opencv_core242&#39;: The specified module could not be found. Emgu CV-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to start using emgu CV open CV for C#. But I&#8217;m having trouble making it work. I&#8217;m following this guide to make simple program using emgu CV Link but I get following error: (any idea what I&#8217;m doing wrong?)<\/p>\n<pre><code>    System.TypeInitializationException was unhandled\n      Message=The type initializer for 'Emgu.CV.CvInvoke' threw an exception.\n      Source=Emgu.CV\n      TypeName=Emgu.CV.CvInvoke\n      StackTrace:\n       at Emgu.CV.Image`2..ctor(String fileName) in c:\\Emgu\\emgucv-windows-x86-gpu 2.4.2.1777\\Emgu.CV\\Image.cs:line 144\n       at TEST.Form1.button1_Click(Object sender, EventArgs e) in c:\\documents and settings\\laci\\my documents\\visual studio 2010\\Projects\\TEST\\TEST\\Form1.cs:line 28\n       at System.Windows.Forms.Control.OnClick(EventArgs e)\n       at System.Windows.Forms.Button.OnClick(EventArgs e)\n       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)\n       at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)\n       at System.Windows.Forms.Control.WndProc(Message&amp; m)\n       at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)\n       at System.Windows.Forms.Button.WndProc(Message&amp; m)\n       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)\n       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)\n       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\n       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)\n       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)\n       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\n       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\n       at System.Windows.Forms.Application.Run(Form mainForm)\n       at TEST.Program.Main() in c:\\documents and settings\\laci\\my documents\\visual studio 2010\\Projects\\TEST\\TEST\\Program.cs:line 18\n       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)\n       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\n       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\n       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\n       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)\n       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\n       at System.Threading.ThreadHelper.ThreadStart()\n  InnerException: System.DllNotFoundException\n       Message=Unable to load DLL 'opencv_core242': The specified module could not be found. (Exception from HRESULT: 0x8007007E)\n       Source=Emgu.CV\n       TypeName=\"\"\n       StackTrace:\n            at Emgu.CV.CvInvoke.cvRedirectError(CvErrorCallback errorHandler, IntPtr userdata, IntPtr prevUserdata)\n            at Emgu.CV.CvInvoke..cctor() in c:\\Emgu\\emgucv-windows-x86-gpu 2.4.2.1777\\Emgu.CV\\PInvoke\\CvInvoke.cs:line 166\n       InnerException: \n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2014-02-16 13:39:26. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to start using emgu CV open CV for C#. But I&#8217;m having trouble making it work. I&#8217;m following this guide to make simple program using emgu CV Link but I get following error: (any idea what I&#8217;m doing wrong?) System.TypeInitializationException was unhandled Message=The type initializer for &#8216;Emgu.CV.CvInvoke&#8217; threw an exception. Source=Emgu.CV TypeName=Emgu.CV.CvInvoke StackTrace: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2786","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2786"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2786\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}