加载面部级联时出错

时间:2015-04-04 11:54:06

标签: c++ opencv

我正在尝试在opencv中进行面部检测,但每次我尝试加载级联分类器时都会出现以下错误:

error LNK2019: unresolved external symbol "public: virtual __thiscall cv::CascadeClassifier::~CascadeClassifier(void)" (??1CascadeClassifier@cv@@UAE@XZ) referenced in function _main

我甚至不明白它是什么,有人可以帮助我吗?

#include "conio.h"
#include<math.h>
#include "opencv/cvaux.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
#include"opencv2/objdetect/objdetect.hpp"
#include<vector>

using namespace cv;
using namespace std; 

int main()
{
    CascadeClassifier face_cascade,eye_cascade;
    if(!face_cascade.load("D:\\OpenCV2.3\\opencv\\data\\haarcascades\\haarcascade_frontalface_alt2.xml"))
    {
        printf("\nerror loading face_cascade\n");
        return -1;
    }

    if(!eye_cascade.load("D:\\OpenCV2.3\\opencv\\data\\haarcascades\\haarcascade_eye.xml"))
    {
        printf("\nerror loading eye_cascade\n");
        return -1;
    }
    return 0;
}

0 个答案:

没有答案