Alex
Alex

Reputation: 11147

exact copy of emgucv example won't work even if the example in the solution works

I am interested in using Emgucv for face detection. I have installed emgucv and tested the camera capturing example . It works fine .. so i copied the solution out of the emgu folder , reintroduced the refereces emgu.cv.dll , emgu.cv.ui.dll , emgu.util.dll and i doesn't work . i get the following error :

The type initializer for 'Emgu.CV.CvInvoke' threw an exception.

Does anyone know why this happens ?

Upvotes: 0

Views: 1462

Answers (1)

Kaveh Shahbazian
Kaveh Shahbazian

Reputation: 13523

It is because: 1 - It has references (with relative path) to Emgu dlls (say in C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin). 2 - Output path for compilation is set to C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin too.

So if you reference necessary dlls and put the compiled exe in C:\Emgu\emgucv-windows-x86 2.2.1.1150\bin or a copy of it, it will work.

Upvotes: 2

Related Questions