没有合适的资源?快使用搜索试试~ 我知道了~
matlab人脸识别
5星 · 超过95%的资源 需积分: 41 37 下载量 116 浏览量
2018-01-03
17:03:54
上传
评论 7
收藏 4KB TXT 举报
温馨提示
基于matlab的笔记本摄像头人脸识别,可根据人脸的动作而动态的识别。
资源推荐
资源详情
资源评论
% 2018-01-03 created by 一湾清水
% 人脸识别
% 需要下载OS Generic Video Interface工具包
vidDevice = imaq.VideoDevice('winvideo', 1, 'MJPG_320x240', ...
'ROI', [1 1 320 240], ...
'ReturnedColorSpace', 'rgb', ...
'DeviceProperties.Brightness', 8, ...
'DeviceProperties.Sharpness', 8);
hVideoIn = vision.VideoPlayer;
hVideoIn.Name = 'Input Video';
hVideoOut = vision.VideoPlayer;
hVideoOut.Name = 'Output Video';
faceDetector = vision.CascadeObjectDetector();
pointTracker = vision.PointTracker('MaxBidirectionalError', 2);
numPts = 0;
while 1
videoFrame = step(vidDevice);
videoFrameOutput = videoFrame;
videoFrameGray = rgb2gray(videoFrame);
if numPts < 10
% Detection mode.
bbox = faceDetector.step(videoFrameGray);
if ~isempty(bbox)
% Find corner points inside the detected region.
points = detectMinEigenFeatures(videoFrameGray, 'ROI', bbox(1, :));
% Re-initialize the point tracker.
xyPoints = points.Location;
numPts = size(xyPoints,1);
release(pointTracker);
% 人脸识别
% 需要下载OS Generic Video Interface工具包
vidDevice = imaq.VideoDevice('winvideo', 1, 'MJPG_320x240', ...
'ROI', [1 1 320 240], ...
'ReturnedColorSpace', 'rgb', ...
'DeviceProperties.Brightness', 8, ...
'DeviceProperties.Sharpness', 8);
hVideoIn = vision.VideoPlayer;
hVideoIn.Name = 'Input Video';
hVideoOut = vision.VideoPlayer;
hVideoOut.Name = 'Output Video';
faceDetector = vision.CascadeObjectDetector();
pointTracker = vision.PointTracker('MaxBidirectionalError', 2);
numPts = 0;
while 1
videoFrame = step(vidDevice);
videoFrameOutput = videoFrame;
videoFrameGray = rgb2gray(videoFrame);
if numPts < 10
% Detection mode.
bbox = faceDetector.step(videoFrameGray);
if ~isempty(bbox)
% Find corner points inside the detected region.
points = detectMinEigenFeatures(videoFrameGray, 'ROI', bbox(1, :));
% Re-initialize the point tracker.
xyPoints = points.Location;
numPts = size(xyPoints,1);
release(pointTracker);
资源评论
- 普通网友2023-07-28这个文件中的代码经过精心优化,可以快速识别人脸,对于大规模应用非常合适。
- 余青葭2023-07-28使用这个文件可以准确地识别人脸,对于一些重要的安全应用非常有帮助。
- 西西里的小裁缝2023-07-28这个文件提供了一种简单而有效的方法来实现人脸识别,非常实用。
- 苗苗小姐2023-07-28我在使用这个文件时,发现它的算法设计相对简洁,易于理解和实施。
- 型爷2023-07-28使用这个文件可以轻松地对人脸进行识别,即使对于复杂的背景和不同表情也有较好的适应性。
烟锁风月
- 粉丝: 7
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功