1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/ZZWUk59x
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
人脸识别系统的研究始于20世纪60年代,80年代后随着计算机技术和光学成像技术的发展得到提高,而真正进入初级的应用阶段则在90年后期,并且以美国、德国和日本的技术实现为主;人脸识别系统成功的关键在于是否拥有尖端的核心算法,并使识别结果具有实用化的识别率和识别速度;“人脸识别系统”集成了人工智能、机器识别、机器学习、模型理论、专家系统、视频图像处理等多种专业技术,同时需结合中间值处理的理论与实现,是生物特征识别的最新应用,其核心技术的实现,展现了弱人工智能向强人工智能的转化。
训练集的人脸图像验选取剑桥大学ORL人脸数据库。一共40个人,每人10张人脸图像,随机选取7张用作训练,图像分辨率为112*92.将原始图像的每一行的像素串联在一起,产生一个具有112*92个元素的列向量,每个图像被视为一个向量。人脸原图片的尺寸是112 x 92,并横向的进行翻转、平移等-系列的操作来拓展数据集大小。
4.部分源码
......................................................................
for i=1:40
sub_dir = strcat('s', num2str(i));
images = cell(10);
for j=1:10
filename = fullfile(input_dir, sub_dir, strcat(num2str(j), '.pgm'));
images{j} = imread(filename);
end
images = images(randperm(10));
img = zeros(image_dims);
for j=1:7
img = img + double(images{j});
end
img = img / 7;
train_images(:, i) = img(:);
for j=8:10
test_images{i,j-7}=images{j};
end
end
% steps 1: mean-shifted
mean_face = mean(train_images, 2);
shifted_images = train_images - repmat(mean_face, 1, num_images);
% steps 2: ordered eigenvectors and eigenvalues
[full_evectors, score, evalues] = pca(train_images');
result = zeros(39, 2);
for num_eigenfaces = 1:39
evectors = full_evectors(:, 1:num_eigenfaces);
features = evectors' * shifted_images;
cnt = 0;
for i=1:40
for j=1:3
input_image = double(test_images{i,j});
...................................................................
if match_ix == i
cnt = cnt + 1;
else
end
end
end
result(num_eigenfaces, 1) = cnt;
result(num_eigenfaces, 2) = cnt / 120;
end
figure, plot(result(:, 2),'-bs',...
'LineWidth',2,...
'MarkerSize',8,...
'MarkerEdgeColor','k',...
'MarkerFaceColor',[0.0,0.9,0.0]);
xlabel('特征维度')
ylabel('识别率')
xlim([1 39]), ylim([0 1]), grid on;
a333