dlib人脸检测功能介绍

本文主要介绍三个点:
1. 如何单独建立一个工程,使用dlib的人脸检测功能。
2. 提高人脸检测率的两个方法
3. 加速人脸检测的方法
下面围绕这几个点展开叙述。

建人脸检测工程

1 . 首先我们先使用上期说的examples里的人脸检测。
我们只要将face_detection_ex设为启动项,即可运行。效果如下:

2. 建立单独的工程。像其他正常的方法,建立一般的工程。然后
在项目 属性中选择C/C++ :
常规-》附加包含目录:填写之前准备好的dlib的include的路径,我这里是:D:\dlib_win32\include
预处理器定义:
WIN32
_WINDOWS
DLIB_PNG_SUPPORT
DLIB_JPEG_SUPPORT
NDEBUG
DLIB_HAVE_AVX
链接器-》常规-》附加库目录:填写你要加的库目录。我这里是
D:\dlib_win32\lib
输入-》附加依赖项:dlib.lib
命令行-》其它选项:/arch:AVX
最后在配置属性-》调试中添加:你要检测的图片的路径,
main.cpp可以使用dlib提供的官方示例:

// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
/*

    This example program shows how to find frontal human faces in an image.  In
    particular, this program shows how you can take a list of images from the
    command line and display each on the screen with red boxes overlaid on each
    human face.

    The examples/faces folder contains some jpg images of people.  You can run
    this program on them and see the detections by executing the following command:
        ./face_detection_ex faces/*.jpg


    This face detector is made using the now classic Histogram of Oriented
    Gradients (HOG) feature combined with a linea
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值