0
点赞
收藏
分享

微信扫一扫

基于matlab的人脸检测,人眼检测

素材

基于matlab的人脸检测,人眼检测_指定位置

人脸检测

clear all
clc
img=imread('2.png');

detector = vision.CascadeObjectDetector;

release(detector);
detector.ClassificationModel='FrontalFaceCART'; %检测双眼
bboxes=detector(img);
EyePairBig=insertObjectAnnotation(img,'rectangle',bboxes,'face');%在指定位置上返回用矩形形状和标签注释的真彩色图像。
figure
imshow(EyePairBig);
saveas(gca, '1.jpg');

效果:
基于matlab的人脸检测,人眼检测_matlab_02
有注释,就不说别的了。

人眼检测

clear all
clc
img=imread('2.png');

detector = vision.CascadeObjectDetector;

release(detector);
detector.ClassificationModel='EyePairBig'; %检测双眼
bboxes=detector(img);
EyePairBig=insertObjectAnnotation(img,'rectangle',bboxes,'Eyes');%在指定位置上返回用矩形形状和标签注释的真彩色图像。
figure
imshow(EyePairBig);
saveas(gca, '2.jpg');

效果:
基于matlab的人脸检测,人眼检测_计算机视觉_03

参考文献

​​https://www.mathworks.com/help/vision/ref/vision.cascadeobjectdetector-system-object.html​​


举报

相关推荐

0 条评论