Dlib人脸关键点检测顺序
来源:互联网 发布:java架构师工作 编辑:程序博客网 时间:2024/06/05 16:49
dlib19.2 只可以使用VS2015update3进行cmake,不然会提示你c++11特性不能够支持,导致编译不通过。
- 人脸关键点检测关键代码
最好参考一下这篇博客Opencv与dlib联合进行人脸关键点检测与识别
Mat ProcessFace::DrawDetectedFace(){ Mat imgDrawFace = srcImage;//这个变量是指向待检测人脸的图片 for (int i = 0; i < (detectedFaceData ? *detectedFaceData : 0); i++) { short * p = ((short*)(detectedFaceData + 1)) + 6 * i; Rect opencvRect(p[0], p[1], p[2], p[3]); int x = p[0]; int y = p[1]; int w = p[2]; int h = p[3]; int neighbors = p[4]; printf("face_rect=[%d, %d, %d, %d], neighbors=%d\n", x, y, w, h, neighbors); Point left(x, y); Point right(x + w, y + h); cv::rectangle(imgDrawFace, left, right, Scalar(230, 255, 0), 4); dlib::rectangle dlibRect((long)opencvRect.tl().x, (long)opencvRect.tl().y, (long)opencvRect.br().x - 1, (long)opencvRect.br().y - 1); dlib::full_object_detection shape = sp(dlib::cv_image<uchar>(srcGrayImage), dlibRect); for (int i = 0; i<shape.num_parts(); i++) { shape.part(0).x(); //point pt = shape.part(i); int x = shape.part(i).x(); int y = shape.part(i).y(); char str[3]; itoa(i, str, 10); line(imgDrawFace, Point(shape.part(i).x(), shape.part(i).y()), Point(shape.part(i).x(), shape.part(i).y()), Scalar(0, i*3, 255), 2); putText(imgDrawFace, str, Point(shape.part(i).x(), shape.part(i).y()), FONT_HERSHEY_DUPLEX, 0.5, Scalar(0, 255, 0), 2); } //std::vector<dlib::full_object_detection> shapes; //shapes.push_back(shape);//把点保存在了shape中 //dlib::array<dlib::array2d<dlib::rgb_pixel>> face_chips; //extract_image_chips(dlib::cv_image<uchar>(srcGrayImage), get_face_chip_details(shapes), face_chips); //imgDrawFace = dlib::toMat(face_chips[0]); //cvtColor(imgDrawFace, imgDrawFace, CV_BGR2GRAY); } return imgDrawFace;}
- 人脸68个关键点分布情况
0 0
- Dlib人脸关键点检测顺序
- C++ Dlib Landmark 人脸关键点检测
- dlib 02 dlib人脸关键点检测器训练
- dlib、opencv - 人脸关键点定位
- 人脸关键点提取(dlib)
- Opencv与dlib联合进行人脸关键点检测与识别
- Dlib人脸检测及关键点描述的python实现
- Opencv与dlib联合进行人脸关键点检测与识别【转】
- 人脸关键点检测 ubuntu 16.04 + DLib + GPU(CUDA9 + cudnn7.0.5)
- python下通过dlib和opencv实现人脸对齐(包括关键点检测和仿射变换)
- 用dlib和opencv进行不同角度人脸检测及68个关键点提取(Python)
- 【dlib代码解读】人脸关键点检测器的训练
- 【dlib代码解读】人脸关键点检测器的训练
- dlib 03 dlib自带demo 人脸关键点检测器训练和测试
- 人脸关键点检测
- 人脸关键点检测
- dlib人脸检测
- 基础知识(十三)dlib python人脸检测 特征点定位
- 虚拟机和主机之间ping不通/开发板和虚拟机之间ping不通
- You need to run build with JDK or have tools.jar on the classpath.
- 2016/10/19
- HBase JAVA API 开发
- yii xss简单攻击
- Dlib人脸关键点检测顺序
- C#控制Excel格式的方法
- mybatis写兼容不同数据库的sql
- 生成二维码方法----C#
- 如何线程安全地遍历List:Vector、CopyOnWriteArrayList
- 基于Mongodb进行分布式数据存储
- 取得子线程的返回值(Future 搭载Callable)
- UVA10305 Ordering Tasks 拓扑排序
- 【noip 2012】开车旅行 倍增+双端链表