Retinex in matlab,用Retinex算法实现图像增强、HDR图像压缩等
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3625304 2010-01-12 17:44 00Retinex in matlab 0Retinex in matlab.pdf
文件 786612 2009-08-25 16:44 00Retinex in matlabfig2.tiff
文件 180122 2009-08-25 16:44 00Retinex in matlabfig2_FRANKLE_4.tiff
文件 153018 2009-08-25 16:44 00Retinex in matlabfig2_McCANN99_4.tiff
文件 793798 2009-08-25 16:45 00Retinex in matlabfig3.tiff
文件 103674 2009-08-25 16:45 00Retinex in matlabfig3_McCANN99_4.tiff
文件 787654 2009-08-25 16:46 00Retinex in matlabfig5.tiff
文件 792540 2009-08-25 16:47 00Retinex in matlabfig5_FRANKLE_4.tiff
文件 793118 2009-08-25 16:46 00Retinex in matlabfig5_McCANN99_4.tiff
文件 2775 2009-08-25 16:43 00Retinex in matlab
etinex_frankle_mccann.m
文件 5392 2009-08-25 16:43 00Retinex in matlab
etinex_mccann99.m
目录 0 2013-01-21 15:47 00Retinex in matlab
----------- --------- ---------- ----- ----
8024007 12
function Retinex = retinex_frankle_mccann(L nIterations)
% RETINEX_FRANKLE_McCANN:
% Computes the raw Retinex output from an intensity image based on the
% original model described in:
% Frankle J. and McCann J. “Method and Apparatus for Lightness Imaging“
% US Patent #4384336 May 17 1983
%
% INPUT: L - logarithmic single-channel intensity image to be processed
% nIterations - number of Retinex iterations
%
% OUTPUT: Retinex - raw Retinex output
%
% NOTES: - The input image is assumed to be logarithmic and in the range [0..1]
% - To obtain the retinex “sensation“ prediction a look-up-table needs to
% be applied to the raw retinex output
% - For colour images apply the algorithm individually for each channel
%
% AUTHORS: Florian Ciurea Brian Funt and John McCann.
% Code developed at Simon Fraser University.
%
% For information about the code see: Brian Funt Florian Ciurea and John McCann
% “Retinex in Matlab“ by Proceedings of the IS&T/SID Eighth Color Imaging
% Conference: Color Science Systems and Applications 2000 pp 112-121.
%
% paper available online at http://www.cs.sfu.ca/~colour/publications/IST-2000/
%
% Copyright 2000. Permission granted to use and copy the code for research and
% educational purposes only. Sale of the code is not permitted. The code may be
% redistributed so long as the original source and authors are cited.
global RR IP OP NP Maximum
RR = L;
Maximum = max(L(:)); % maximum color value in the image
[nrows ncols] = size(L);
shift = 2^(fix(log2(min(nrows ncols)))-1); % initial shift
OP = Maximum*ones(nrows ncols); % initialize Old Product
while (abs(shift) >= 1)
for i = 1:nIterations
CompareWith(0 shift); % horizontal step
CompareWith(shift 0); % vertical step
end
shift = -shift/2; % update the shift
end
Retinex = NP;
function CompareWith(s_row s_col)
global RR IP OP NP Maximum
IP = OP;
if (s_row + s_col > 0)
IP((s_row+1):end (s_col+1):end) = OP(1:(end-s_row) 1:(end-s_col)) + ...
RR((s_row+1):end (s_col+1):end) - RR(1:(end-s_row) 1:(end-s_col));
else
IP(1:(end+s_row) 1:(end+s_col)) = OP((1-s_row):end (1-s_col):end) + ...
RR(1:(end+s_row)1:(end+s_col)) - RR((1-s_row):end (1-s_col):end);
end
IP(IP > Maximum) = Maximum; % The Reset operation
NP = (IP + OP)/2; % average with the previous Old Product
OP = NP; % get ready for the next comparison
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3625304 2010-01-12 17:44 00Retinex in matlab 0Retinex in matlab.pdf
文件 786612 2009-08-25 16:44 00Retinex in matlabfig2.tiff
文件 180122 2009-08-25 16:44 00Retinex in matlabfig2_FRANKLE_4.tiff
文件 153018 2009-08-25 16:44 00Retinex in matlabfig2_McCANN99_4.tiff
文件 793798 2009-08-25 16:45 00Retinex in matlabfig3.tiff
文件 103674 2009-08-25 16:45 00Retinex in matlabfig3_McCANN99_4.tiff
文件 787654 2009-08-25 16:46 00Retinex in matlabfig5.tiff
文件 792540 2009-08-25 16:47 00Retinex in matlabfig5_FRANKLE_4.tiff
文件 793118 2009-08-25 16:46 00Retinex in matlabfig5_McCANN99_4.tiff
文件 2775 2009-08-25 16:43 00Retinex in matlab
etinex_frankle_mccann.m
文件 5392 2009-08-25 16:43 00Retinex in matlab
etinex_mccann99.m
目录 0 2013-01-21 15:47 00Retinex in matlab
----------- --------- ---------- ----- ----
8024007 12
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)