LBP facedetect error in BeagleBone using C

asked 2014-06-26 06:08:16 -0600


I'm trying to do face detection in a BeagleBone, using a webcam (Logitec C310). Right now I have it working but the process is to slow, and I only have 4-5 Frames/second. I want to speed the process so I thought it might help to change from haar cascade to lbp cascade. Sadly when I do that I get an error. My program is in C. This is the line that is generating the Error :

CvHaarClassifierCascade* cascade = (CvHaarClassifierCascade*)cvLoad("lbpcascade_frontalface.xml",0,0,0);

And the error that I get is :

OpenCV Error: Unspecified error (The node does not represent a user object (unknown type?)) in cvRead, file /build/v2012.12/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/opencv-2.4.2-r3/opencv/modules/core/src/persistence.cpp, line 4996 terminate called after throwing an instance of 'cv::Exception'
what():  /build/v2012.12/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/opencv-2.4.2-r3/opencv/modules/core/src/persistence.cpp:4996: error: (-2) The node does not represent a user object (unknown type?) in function cvRead

Any ideas? What am I doing wrong? When I call (with the same line), the file then everything works. Additional info : Im using Angstrom v2012.12 , the compiled one from The openCv is the one from Angstrom Repositories, version 2.4.2 I got the lbpcascade_frontalface.xml file from the package opencv-app

If any other info is required, just let me know. Thanks a lot for the help.

Cheers, Bart

edit retag flag offensive close merge delete



CvHaarClassifierCascade <-- the old c-api functions can only use haarcascades, not lbp or hog ones.

but you should not use the deprecated c-api anyway, moving to c++ (cv::CascadeClassifier) will make it work.

berak gravatar imageberak ( 2014-06-26 07:00:10 -0600 )edit