The type initializer for 'OpenCvSharp.NativeMethods' threw an exception


I have an ASP.NET MVC(C#) application with 3 projects.

  1. Main web app
  2. A Project which processes images
  3. Test Project

Both the test project and the main project have references to the second project and Emgu.CV and both call function are written in the second project.

The function call from test project is always successful and image processing is done but I get below error while calling from web app:

The type initializer for 'OpenCvSharp.NativeMethods' threw an exception.

More details of exception are:

Unable to load DLL 'OpenCvSharpExtern': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

The code on which error come is :

var sourceImageMat = BitmapConverter.ToMat(sourceImage);

Can somebody help me in solving this issue?

asked on Stack Overflow Feb 24, 2019 by Developer • edited Feb 24, 2019 by Prashant Pimpale

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0