有个关于人脸人脸识别的问题想请教大家
本人毕设做的是基于gabor和pca的人脸识别,用matlab编程,现在不知道怎么才能将gabor滤波后的向量用pca主元素分析,请高手指点一下:function tezheng=chongy()
k=1;
s1=['1' '2' '3' '4' '5' '6' '7' '8' '9' '10'];
s='C:\MATLAB701\work\';
ss='.bmp';
for W=1:1:10
k1=1;
path=;
=imread(path,'bmp');
figure(k)
imshow(W,map);
B_tu=double(W)+1;
f=sqrt(2);
k_max=pi/2;
delta=2*pi;
for u=1:5
for v=1:5
k_v=k_max/f^v;
fai_u=pi*u/8;
%end
kv_x=k_v*cos(fai_u);
kv_y=k_v*sin(fai_u);
y=-49:50;
x=-49:50;
=meshgrid(x,y);
fai_z1=k_v^2/delta^2;
fai_z2=exp(-k_v^2*(X.^2+Y.^2)/(2*delta^2));
fai_z3=exp(i*(kv_x.*X+kv_y.*Y))-exp(-delta^2/2);
fai_z=fai_z1.*fai_z2.*fai_z3;
fft_B_tu=fft2(B_tu);
fai_z=fftshift(fai_z);
fft_fai_z=fft2(fai_z);
%fft_fai_z=fftshift(fft_fai_z);
lvbo_tu=ifft2(fft_B_tu.*fft_fai_z);
lvbo_tu_abs=abs(lvbo_tu);
%figure(2);
gbor_lv_abl= wcodemat(lvbo_tu_abs,255);
figure(k+1)
subplot(5,5,k1)
imshow(gbor_lv_abl,map);
k1=k1+1;
tezheng(k1,(k+1)/2,:,:)=gbor_lv_abl;
end
end
k=k+2;
end
end
gen_mu='C:\MATLAB701\work\';
houzui='.bmp';
zong_xiangliang=[];
for i=1:10
quan_mulu=;
=imread(quan_mulu,'bmp');
A=double(A)+1;
A=A(:);
zong_xiangliang=;
end
junzhi=mean(zong_xiangliang,2);
zong_xiangliang=zong_xiangliang-junzhi*ones(1,10);
linshi_junfangcha=zong_xiangliang'*zong_xiangliang;
=eig(linshi_junfangcha);
diag(d);
=sort(diag(d)','descend');
N=v(:,IX);
Q=N(:,1:8);
%f=imshow(Q,'bmp');
f=imshow(Q);
问题:
end
gen_mu='C:\MATLAB701\work\';
houzui='.bmp';
zong_xiangliang=[];
for i=1:10
就是这段没有衔接,不知道怎么才能将end以上部分作为下面的输入:'(
[ 本帖最后由 eight 于 2007-6-4 23:45 编辑 ]
页:
[1]