#include <fstream>
#include <string>
#include <iostream>
#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 <opencv2/core/core.hpp>
#include <dlib/timer.h>
#include "highgui.h"
using namespace dlib;
using namespace std;
// ----------------------------------------------------------------------------------------
int main()
{
try
{
// We need a face detector. We will use this to get bounding boxes for
// each face in an image.
frontal_face_detector detector = get_frontal_face_detector();
// And we also need a shape_predictor. This is the tool that will predict face
// landmark positions given an image and face bounding box. Here we are just
// loading the model from the shape_predictor_68_fac
C++之Dlib库实现68个特征点人脸的提取(根据Dlib官网例程改写)
最新推荐文章于 2024-06-10 20:12:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)