资源简介
Michael Elad的论文Retinex by two Bilateral Filters + 会议演讲PPT + 源码,源码亲测可行 基于双边滤波的retinex算法
代码片段和文件信息
function retimg = bialteral(img N sigma)
%% colorspace transformation
img = rgb2hsv(img);%convert rgb to hsv colorspace in order to process
%% pre-computer domain filtering
sigma_d = sigma(1);
sigma_r = sigma(2);
[XY] = meshgrid(-N:N-N:N);%generate two matrix
D = exp(-(X.^2+Y.^2)/(2*sigma_d^2));%domain weights with Euclidean distance
%% create waitbar
h = waitbar(0‘illumination retinex algorithm……‘);
set(h‘Name‘‘Illumination Retinex‘);
%% rang filtering in v layer
dim = size(img);%dim=[heightlength3]
B = zeros(dim);%create an image B with the same size and dimension with the zero value.
for i = 1:dim(1)
for j = 1:dim(2)
iMin = max(i-N1);
iMax = min(i+Ndim(1));
jMin = max(j-N1);
jMax = min(j+Ndim(2));
L = img(iMin:iMaxjMin:jMax3);%extract the local region
d = L-img(ij3);%the dissimilarity between the surroud and center
R = exp(-(d.^2)/(2*sigma_r^2));%range filter weights
F = R.*D((iMin:iMax)-i+N+1(jMin:jMax)-j+N+1);%its row is from iMin-i+N+1 to iMax-i+N+1and so as line
for m = 1:iMax-iMin+1
for n = 1:jMax-jMin+1
if d(mn) < 0
F(mn) = 0;
end
end
end
norm_F = sum(F(:));
B(ij3) = sum(sum(F.*L))/norm_F;
retimg(ij1) = img(ij1);
retimg(ij2) = img(ij2);
retimg(ij3) = B(ij3);
end
waitbar(i/dim(1));
end
close(h);%close the bar
%% display colorspace transformation
img = hsv2rgb(img);
retimg = hsv2rgb(retimg);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-07-15 10:06 hsv\
文件 1970126 2010-07-15 09:39 hsv\2005.bmp
文件 915894 2010-07-12 18:52 hsv\5.bmp
文件 1660 2010-07-15 10:27 hsv\bialteral.m
文件 1196 2010-07-15 10:28 hsv\bialteral2.m
文件 1962090 2010-07-15 10:19 hsv\boy.bmp
文件 1674 2010-07-15 10:13 hsv\demo.m
文件 1969902 2010-07-15 10:19 hsv\girl.bmp
文件 2963789 2013-03-20 18:45 PPT_Retinex by Two Bilateral Filters.pdf
文件 2516867 2013-03-20 18:21 Retinex by Two Bilateral Filters.pdf
- 上一篇:DCOM自动配置及OPCClient相关文件
- 下一篇:AUTOSAR DCM标准
相关资源
- 色彩恢复的多尺度Retinex算法MSRCR-VS2
- 基于OpenCV实现Retinex
- 利用暗原色和多尺度Retinex对图片增强
- 基于双边滤波+retinex理论的图像中增强
- 色彩改进型Retinex彩色图像增强方法
- retinex理论的图像去雾算法研究
- retinex图像增强123263
- 基于opencv的retinex单尺度实现
- 我国零售业投入产出相对有效性分析
- LIME 低照度 Retinex变分模型变分增强
- HP-ALM-MSExcelAddin_11_0_1_15
-
Adaptive Local Tone Mapping ba
sed on Retine - bfilter2灰度及彩色图像Bilateral滤波实现
评论
共有 条评论