redpranger
redpranger

Reputation: 21

Haar Cascades Emgu CV C# error

I tried using Haar Cascade algorithm for facial detection. However, I got problems in running the code. The error is located in the form and yes, I declared a global variable called haar.

Here is my code:

private void Form1_Load(object sender, EventArgs e)
        {
            capture = new Capture(0);
            haar = new HaarCascade("haarcascade_frontalface_default.xml");
        }

The error is this:

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

I really need your help guys. This is for my thesis.

Upvotes: 0

Views: 1176

Answers (1)

Tifa
Tifa

Reputation: 314

Have a look at the EmguCV documentation especially the "Open CV unmanaged dll" section Here, you need to copy the "x64" and/or "x86" directories from EmguCV/bin to the root of your application.

If you are running your application from Visual Studio as Debug, it would be MyApp/bin/Debug/ and don't forget to add EmguCV references in your project.

Upvotes: 1

Related Questions