資源簡(jiǎn)介
這是一個(gè)用MATLAB編寫(xiě)的紋理分割代碼,里面有相片和相關(guān)結(jié)果,供大家分享。

代碼片段和文件信息
function?Y?=?coldfilt(X?ha?hb)
%?function?Y?=?coldfilt(X?ha?hb)
%?Filter?the?columns?of?image?X?using?the?two?filters?ha?and?hb?=?reverse(ha).
%?ha?operates?on?the?odd?samples?of?X?and?hb?on?the?even?samples.
%?Both?filters?should?be?even?length?and?h?should?be?approx?linear?phase?with
%?a?quarter?sample?advance?from?its?mid?pt?(ie?|h(m/2)|?>?|h(m/2?+?1)|).
%
%???????????????????ext????????top?edge?????????????????????bottom?edge???????ext
%?Level?1:????????!???????????????|???????????????!???????????????|???????????????!
%?odd?filt?on?.????b???b???b???b???a???a???a???a???a???a???a???a???b???b???b???b???
%?odd?filt?on?.??????a???a???a???a???b???b???b???b???b???b???b???b???a???a???a???a
%?Level?2:????????!???????????????|???????????????!???????????????|???????????????!
%?+q?filt?on?x??????b???????b???????a???????a???????a???????a???????b???????b???????
%?-q?filt?on?o??????????a???????a???????b???????b???????b???????b???????a???????a
%
%?The?output?is?decimated?by?two?from?the?input?sample?rate?and?the?results
%?from?the?two?filters?Ya?and?Yb?are?interleaved?to?give?Y.
%?Symmetric?extension?with?repeated?end?samples?is?used?on?the?composite?X
%?columns?before?each?filter?is?applied.
%
%?Cian?Shaffrey?Nick?Kingsbury
%?Cambridge?University?August?2000
[rc]?=?size(X);
if?rem(r4)?>?0?error(‘No.?of?rows?in?X?must?be?a?multiple?of?4!‘);?end
m?=?length(ha);
if?m?~=?length(hb)?error(‘Lengths?of?ha?and?hb?must?be?the?same!‘);?end
if?rem(m2)?>?0?error(‘Lengths?of?ha?and?hb?must?be?even!‘);?end
m2?=?fix(m/2);
%?Set?up?vector?for?symmetric?extension?of?X?with?repeated?end?samples.
xe?=?reflect([(1-m):(r+m)]?0.5?r+0.5);?%?Use?‘reflect‘?so?d?
%?Select?odd?and?even?samples?from?ha?and?hb.
hao?=?ha(1:2:m);
hae?=?ha(2:2:m);
hbo?=?hb(1:2:m);
hbe?=?hb(2:2:m);
t?=?[6:4:(r+2*m-2)];
r2?=?r/2;
Y?=?zeros(r2c);
if?sum(ha.*hb)?>?0
???s1?=?1:2:r2;?
???s2?=?s1?+?1;
else
???s2?=?1:2:r2;?
???s1?=?s2?+?1;
end
%?Perform?filtering?on?columns?of?extended?matrix?X(xe:)?in?4?ways.?
Y(s1:)?=?conv2(X(xe(t-1):)hao(:)‘valid‘)?+?conv2(X(xe(t-3):)hae(:)‘valid‘);
Y(s2:)?=?conv2(X(xe(t):)hbo(:)‘valid‘)?+?conv2(X(xe(t-2):)hbe(:)‘valid‘);
return
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件???????1216??2001-02-08?12:00??dt_cwt?texture\qshift_a.mat
?????文件???????1472??2001-02-08?12:00??dt_cwt?texture\qshift_b.mat
?????文件???????1600??2001-02-08?12:00??dt_cwt?texture\qshift_c.mat
?????文件???????1728??2001-02-08?12:00??dt_cwt?texture\qshift_d.mat
?????文件????????813??2001-02-08?12:00??dt_cwt?texture\reflect.m
?????文件???????7043??2007-08-19?09:38??dt_cwt?texture\22.jpg
?????文件????????192??2007-09-22?18:48??dt_cwt?texture\RGB2YUV.m
?????文件????????112??2007-09-22?09:34??dt_cwt?texture\test_dtcwt.m
?????文件????????517??2007-09-25?17:36??dt_cwt?texture\TextureDTCWT.m
?????文件???????1397??2007-09-26?09:11??dt_cwt?texture\LoadImageTexture.asv
?????文件???????1613??2007-09-26?15:50??dt_cwt?texture\LoadImageTexture.m
?????文件???????1410??2007-09-26?09:51??dt_cwt?texture\OpenDataba
?????文件???????1583??2007-09-26?15:49??dt_cwt?texture\OpenDataba
?????文件????????241??2007-09-26?10:16??dt_cwt?texture\SearchTexture.asv
?????文件???????5346??2007-09-26?15:48??dt_cwt?texture\SearchTexture.m
?????文件????????517??2007-09-25?17:35??dt_cwt?texture\TextureDTCWT.asv
?????文件????????608??2000-09-28?16:13??dt_cwt?texture\antonini.mat
?????文件???????2244??2001-02-08?11:58??dt_cwt?texture\coldfilt.m
?????文件????????919??2003-03-19?07:59??dt_cwt?texture\colfilter.m
?????文件???????6597??2002-05-13?17:20??dt_cwt?texture\dtwavexfm2.m
?????文件???????9700??2007-09-26?10:01??dt_cwt?texture\ImageSearch.asv
?????文件??????31650??2007-09-23?16:25??dt_cwt?texture\ImageSearch.fig
?????文件???????5284??2007-09-26?10:30??dt_cwt?texture\ImageSearch.m
?????文件????????480??2001-02-08?11:58??dt_cwt?texture\legall.mat
?????文件??????77847??2001-02-08?11:58??dt_cwt?texture\lenna.mat
?????文件????????544??2000-09-28?16:13??dt_cwt?texture\near_sym_a.mat
?????文件????????864??2000-09-28?16:13??dt_cwt?texture\near_sym_b.mat
?????文件???????2169??2007-09-23?15:23??dt_cwt?texture\OpenDataba
?????文件???????1216??2001-02-03?08:43??dt_cwt?texture\qshift_06.mat
?????文件???????2728??2005-07-11?17:50??dt_cwt?texture\qshift_32.mat
............此處省略52個(gè)文件信息
評(píng)論
共有 條評(píng)論