Ask Your Question
0

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

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

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
2

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

berak gravatar image

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

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

-lopencv_face

to your linker(g++) cmdline

edit flag offensive delete link more

Question Tools

1 follower

Stats

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

Seen: 531 times

Last updated: Dec 06 '19