資源簡介
將4個文件拷貝到同一路徑下,修改ex_SRAD.m文件中的filename,filename為要平滑的圖像文件名稱,修改后運(yùn)行ex_SRAD.m,待進(jìn)度條慢后即可顯示平滑后的圖像。本程序采用了SRAD算法。在MATLAB環(huán)境下運(yùn)行。

代碼片段和文件信息
clear?all?close?all
t1=clock;
%?This?example?performs?speckle?reducing?anisotropic?diffusion?on
%?ultrasound?phantom?image?of?a?elliptical?object?via?the?function?SRAD.
%?SRAD?is?implemented?following:
%???Y.?Yu?and?S.T.?Acton?“Speckle?reducing?anisotropic?diffusion“?IEEE
%???Transactions?on?Image?Processing?vol.?11?pp.?1260-1270?2002.
%???
%WRITTEN?BY:??Drew?Gilliam
%
%MODIFICATION?HISTORY:
%???2006.03???Drew?Gilliam
%???????--creation
%?file?name
%?filename?=?‘ERS2_7_1.jpg‘;
filename?=?‘20131014155354.bmp‘;
%?filename?=?‘F:\博士論文資料\image\cearac?image?database\sub\ERS1_2_1.jpg‘;
[NyNxNc]?=?size(filename);
if?Nc>1;?filename=rgb2gray(filename);?end;
%?read?in?file?make?double
I?=?im2double(?imread(filename)?);
%?region?of?uniform?speckle
%?NOTE?if?rect?is?empty?(i.e.?“rect?=?[]“)?the?user?can?choose?an
%?arbitrary?region?of?uniform?speckle?at?runtime.??The?original?image?is
%?displayed?on?the?current?axes?and?the?user?may?click?and?drag?a
%?rectangle?to?define?the?uniform?speckle?region
rect?=?[10?15?40?40];???%?default?rectangle
%?rect?=?[];??????????????%?choose?rectangle?at?runtime
%rect?=?[10?10?20?20];???%?default?rectangle
%?SRAD?image
%[Jrect]?=?SRAD(I2000.5rect);
[Jrect]?=?SRAD(I2000.5rect);
t2=clock;
t=t2-t1;
%?plot?both?images
imwrite(J‘20131014155354(SRAD).bmp‘‘BMP‘);
figure
subplot(121)
imshow(I[])
subplot(122)
imshow(J[])
%psnr(IJ)
%ENL(J)
%epi(IJ)
%**************************************************************************
%?END?OF?FILE
%**************************************************************************
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1643??2013-10-15?11:03??各向異性去噪matlab程序\ex_SRAD.m
?????文件???????5286??2011-12-16?19:47??各向異性去噪matlab程序\SRAD.m
?????文件???????9307??2011-08-30?15:09??各向異性去噪matlab程序\SRAD_c.c
?????文件???????8704??2011-08-30?15:09??各向異性去噪matlab程序\SRAD_c.dll
?????目錄??????????0??2014-05-22?08:53??各向異性去噪matlab程序
-----------?---------??----------?-----??----
????????????????24940????????????????????5
評論
共有 條評論