资源简介
matlab做的图像检索源码,算法实现不错,很有借鉴作用,对初学者更是适用
代码片段和文件信息
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 < m works OK.
% 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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7043 2007-08-19 09:38 tuxiang\22.jpg
文件 608 2000-09-28 16:13 tuxiang\antonini.mat
文件 2244 2001-02-08 11:58 tuxiang\coldfilt.m
文件 919 2003-03-19 07:59 tuxiang\colfilter.m
文件 6597 2002-05-13 17:20 tuxiang\dtwavexfm2.m
文件 9700 2007-09-26 10:01 tuxiang\ImageSearch.asv
文件 31650 2007-09-23 16:25 tuxiang\ImageSearch.fig
文件 5284 2007-09-26 10:30 tuxiang\ImageSearch.m
文件 480 2001-02-08 11:58 tuxiang\legall.mat
文件 77847 2001-02-08 11:58 tuxiang\lenna.mat
文件 1397 2007-09-26 09:11 tuxiang\LoadImageTexture.asv
文件 1613 2007-09-26 15:50 tuxiang\LoadImageTexture.m
文件 544 2000-09-28 16:13 tuxiang\near_sym_a.mat
文件 864 2000-09-28 16:13 tuxiang\near_sym_b.mat
文件 2169 2007-09-23 15:23 tuxiang\OpenDataba
文件 1410 2007-09-26 09:51 tuxiang\OpenDataba
文件 1583 2007-09-26 15:49 tuxiang\OpenDataba
文件 1216 2001-02-03 08:43 tuxiang\qshift_06.mat
文件 2728 2005-07-11 17:50 tuxiang\qshift_32.mat
文件 1216 2001-02-08 12:00 tuxiang\qshift_a.mat
文件 1472 2001-02-08 12:00 tuxiang\qshift_b.mat
文件 1600 2001-02-08 12:00 tuxiang\qshift_c.mat
文件 1728 2001-02-08 12:00 tuxiang\qshift_d.mat
文件 813 2001-02-08 12:00 tuxiang\reflect.m
文件 192 2007-09-22 18:48 tuxiang\RGB2YUV.m
文件 241 2007-09-26 10:16 tuxiang\SearchTexture.asv
文件 5346 2007-09-26 15:48 tuxiang\SearchTexture.m
文件 112 2007-09-22 09:34 tuxiang\test_dtcwt.m
文件 517 2007-09-25 17:35 tuxiang\TextureDTCWT.asv
文件 517 2007-09-25 17:36 tuxiang\TextureDTCWT.m
............此处省略52个文件信息
- 上一篇:基于Graphcut的图像分割(Matlab)
- 下一篇:等效电荷法计算电场
评论
共有 条评论