Flandmark 介绍
Flandmark 是一个开源实现面部地标探测器。提供 MATLAB 接口。
C++ 示例代码:
#include "flandmark_detector.h" int main(int argc, char * argv[]) { // load flandmark model structure and initialize FLANDMARK_Model * model = flandmark_init("flandmark_model.dat"); // load input image IplImage *img = cvLoadImage("photo.jpg"); // convert image to grayscale IplImage *img_grayscale = cvCreateImage(cvSize(img->width, img->height), IPL_DEPTH_8U, 1); cvCvtColor(img, img_grayscale, CV_BGR2GRAY); // bbox with detected face (format: top_left_col top_left_row bottom_right_col bottom_right_row) int bbox[] = {72, 72, 183, 183}; // detect facial landmarks (output are x, y coordinates of detected landmarks) float * landmarks = (float*)malloc(2*model->data.options.M*sizeof(float)); flandmark_detect(img_grayscale, bbox, model, landmarks); }
Flandmark 官网
http://cmp.felk.cvut.cz/~uricamic/flandmark/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。