資源簡介
提升框架實現一維和二維信號的小波變換,采用的小波基是haar、db4和cdf

代碼片段和文件信息
function?[y?opty]?=?colwavelift(x?optx?L?direction?mode)
%----------------------?input?arguments?checking??----------------------%
error(nargchk(4?5?nargin));
if?nargin?==?4
????mode?=?direction;
????direction?=?L;
????L?=?optx;
end
%?check?optx
if?nargin?==?5
????if?size(optx?2)?~=?size(x?2)
????????error(‘COLWAVELIFT:InArgErr‘?[‘The?first?two?arguments?must‘?...
????????‘?have?the?same?column?numbers.‘]);
????end
????if?~isreal(optx)?||?~isnumeric(optx)?||?(ndims(optx)?>?2)
????????error(‘COLWAVELIFT:InArgErr‘?[‘The?second?arguments?must‘?...
????????‘?be?a?real?numeric?2-D?or?1-D?matrix.‘]);
????end
end
%?check?x
if?~isreal(x)?||?~isnumeric(x)?||?(ndims(x)?>?2)
????error(‘COLWAVELIFT:InArgErr‘?[‘The?first?argument?must‘?...
????‘?be?a?real?numeric?2-D?or?1-D?matrix.‘]);
end
%?check?direction
if?ischar(direction)?&&?ismember(direction?{‘d‘?‘dec‘?‘f‘?‘forward‘})
????direction?=?‘d‘;
elseif?ischar(direction)?&&?ismember(direction?{‘r‘?‘rec‘?...
????????‘b‘?‘backward‘?‘i‘?‘inverse‘})
????direction?=?‘r‘;
else
????error(‘COLWAVELIFT:InArgErr‘?[‘For?the?last?argument?use?‘‘d‘‘?‘?...
????????‘to?denote?decomposition/forward?lifting?\n?or?‘‘r‘‘?for?‘?...
????????‘reconstruction/inverse?lifting.‘]);
end
%?check?mode
if?~ischar(mode)?||?~ismember(mode?{‘lossy‘?‘lossless‘})
error(‘COLWAVELIFT:InArgErr‘?[‘The?last?argument?must?be?either‘?...
????????‘?‘‘lossy‘‘?or?‘‘lossless‘‘?to?decide?the?reversibility.‘]);
end
%?check?L
%?a?thorough?check?on?L?is?too?lengthy.?see?the?comment?lines?
%?for?the?way?L?is?organized
if?~isstruct(L)
????error(‘COLWAVELIFT:InArgErr‘?[‘Use?a?Matlab?data?type‘?...
????????‘?‘‘structure‘‘?to?denote?the?lifting?structure.?\n?Type‘?...
????????‘?‘‘help?colwavelift‘‘?to?see?the?way?the?structure?shall?be‘?...
????????‘?organized.‘]);
end
%-----------------------??input?pretreatment?---------------------------%
%?use?notation?y?y0?y1?and?clear?x?optx
if?nargin?==?4?%?without?optx
????y0?=?x(1:2:end?:);
????y1?=?x(2:2:end?:);
????y?=?x;
else?%?nargin?==?5?ie?with?optx
????y0?=?x;
????y1?=?optx;
????y?=?zeros(size([y0;?y1]));
????y(1:2:end?:)?=?y0;
????y(2:2:end?:)?=?y1;
end
clear?x?optx;
sy?=?size(y);
%?for?unit-length?seqence?skip?lifting?precess?ie?return?y?=?x
if?size(y?1)?>?1
????ry0?=?size(y0?1);??%?y?y0?y1?are?changing?during?extension?and
????ry1?=?size(y1?1);??%?lifting?and?inverse?lifting?processes?while?
????????????????????????%?sy?ry0?ry1?remain?unchanged?for?use
????len?=?length(L.lamdaz);
????%?default?plus/minus?switch?for?core?lifting?process
????eval(‘plusminus?=?1;‘);
%---------------------????symmetric?extension????-----------------------%
%?Difficulty?lies?in?the?boundary?handling.?For?the?sake?of?the
%?adaptability?of?lifting?structure?L?more?general?but?more?complex
%?treatment?is?employed?here.?Note?for?a?single?realization?of?FWT?eg.?
%?for?cdf9/7?or?spline5/3?simpler?algorithm?can?be?used
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1898??2012-04-16?11:57??Lifting1D.m
?????文件???????2122??2012-04-24?21:50??Lifting2D.m
?????文件??????24479??2012-04-12?21:39??src.mat
?????文件????????293??2012-04-24?20:59??test.m
?????文件???????3844??2012-04-24?21:51??wavelift.m
?????文件?????137728??2012-04-13?19:08??文檔?片段?‘作?業?二????利用提升框架實...‘.shs
?????文件??????65240??2000-12-04?12:57??cameraman.tif
?????文件???????6906??2012-04-24?20:17??colwavelift.m
-----------?---------??----------?-----??----
???????????????242510????????????????????8
- 上一篇:序列密碼發展報告
- 下一篇:bat自動監測并啟動程序
評論
共有 條評論