資源簡介
經典教材:數字圖像處理源(岡薩雷斯)的書中程序源代碼。類似于作者開發的一個matlab函數庫,里面的函數非常實用。

代碼片段和文件信息
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);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5567??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\0_Read_Me_First.txt
?????文件???????1572??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\adpmedian.m
?????文件????????651??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\average.m
?????文件???????3034??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\bayesgauss.m
?????文件???????3063??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\bound2eight.m
?????文件???????2477??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\bound2four.m
?????文件???????2224??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\bound2im.m
?????文件???????5776??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\boundaries.m
?????文件???????3966??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\bsubsamp.m
?????文件??????28150??2008-09-18?23:10??source?code?for?Digital_Image_Processing?3rdScan\CH10.m
?????文件???????8784??2008-09-23?21:30??source?code?for?Digital_Image_Processing?3rdScan\CH11.m
?????文件???????4907??2008-09-22?22:20??source?code?for?Digital_Image_Processing?3rdScan\CH12.m
?????文件???????3639??2010-09-28?22:50??source?code?for?Digital_Image_Processing?3rdScan\CH2.m
?????文件???????6011??2010-09-28?22:58??source?code?for?Digital_Image_Processing?3rdScan\CH3.m
?????文件???????9714??2008-09-28?21:58??source?code?for?Digital_Image_Processing?3rdScan\CH4.m
?????文件??????12078??2008-10-08?18:39??source?code?for?Digital_Image_Processing?3rdScan\CH5.m
?????文件???????9259??2008-09-19?14:55??source?code?for?Digital_Image_Processing?3rdScan\CH6.m
?????文件???????7683??2007-09-05?19:24??source?code?for?Digital_Image_Processing?3rdScan\CH7.m
?????文件???????7441??2009-01-05?10:40??source?code?for?Digital_Image_Processing?3rdScan\CH8.m
?????文件??????19824??2008-04-26?10:26??source?code?for?Digital_Image_Processing?3rdScan\CH9.m
?????文件????????592??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\changeclass.m
?????文件???????2353??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\colorgrad.m
?????文件???????2428??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\colorseg.m
?????文件???????1177??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\compare.m
?????文件???????1040??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\connectpoly.m
?????文件???????6129??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\Contents.m
?????文件????????799??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\conwaylaws.m
?????文件????????977??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\covmatrix.m
?????文件???????5712??2002-03-26?18:06??source?code?for?Digital_Image_Processing?3rdScan\de2bi.m
?????文件????????687??2010-02-03?20:28??source?code?for?Digital_Image_Processing?3rdScan\dftcorr.m
............此處省略87個文件信息
評論
共有 條評論