matlab 人脸检测
来源:互联网 发布:心理咨询沙盘游戏知乎 编辑:程序博客网 时间:2024/06/02 22:08
参考网址:http://www.mathworks.com/help/vision/examples/face-detection-and-tracking-using-camshift.html
clear all;
clc;
faceDetector = vision.CascadeObjectDetector();
HOMEIMAGES_array=dir(fullfile('./video/','*.avi'));namelist = {};
nameindex = 0; i_index=0;
for i = 1:numel(HOMEIMAGES_array)
temp = HOMEIMAGES_array(i).name;
%for subject name
index_ = find(temp == '_');
name = temp(index_(3)+1:end);
ind = find(ismember(namelist,name));
if ~numel(ind)
nameindex = nameindex + 1;
namelist{nameindex} = name;
end
%for video frame
mov=mmread(['./video/',temp]);
mkdir(['./ytcelebrityface/',temp(1:size(temp,2)-4)]);
for m=1:mov.nrFramesTotal
if m<51
videoFrame=mov.frames(m).cdata;
% videoFrame = step(videoFileReader);
bbox = step(faceDetector, videoFrame);
% Draw the returned bounding box around the detected face.
% videoOut = insertObjectAnnotation(videoFrame,'rectangle',bbox,'Face');
if bbox
for ibox =1:size(bbox,1)
if size(bbox,1)>1
videoFace = imresize(imcrop(videoFrame,[bbox(ibox,:)]),[45,45]);
imwrite(videoFace,['./videoface/',temp(1:size(temp,2)-4),'/',num2str(m),'more',num2str(ibox),'.jpg'],'jpg');
else
videoFace = imresize(imcrop(videoFrame,[bbox]),[45,45]);
imwrite(videoFace,['./videoface/',temp(1:size(temp,2)-4),'/',num2str(m),'.jpg'],'jpg');
end
end
end
end
end
end
http://www.mathworks.com/help/vision/examples/face-detection-and-tracking-using-camshift.html
0 0
- matlab 人脸检测
- 基于PCA的人脸检测(Matlab版代码)
- 【模式识别】PCA检测人脸的简单示例MATLAB实现
- 【分享】Matlab人脸检测完整调试版
- Matlab人脸检测方法(Face Parts Detection)详解
- Matlab基于Viola-Jones算法的人脸检测(1)
- Matlab基于Viola-Jones算法的人脸检测(2)
- 基于肤色和眼睛定位的人脸检测算法——MATLAB实现
- 毕业设计——人脸检测——001 图片导入MATLAB
- 基于MATLAB的adaboost级联形式的人脸检测实现
- (转)总结matlab论坛中的人脸检测和识别(有多个测试库)
- 【分享】基于Gabor特征提取和人工智能神经网络的人脸检测matlab代码
- 使用MATLAB机器视觉工具箱实现人脸的检测和跟踪
- matlab自带的分类器对人脸、鼻子、嘴进行检测
- 基于Gabor特征提取和人工智能神经网络的人脸检测matlab代码
- PCA应用---检测人脸的简单示例 (MATLAB版)
- 基于肤色和眼睛定位的人脸检测算法——MATLAB实现
- 训练自己的人脸检测分类器(级联+LBP的Matlab的实现)
- 通过Httpclient的get,post获取手机号码信息
- Oracle与MySQL的几点区别
- java API------序列化和反序列化
- linux utility 介绍2
- python子进程模块subprocess详解与应用实例 之三
- matlab 人脸检测
- Gson简要使用笔记
- Java NIO 学习(二)
- 常见Flash小游戏开发核心思想笔记——《拼图》
- POI读取excel相关jar
- oracle linux 6.3安装图形界面软件
- Submit disabled Dropdown
- CDH与apache
- c++基础五---标准库类型(string ,vector)