您现在的位置:首页 >> 技术文章 >> MATLAB技术 >> 内容

matlab代做-基于matlab人脸检测

时间:2018-3-1 23:37:21 点击:

  核心提示:matlab代做-基于matlab人脸检测 ...

clc
clear all
close all
clear memory
nump=40; %no_of_classes
nots=5; %no_of_training_set
D=pwd;
cd([D, '\ORLDatabase']);
[face,MAP]=imread('face1.bmp');
[a,b]=size(face);
counter=0;
for i=1:nump
for j=1:nots
file=['face' int2str((i-1)*10+j) '.bmp'];
[face,MAP]=imread(file);
grayface=ind2gray(face,MAP);
counter=counter+1;
X(counter,:)=double(reshape(grayface,a*b,1));
end
end
counter=0;
for i=1:nump
for j=nots+1:10
file=['face' int2str((i-1)*10+j) '.bmp'];
[face,MAP]=imread(file);
grayface=ind2gray(face,MAP);
counter=counter+1;
Y(counter,:)=double(reshape(grayface,a*b,1));
end
end
cd(D)
clear memory
clc
AVERAGE=mean(x')';
Average_Matrix=(ones(noc*nots,1)*AVERAGE')';
clear memory
Difference=double(x)-double(Average_Matrix);
[V,L]=eig(Difference'*Difference);
clear memory
[rr,cc]=size(L);
maxL=min(min(L));
for i=1:rr
for j=1:cc
if L(i,j)>maxL
maxL=L(i,j);
ii=i;
jj=j;
end
end
end
v=V(:,jj);
Lamda=max(max(L));
clear memory
counter=1;
for i=1:nump
for j=1:nots
new_X(counter,:)=v(i,:)'*(x(:,counter))';
counter=counter+1;
end
end
clear memory
counter=1;
for i=1:nump
for j=1:3-nots
new_Y(counter,:)=v(i,:)'*(y(:,counter))';
counter=counter+1;
end
end
clear memory

counter=0;holder=0;
for i=1:nump*(3-nots)
error=[];
for j=1:nump*nots
temp=(new_X(j,:)-new_Y(i,:));
distance=sqrt(temp*temp');
error=[error distance];
end
clear memory
Minimum_Error=max(error);
for k=1:nump*nots
if error(k)<Minimum_Error
Minimum_Error=error(k);
holder=k;
end
end
if ceil(holder/nots)==ceil(i/(3-nots))
counter=counter+1;
end
clear memory
end
clear memory
clear new_Y new_X v x y error Minimum_Error
LDA_Performance=(counter/(noc*(3-nots)))*100
clear counter

作者:matlab代做-基于matlab人脸检测 来源:matlab代做-基于matlab人脸检测
  • 您是如何找到本站的?
  • 百度搜索
  • Google搜索
  • 查阅资料过程中
  • 论坛发现
  • 百度贴吧发现
  • 朋友介绍
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|matlab淘宝代做(www.hslogic.com) © 2018 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科毕业设计、课题设计、论文,毕业论文,Coursework、Eassy、Assignment