数字图像处理m文件,代码及图片素材


数字图像处理(m文件,代码及图片素材) 下载解压即可 仅作学习交流使用 如有问题请私信
资源截图
代码片段和文件信息
function f = adpmedian(g Smax)
%ADPMEDIAN Perform adaptive median filtering.
%   F = ADPMEDIAN(G SMAX) performs adaptive median filtering of
%   image G.  The median filter starts at size 3-by-3 and iterates up
%   to size SMAX-by-SMAX. SMAX must be an odd integer greater than 1.

%   Copyright 2002-2004 R. C. Gonzalez R. E. Woods & S. L. Eddins
%   Digital Image Processing Using MATLAB Prentice-Hall 2004
%   $Revision: 1.5 $  $Date: 2003/11/21 14:19:05 $

% SMAX must be an odd positive integer greater than 1.
if (Smax <= 1) | (Smax/2 == round(Smax/2)) | (Smax ~= round(Smax))
   error(‘SMAX must be an odd integer > 1.‘)
end
[M N] = size(g);

% Initial setup.
f = g;
f(:) = 0;
alreadyProcessed = false(size(g));

% Begin filtering.
for k = 3:2:Smax
   zmin = ordfilt2(g 1 ones(k k) ‘symmetric‘);
   zmax = ordfilt2(g k * k ones(k k) ‘symmetric‘);
   zmed = medfilt2(g [k k] ‘symmetric‘);
   
   processUsingLevelB = (zmed > zmin) & (zmax > zmed) & ...
       ~alreadyProcessed; 
   zB = (g > zmin) & (zmax > g);
   outputZxy  = processUsingLevelB & zB;
   outputZmed = processUsingLevelB & ~zB;
   f(outputZxy) = g(outputZxy);
   f(outputZmed) = zmed(outputZmed);
   
   alreadyProcessed = alreadyProcessed | processUsingLevelB;
   if all(alreadyProcessed(:))
      break;
   end
end

% Output zmed for any remaining unprocessed pixels. Note that this
% zmed was computed using a window of size Smax-by-Smax which is
% the final value of k in the loop.
f(~alreadyProcessed) = zmed(~alreadyProcessed);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     148883  2006-03-22 10:54  dipum_images_ch01.zip

     文件    1382080  2006-03-22 11:08  dipum_images_ch12.zip

     文件    2363479  2006-03-22 11:04  dipum_images_ch11.zip

     文件   16026019  2006-03-22 11:02  dipum_images_ch06.zip

     文件    1518542  2006-03-22 11:02  dipum_images_ch10.zip

     文件    1616892  2006-03-22 11:01  dipum_images_ch09.zip

     文件     910953  2006-03-22 10:59  dipum_images_ch08.zip

     文件     565553  2006-03-22 10:58  dipum_images_ch07.zip

     文件     887534  2006-03-22 10:55  dipum_images_ch05.zip

     文件    1049262  2006-03-22 10:54  dipum_images_ch03.zip

     文件     346872  2006-03-22 10:54  dipum_images_ch04.zip

     文件     985498  2006-03-22 10:54  dipum_images_ch02.zip

----------- ---------  ---------- -----  ----

             27801567                    12


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)