matlab 调用dlib进行人脸检测

 

1:http://dlib.net/下载最新版本dlib源码,并解压

2:https://cmake.org/download/下载安装cmake工具

3:修改cmake_mex_wrapper文件

 

4:修改cmakelist.txt文件

 

5:使用cmake对dlib源码进行编译

 

6:添加库目录 D:\MATLAB\R2016b\extern\lib\win64\microsoft

 

7:添加附加库 libut.lib libmat.lib

 

:8:添加命令行参数/EXPORT:mexFunction

 

9:设置LandMarkDetectorDlib.mexw64所在路径

 

10:人脸检测代码

#include "dlib/matrix.h"
#include "dlib/image_processing/frontal_face_detector.h"
#include "dlib/image_processing/render_face_detections.h"
#include "dlib/image_processing.h"
using namespace dlib;
using namespace std;


/*!
    This file defines a function callable from MATLAB once you mex it. 

    It computes the same thing as the following MATLAB function:

        function [A, B] = example_mex_function(x, y, some_number)
            A = x+y;
            B = sum(sum(x+y));
            disp(['some_number: ' num2str(some_number)])
        end


    VALID INPUT AND OUTPUT ARGUMENTS
        The mex wrapper can handle the following kinds of input and output arguments:
        &

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值