matlab 人面检测

Create a detector object.

faceDetector = vision.CascadeObjectDetector;
Read input image.

I = imread('visionteam.jpg');
Detect faces.

bboxes = step(faceDetector, I);
Annotate detected faces.

IFaces = insertObjectAnnotation(I, 'rectangle', bboxes, 'Face');
figure, imshow(IFaces), title('Detected faces');

posted @ 2014-08-22 14:03  ahuo  阅读(577)  评论(0编辑  收藏  举报