Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Error

Tags:

emgucv

I am Beginner in Emgu and I am trying to Build a Program that Controls Mouse by face Movments.i found a Program that Controls Mouse By Face motions in Emgu Examples.But ii work not Correctly and when debugging ends , program shows this error : An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

This Error showed when i was tried to Create a new object of HaarCascade by this instruction : _face = new HaarCascade("haarcascade_frontalface_default.xml");

sorry,in can't wrie English well.

like image 201
Mehrdad Rashidian Avatar asked Nov 25 '25 05:11

Mehrdad Rashidian


1 Answers

OpenCV and Emgu runtime requirements are difficult to manage / figure out. The suggested installer script only works with 32 bit windows according to their (Emgu) web page (Anyone run a 32 bit windows these days?). And they only talk about Visual Studio, up to version 2010, two full versions behind current.

That being said, just brute force it. Try to run a Emgu example, if successful, copy the DLL folder structure exactly from that project into yours.

In my case I ended up adding Emgu.CV, Emgu.Util and Emgu.CV.UI projects to my solution AND copying the X86 and X64 folders full of OpenCV Dlls to my bin/debug folder. Maybe there is a better way, but this worked.

like image 182
Spiked3 Avatar answered Nov 28 '25 04:11

Spiked3



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!