Ask Your Question

undefined reference to `cv::face::createFacemarkLBF()'

asked 2019-12-06 07:54:21 -0500

Mihailllll gravatar image

Hi! I use ubuntu 18, c++ in Qt. I wnat use this code, but i get this error: undefined reference to `cv::face::createFacemarkLBF()'

     std::vector<cv::Rect> faces;
    std::vector<std::vector<cv::Point2f> > landmarks;
    cv::Ptr<cv::face::Facemark> facemark = cv::face::createFacemarkLBF();
    //cv::Ptr<cv::face::Facemark> facemark = cv::face::createFacemarkAAM();
    facemark->getFaces(img, faces);
    facemark->fit(img, faces, landmarks);
    for(int j=0;j<rects.size();j++){
        cv::face::drawFacemarks(frame, landmarks[j], Scalar(0,0,255));
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-12-06 08:12:33 -0500

berak gravatar image

undefined reference to `cv::face::createFacemarkLBF()'

you're not linking the resp. face library, add


to your linker(g++) cmdline

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-12-06 07:54:21 -0500

Seen: 27 times

Last updated: Dec 06 '19