资源简介
retinex的MATLAB实现程序,效率很高,分享给大家,如果大家有更好的建议,欢迎留言
代码片段和文件信息
I = imread(‘111.bmp‘);
subplot(121);
imshow(I);
I=double(I);
f=I(::1);
ff=I(::2);
fff=I(::3);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
k1=4;
k2=5;
r=161;
alf=1458;
nn=floor((r+1)/2);
for i=1:r
for j=1:r
b(ij) =exp(-((i-nn)^2+(j-nn)^2)/(k1*alf))/(k2*pi*alf*10000); %高斯函数1
end
end
k1=8; %高斯函数2
k2=8;
r=161;
alf=1458;
nn=floor((r+1)/2);
for i=1:r
for j=1:r
bb(ij) =exp(-((i-nn)^2+(j-nn)^2)/(k1*alf))/(k2*pi*alf*10000);
end
end
k1=0.5;
k2=0.5;
r=161;
alf=1458;
nn=floor((r+1)/2);
for i=1:r
for j=1:r
bbb(ij) =exp(-((i-nn)^2+(j-nn)^2)/(k1*alf))/(k2*pi*alf*10000); %高斯函数23
end
%%%%%%%%%%%对R分量的处理%%%%%%%%%%%%%
Img = double(f);
[mn]=size(f);
aa=125;
for i=1:m
for j=1:n
C(ij)=log(1+aa*(Img(ij)/I(ij)));
end
end
K=imfilter(Imgb);
KK=imfilter(Imgbb);
KKK=imfilter(Imgbbb);
for i=1:m
for j=1:n
G(ij)=1/3*(log(Img(ij)+1)-log(K(ij)+1));
G(ij)=1/3*(log(Img(ij)+1)-log(KK(ij)+1))+G(ij);
G(ij)=C(ij)*(1/3*(log(Img(ij)+1)-log(KKK(ij)+1))+G(ij));
end
end
mi=min(min(G));
ma=max(max(G));
L=(G-mi)*255/(ma-mi);
%%%%%%%%%%%%%%对G分量的处理%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Img = double(ff);
[mn]=size(ff);
aa=125;
for i=1:m
for j=1:n
CC(ij)=log(1+aa*(Img(ij)/I(ij)));
end
end
K=imfilter(Imgb);
KK=imfilter(Imgbb);
KKK=imfilter(Imgbbb);
for i=1:m
for j=1:n
G(ij)=1/3*(log(Img(ij)+1)-log(K(ij)+1));
G(ij)=1/3*(log(Img(ij)+1)-log(KK(ij)+1))+G(ij);
G(ij)=CC(ij)*(1/3*(log(Img(ij)+1)-log(KKK(ij)+1))+G(ij));
end
end
mi=min(min(G));
ma=max(max(G));
LL=(G-mi)*255/(ma-mi);
%%%%%%%%%%%%%随B分量的处理%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Img = double(fff);
[mn]=size(fff);
aa=125;
for i=1:m
for j=1:n
CCC(ij)=log(1+aa*(Img(ij)/I(ij)));
end
end
K=imfilter(Imgb);
KK=imfilter(Imgbb);
KKK=imfilter(Imgbbb);
for i=1:m
for j=1:n
G(ij)=1/3*(log(Img(ij)+1)-log(K(ij)+1));
G(ij)=1/3*(log(Img(ij)+1)-log(KK(ij)+1))+G(ij);
G(ij)=CCC(ij)*(1/3*(log(Img(ij)+1)-log(KKK(ij)+1))+G(ij));
end
end
mi=min(min(G));
ma=max(max(G));
LLL=(G-mi)*255/(ma-mi);
%%%%%%%%%%%%对彩色图像的综合处理 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
msrcr=cat(3LLLLLL);
subplot(122);
imshow(uint8(msrcr));
imwrite(uint8(msrcr)‘msrcrsretnx.bmp‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2612 2009-09-06 20:55 retinex\MSRCR.m
文件 3183 2009-09-07 10:07 retinex\MSR_new.m
文件 24 2018-04-21 10:52 retinex\Readme.txt
文件 2693 2010-04-23 21:00 retinex\retinex.m
文件 2775 2009-03-08 18:33 retinex\retinex_frankle_mccann.m
文件 5392 2009-03-08 18:33 retinex\retinex_mccann99.m
目录 0 2018-04-21 10:51 retinex\
- 上一篇:模式识别大作业K均值算法matlab平台实现
- 下一篇:magnify.zip
相关资源
- 带色彩恢复的多尺度Retinex算法MSRCR
- 基于双边滤波器的retinex算法等代码
- Retinex Matlab算法
- 单尺度,多尺度的Retinex算法程序
- 图像处理,matlab程序,retinex_frankle_
- Retinex的算法
- MSR MATLAB程序
- 单尺度和多尺度retinex的matlab实现程序
- 多尺度retinex算法,图像增强
- MATLAB代码Retinex算法解决光照不均问题
- retinex算法代码MSR
- 单尺度Retinex算法实现
- retinex msr
- retinex中心环绕算法程序
- matlab基于多尺度retinex算法的图像去雾
- 基于直方图均衡化,暗通道先验,r
- 多尺度Retinex
- 基于Retinex理论的图像增强Matlab代码(
- retinex 采用中心环绕函数的retinex算法
- retinex图像增强
- 效率很高的retinex方法 用MATLAB代码实现
- retinex MSR图像增强算法
- SSR 实现单尺度retinex算法
- Retinex 基于RETINEX理论的图像去雾
- Msrcr 基于Retinex的MSRCR图像增强算法的
- Retinex-of-image-enhancement 本文提出了基于
评论
共有 条评论