资源简介

SSR算法,自己已经测试过了,且我自己增加了直方图显示

资源截图

代码片段和文件信息

clear;
close all;

I = imread(‘E:\project\color\msr.bmp‘);
subplot(231);
imshow(I);

f=I(::1);
ff=I(::2);
fff=I(::3);
%%%%%%%%%%%%%构造高斯核%%%%%%%%%%%%%%%%%%%%%%%
k1=8;
k2=8;
r=161;
alf=1600;
nn=floor((r+1)/2);  % nn=81为尺度C,取80最合适
for i=1:r   %从1循环到81
    for j=1:r
        b(ij) =exp(-((i-nn)^2+(j-nn)^2)/(k1*alf))/(k2*pi*alf*10000);        %高斯函数
   end
end
%%%%%%%%%%%对R分量的处理%%%%%%%%%%%%%
Img = double(f);
K=imfilter(Imgb);  % 中值滤波后的图像
G=log(Img+1)-log(K+1);  %在对数域中用原始图像减高斯平滑后的图像 得到反射图像

mi=min(min(G));
ma=max(max(G));
       L=(G-mi)*255/(ma-mi); % 对比度拉伸处理
%%%%%%%%%%%%%%对G分量的处理%%%%%%%%%%%%%
Img = double(ff);
K=imfilter(Imgb);  
G=log(Img+1)-log(K+1);
   
mi=min(min(G));
ma=max(max(G));
       LL=(G-mi)*255/(ma-mi);
%%%%%%%%%%%%%随B分量的处理%%%%%%%%%%%

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        2053  2012-06-11 17:49  SSR.m

评论

共有 条评论