www.pudn.com > duge.rar > RF.m, change:2015-06-01,size:432b


function [ value ] = RF( I ) 
%RF 此处显示有关此函数的摘要 
%   空间频率 反映一幅图空间域的总体活跃程度,空间频率越大说明融合效果越好 
I=rgb2gray(I); 
I=double(I); 
[m,n]=size(I); 
rf=0; 
cf=0; 
for i=1:m 
    for j=2:n 
        rf=rf+(I(i,j)-I(i,j-1)).^2; 
    end 
end 
RF=sqrt((rf/(m*n))); 
 
for i=2:m 
    for j=1:n 
        cf=cf+(I(i,j)-I(i-1,j)).^2; 
    end 
end 
CF=sqrt(cf/(m*n)); 
SF=sqrt(RF^2+CF^2); 
value=SF; 
end