Hi! How create cv::face::drawFacemarks ? Here I found an example:
std::vector<Rect> faces;
std::vector<std::vector<Point2f> > landmarks;
facemark->getFaces(img, faces);
facemark->fit(img, faces, landmarks);
for(int j=0;j<rects.size();j++){
face::drawFacemarks(frame, landmarks[j], Scalar(0,0,255));
}
But I did not understand how to make this example work? Is there a working code with an example? I tried to do so, but the compiler returns errors: 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));
}