I m working on a application that requires OpenCV object detection using Haar cascade classifier. I m using OpenCV 2.3.1 with VS2010 on a 64bit Windows Machine. I compiled and built OpenCV myself and didn t use any pre-compiled binaries.
First, I wanted to start meddling with the example facedetect.cpp that s included in OpenCV. I built it with no errors, but when I m trying to run it won t open the cascade classifier xml file (the CascadeClassifier.load() function returns false). I didn t change anything from the sample source code.
I m using the xml file that is distributed with OpenCV so the problem isn t with the xml file. I also made sure that the application can access and read the file using a simple fopen.
I believe (but not sure) that the problem seems to be that the cascade classifier is of an "old" type. But in the OpenCV documentation it is specifically implied that the new CascadeClassifier object can open both "old" and "new" cascade classifiers.
这里的链接:http://opencv.itseez.com/modules/objdetect/doc/cas_cadeification.html#cascadenalifier-load
我甚至利用了预先准备的开放CV2.2双手,并且与这xml公司进行了出色的工作。 然后,我试图汇编2.2种来源代码样本,并再次把罐装上Xml。
我知道,我可以尝试使用旧物体CvHaarClassifierCascade,但我更喜欢使用最新的开放CV及其物体。
是否有任何人把我究竟做什么错呢?