简体   繁体   中英

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM