kyamagu / mexopencv

Collection and a development kit of matlab mex functions for OpenCV library
http://kyamagu.github.io/mexopencv
Other
659 stars 319 forks source link

Undefined Mex file error #140

Closed Msusan closed 9 years ago

Msusan commented 9 years ago

Hi. I've installed mexopencv package to connect Matlab and Open CV.The mex files were compiled but upon running a program="Face Detection" i get an error as "Undefined Mex file" and "cv.cascade classifier" unknown variable.Can anyone suggest me what to do.I am using Matlab R2013a 64bit,Windows 8.1 54 bit and Visual Studio 2010 64 bit.

amroamroamro commented 9 years ago

Are you sure you followed the steps described in the README file? Specifically:

Msusan commented 9 years ago

I forgot to add mexopencv before execution of sample programs.It worked for the first time but for "facedetection" I am getting an error-

Error using CascadeClassifier_
Invalid path or file specified

Error in cv.CascadeClassifier (line 33)
            this.id = CascadeClassifier_(filename);

Error in facedetect (line 10)
 classifier = cv.CascadeClassifier(xml_file);

can you please suggest as I have to use the haarcascade xml file for ear detection . Actually I have raspi kit and I am using Mexopencv Interface to dump C++ codes on the Raspberry Pi kit.Can you also suggest some ideas to make the work done .I am working for the project-"Ear Recognition System".Thanks in advance.

amroamroamro commented 9 years ago

@Msusan The above error indicates that the specified path to the HaarCascade XML file is incorrect...

If I remember correctly, there's already a trained classifier in OpenCV for detecting left/right ears. You can find the XML files here: https://github.com/Itseez/opencv/tree/2.4/data/haarcascades

I just tried it myself with haarcascade_mcs_leftear.xml using the facedetect sample and it worked fine. (Perhaps you should also refer to the paper on ear-detection mentioned in the XML file comments)

I don't know about the Raspberry Pi stuff, but you might get help on other sites like Stack Overflow or OpenCV Q&A.

amroamroamro commented 9 years ago

@kyamagu: As this is not a valid bug report, I'm voting to close..

kyamagu commented 9 years ago

@amroamroamro Agreed