Haar cascade classifiers

Ask question on using Emgu CV with C#

Haar cascade classifiers

Postby z3ngew » Sat Apr 28, 2012 12:00 am

Hello there,
i have wrote the code to find faces using Haar Cascade Classifiers but an error keep showing up every time i try to test the program

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


And the code is
Code: Select all
        private void ProcessFrame(object sender, EventArgs e)
        {
            img = capture.QueryFrame().Resize(350, 350, INTER.CV_INTER_AREA);
            imgray = img.Convert<Gray, byte>();

            imgray._EqualizeHist();

            HaarCascade face = new HaarCascade("C:\\Emgu\\emgucv-windows-x86 2.3.0.1416\\bin\\haarcascade_frontalface_default.xml");
            HaarCascade eye = new HaarCascade("C:\\Emgu\\emgucv-windows-x86 2.3.0.1416\\bin\\haarcascade_eye.xml");

            MCvAvgComp[][] faceDetected = imgray.DetectHaarCascade(
                face,
                1.1,
                10,
                Emgu.CV.CvEnum.HAAR_DETECTION_TYPE.DO_ROUGH_SEARCH,
                new Size(20, 20));
            foreach (MCvAvgComp f in faceDetected[0])
            {
                img.Draw(f.rect, new Bgr(Color.Blue), 2);
            }
            imageBox1.Image = img;
        }


Thanks in advance,
z3ngew
z3ngew
 
Posts: 46
Joined: Tue Mar 13, 2012 2:49 pm

Re: Haar cascade classifiers

Postby z3ngew » Sat Apr 28, 2012 12:22 am

I have added "cvextern" and all the other .dll files in the solution explorer but this message keep showing

I am using emgu version 2.3.1

Thanks,
z3ngew
z3ngew
 
Posts: 46
Joined: Tue Mar 13, 2012 2:49 pm

Re: Haar cascade classifiers

Postby z3ngew » Sat Apr 28, 2012 12:28 pm

I 've found the answer,
The solution is that the cvextern error does not mean that this file should be inserted in the solution manual ALONE
but a bunch of dll files should be :D

cudart64_32_16.dll
cufft64_32_16.dll
cvextern.dll
npp64_32_16.dll
opencv_calib3d220.dll
opencv_contrib220.dll
opencv_core220.dll
opencv_features2d220.dll
opencv_flann220.dll
opencv_gpu220.dll
opencv_highgui220.dll
opencv_imgproc220.dll
opencv_legacy220.dll
opencv_ml220.dll
opencv_objdetect220.dll
opencv_video220.dll

here's the link i got the info from (http://www.codeproject.com/Articles/257502/Creating-Your-First-EMGU-Image-Processing-Project)

But i have another question;
How can i create a custom xml file for something to be detected?


Thanks,
z3ngew
z3ngew
 
Posts: 46
Joined: Tue Mar 13, 2012 2:49 pm

Re: Haar cascade classifiers

Postby Lnear » Mon Jul 09, 2012 5:14 am

Thank's for your post it helps me as well !
Lnear
 
Posts: 6
Joined: Fri Jul 06, 2012 8:22 am


Return to C# Help

Who is online

Users browsing this forum: Bing [Bot] and 4 guests