dlib人脸检测共可检测出68个检测点
官网上的例子:http://dlib.net/face_landmark_detection_ex.cpp.html
进行适当的改写。
其中:D:\OpenCV\shape_predictor_68_face_landmarks.dat
是从 http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 下载的
#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/image_processing/render_face_detections.h>
#include <dlib/image_processing.h>
#include <dlib/gui_widgets.h>
#include <dlib/image_io.h>
#include <iostream>
using namespace dlib;
using namespace std;
int main(int argc, char** argv)
{
try
{
// This example takes in a shape model file and then a list of images to
// process. We will take these filenames in as command line arguments.
// Dlib comes with example images in the examples/faces folder so give
// those as arguments to this program.
// 这个例子需