www.pudn.com > facerecognitionmatlab.rar > CalculateWIk.m


function WIk=CalculateWIk(I,Wk,width,height,step); 
%计算图像I经过小波变换Wk后的结果图像;步长step表示,每隔step个点计算一次,即计算宽度为step的离散网格上的小波变换; 
WIkAll=conv2(I,Wk,'same'); 
for x1=1:width/step 
    for x2=1:height/step 
        WIk(x1,x2)=abs(WIkAll(x1*step,x2*step)); 
    end 
end 
%Id = im2double(I); 
%for x1=1:width/step 
%    for x2=1:height/step 
%        WIk(x1,x2)=0; 
%        for x3=1:x1*step-1 
%            for x4=1:x2*step-1 
%                WIk(x1,x2)=WIk(x1,x2)+Wk(x1*step-x3,x2*step-x4)*Id(x3,x4); 
%            end 
%        end 
%    end 
%end