前置(Ubuntu下配置c++dlib):https://blog.csdn.net/qq_34717531/article/details/107682381
需要文件:shape_predictor_68_face_landmarks.dat
dlib_face_recognition_resnet_model_v1.dat
haarcascade_frontalface_alt2.xml
前二个在这 http://dlib.net/files/ 下载,第三个opencv里有。
一、人脸检测
image.cpp(用opencv加载图像,然后调用dlib进行人脸检测,得到人脸所在区域以及特征点,最后还是用opencv描绘人脸特征点)
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing/render_face_detections.h>
#include <dlib/