-
大小: 2KB文件類型: .cpp金幣: 1下載: 0 次發布日期: 2021-06-03
- 語言: C/C++
- 標簽: matlab??face_landmar??dlib??
資源簡介
本人編寫的matlab實現調用dlib中人臉landmark提取的接口,具體可參考我的博客
代碼片段和文件信息
#include?“dlib/matrix.h“
#include?
#include?
#include?
#include?
//#include?
#include?“call_matlab.h“
using?namespace?dlib;
using?namespace?std;
void?mex_function(
const?matrix&?img_r
const?matrix&?img_g
const?matrix&?img_b
matrix&?bboxes
matrix&?shape
)
{
matrix?img(img_r.nr()img_r.nc());
rgb_pixel?PIXEL;
for?(long?r?=?0;?r? {
//?loop?over?all?the?columns
for?(long?c?=?0;?c? {
PIXEL.red?=?img_r(r?c);
PIXEL.green?=?img_g(r?c);
PIXEL.blue?=?img_b(r?c);
img(r?c)?=?PIXEL;
}
}
/*image_window?win;*/
frontal_face_detector?detector?=?ge
- 上一篇:c語言實現遠程控制鼠標
- 下一篇:基于QtQuick的QCustomPlot實現
評論
共有 條評論