function varargout = imgxtool(option,varargin)
%IMGXTOOL Image extension tool.
% VARARGOUT = IMGXTOOL(OPTION,VARARGIN)
%
% GUI oriented tool which allows the construction of a new
% image from an original one by truncation or extension.
% Extension is done by selecting different possible modes:
% Symmetric, Periodic, Zero Padding, Continuous or Smooth.
% A special mode is provided to extend an image in order
% to be accepted by the SWT decomposition.
%------------------------------------------------------------
% Internal options:
%
% OPTION = 'create' 'load' 'demo'
% 'update_deslen' 'extend_truncate'
% 'draw' 'save'
% 'clear_graphics' 'mode'
% 'close'
%
% See also WEXTEND.
% M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi 30-Nov-98.
% Last Revision: 14-Jul-2003.
% Copyright 1995-2004 The MathWorks, Inc.
% $Revision: 1.12.4.2 $ $Date: 2004/03/15 22:40:45 $
% Test inputs.
%-------------
if nargin==0 , option = 'create'; end
[option,winAttrb] = utguidiv('ini',option,varargin{:});
% Default values.
%----------------
default_nbcolors = 255;
% Image Coding Value.
%-------------------
codemat_v = wimgcode('get');
% Initialisations for all options excepted 'create'.
%---------------------------------------------------
switch option
case 'create'
otherwise
% Get figure handle.
%-------------------
win_imgxtool = varargin{1};
% Get stored structure.
%----------------------
Hdls_UIC_C = wfigmngr('getValue',win_imgxtool,'Hdls_UIC_C');
Hdls_UIC_H = wfigmngr('getValue',win_imgxtool,'Hdls_UIC_H');
Hdls_UIC_V = wfigmngr('getValue',win_imgxtool,'Hdls_UIC_V');
Hdls_UIC_Swt = wfigmngr('getValue',win_imgxtool,'Hdls_UIC_Swt');
Hdls_Axes = wfigmngr('getValue',win_imgxtool,'Hdls_Axes');
Hdls_Colmap = wfigmngr('getValue',win_imgxtool,'Hdls_Colmap');
Pos_Axe_Img_Ori = wfigmngr('getValue',win_imgxtool,'Pos_Axe_Img_Ori');
% Get UIC Handles.
%-----------------
[m_load,m_save,m_demo,txt_image,edi_image,...
txt_mode,pop_mode,pus_extend] = deal(Hdls_UIC_C{:});
[frm_fra_H,txt_fra_H,txt_length_H,edi_length_H,txt_nextpow2_H, ...
edi_nextpow2_H,txt_prevpow2_H,edi_prevpow2_H,txt_deslen_H, ...
edi_deslen_H,txt_direct_H,pop_direct_H] = deal(Hdls_UIC_H{:});
[frm_fra_V,txt_fra_V,txt_length_V,edi_length_V,txt_nextpow2_V, ...
edi_nextpow2_V,txt_prevpow2_V,edi_prevpow2_V,txt_deslen_V, ...
edi_deslen_V,txt_direct_V,pop_direct_V] = deal(Hdls_UIC_V{:});
[txt_swtdec,pop_swtdec,frm_fra_H_2,txt_fra_H_2,txt_swtlen_H, ...
edi_swtlen_H,txt_swtclen_H,edi_swtclen_H,txt_swtdir_H, ...
edi_swtdir_H,txt_swtdec,pop_swtdec,frm_fra_V_2,txt_fra_V_2, ...
txt_swtlen_V,edi_swtlen_V,txt_swtclen_V,edi_swtclen_V, ...
txt_swtdir_V,edi_swtdir_V] = deal(Hdls_UIC_Swt{:});
end
% Process control depending on the calling option.
%-------------------------------------------------
switch option
case 'create'
%-------------------------------------------------------%
% Option: 'CREATE' - Create Figure, Uicontrols and Axes %
%-------------------------------------------------------%
% Get Globals.
%-------------
[Def_Btn_Height,Def_Btn_Width,Pop_Min_Width,X_Graph_Ratio, ...
X_Spacing,Y_Spacing,Def_TxtBkColor,Def_EdiBkColor, ...
Def_FraBkColor] = ...
mextglob('get', ...
'Def_Btn_Height','Def_Btn_Width','Pop_Min_Width', ...
'X_Graph_Ratio','X_Spacing','Y_Spacing', ...
'Def_TxtBkColor','Def_EdiBkColor','Def_FraBkColor' ...
);
% Window initialization.
%-----------------------
[win_imgxtool,pos_win,win_units,str_numwin, ...
frame0,pos_frame0,Pos_Graphic_Area,pus_close] = ...
wfigmngr('create','Image Extension / Truncation', ...
winAttrb,'ExtFig_Tool_3', ...
strvcat(mfilename,'cond'),1,1,0);
if nargout>0 , varargout{1} = win_imgxtool; end
% Add Help for Tool.
%------------------
wfighelp('addHelpTool',win_imgxtool, ...
'Two-Dimensional &Extension','IMGX_GUI');
% Add Help Item.
%----------------
wfighelp('addHelpItem',win_imgxtool,...
'Dealing with Border Distortion','BORDER_DIST');
% Menu construction for current figure.
%--------------------------------------
m_files = wfigmngr('getmenus',win_imgxtool,'file');
m_load = uimenu(m_files, ...
'Label','&Load Image', ...
'Position',1, ...
'Callback', ...
[mfilename '(''load'',' str_numwin ');'] ...
);
m_save = uimenu(m_files,...
'Label','&Save Transformed Image', ...
'Position',2, ...
'Enable','Off', ...
'Callback', ...
[mfilename '(''save'',' str_numwin ');'] ...
);
m_demo = uimenu(m_files, ...
'Label','&Example Extension','Position',3);
demoSET = {...
'woman2' , 'ext' , '{''zpd'' , [220,200] , ''both'' , ''both''}' ; ...
'woman2' , 'trunc' , '{''nul'' , [ 96, 96] , ''both'' , ''both''}' ; ...
'wbarb' , 'ext' , '{''sym'' , [512,200] , ''right'', ''both''}' ; ...
'noiswom' , 'ext' , '{''sym'' , [512,512] , ''right'', ''down''}' ; ...
'noiswom' , 'ext' , '{''ppd'' , [512,512] , ''right'', ''down''}' ; ...
'wbarb' , 'ext' , '{''sym'' , [512,512] , ''both'' , ''both''}' ; ...
'facets' , 'ext' , '{''ppd'' , [512,512] , ''both'' , ''both''}' ; ...
'mandel' , 'ext' , '{''sym'' , [512,512] , ''left'' , ''both''}' ...
};
nbDEM = size(demoSET,1);
beg_call_str = [mfilename '(''demo'',' str_numwin ','''];
dummy = demoSET(:,1);
names = strvcat(dummy{:});
tab = setstr(9);
for k = 1:nbDEM
typ = demoSET{k,2};
fil = demoSET{k,1};
par = demoSET{k,3};
parVal = eval(par);
switch parVal{1}
case 'swt'
lenSTR = [' - level: ',int2str(parVal{2})];
otherwise
siz = fliplr(parVal{2});
lenSTR = [' - size: [' , int2str(parVal{2}) , ']'];
end
strPAR = ['mode: ' , parVal{1} , lenSTR, ...
' - direction: [', parVal{3} , ',' parVal{4} ,']'];
switch typ
case 'ext' , strTYPE = ['Extension - '];
case 'trunc' , strTYPE = ['Truncation - '];
end
libel = [names(k,:) tab ' - ' strTYPE strPAR];
action = [beg_call_str fil ''',''' typ ''',' par ');'];
uimenu(m_demo,'Label',libel,'Callback',action);
end
% Begin waiting.
%---------------
wwaiting('msg',win_imgxtool,'Wait ... initialization');
% Borders and double borders.
%----------------------------
dx = X_Spacing; dx2 = 2*dx;
dy = Y_Spacing; dy2 = 2*dy;
% General graphical parameters initialization.
%--------------------------------------------
x_frame0 = pos_frame0(1);
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
matlab中wavelet源代码 (1149个子文件)
wavelets.asc 2KB
wavedec2.asv 412B
wavelets.bin 8KB
dwtmode.cfg 488B
mcc.enc 3KB
wfbmstat.fig 208KB
wfustool.fig 170KB
compwav.fig 122KB
nwavtool.fig 120KB
wfbmtool.fig 93KB
wavemenu.fig 48KB
demoguimwin.fig 46KB
waveleticon.gif 970B
Readme.html 486B
wavelets.inf 8KB
wavelets.ini 2KB
arms.jpg 20KB
blason.jpg 20KB
imgxtool.m 82KB
dw2dmngr.m 71KB
wdretool.m 66KB
dw1dhist.m 60KB
dw2dhist.m 58KB
wfustool.m 57KB
sigxtool.m 57KB
dw1ddisp.m 57KB
utnbcfs.m 52KB
wmoreres.m 52KB
utthrw1d.m 50KB
dynvtool.m 49KB
nwavtool.m 47KB
demolift.m 45KB
sw1dtool.m 43KB
utthrw2d.m 41KB
dw2dstat.m 40KB
cw1dmngr.m 39KB
wfigmngr.m 38KB
Contents.m 37KB
compwav.m 37KB
dw1dstat.m 36KB
cf1dtool.m 35KB
dw1dcomp.m 33KB
sw2dtool.m 32KB
wvdtool.m 31KB
wavemngr.m 30KB
dw2dcomp.m 30KB
wp1dtool.m 30KB
wshowdrv.m 30KB
wptreeop.m 29KB
cf2dtool.m 29KB
dw1dscrm.m 29KB
cwimtool.m 28KB
utthrset.m 28KB
cw1dtool.m 27KB
dw1dtool.m 27KB
wp2dtool.m 27KB
dw1dcfsm.m 27KB
wfbmstat.m 27KB
dw2dtool.m 26KB
wfbmtool.m 26KB
dw1ddeno.m 26KB
utthrgbl.m 25KB
wthrmngr.m 25KB
dscedw1d.m 25KB
utthrwpd.m 25KB
wp2dstat.m 24KB
wp1dstat.m 23KB
dw2ddeno.m 23KB
wp1dcomp.m 22KB
dw1dsepm.m 21KB
wpdtool.m 21KB
dw1dvmod.m 21KB
plot.m 20KB
wp1ddeno.m 20KB
wp2dcomp.m 20KB
wp2dmngr.m 20KB
dw2dutil.m 20KB
dcmddw2d.m 19KB
dw1dmngr.m 18KB
wp2ddeno.m 18KB
wp1dmngr.m 18KB
dw1dtrem.m 17KB
mngmbtn.m 16KB
dynvzaxe.m 15KB
dcmddeno.m 15KB
utanapar.m 15KB
utguidiv.m 14KB
dw1dfile.m 14KB
dblift.m 14KB
dcmdmala.m 14KB
fact_and_ls.m 14KB
dw1dsupm.m 14KB
cbthrw1d.m 13KB
whelpfun.m 13KB
utcolmap.m 13KB
utentpar.m 13KB
wextend.m 13KB
democmdm.m 13KB
dw1dutil.m 12KB
symlift.m 12KB
共 1149 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
- shusenzhou2018-08-21正是需要的
三苗同学
- 粉丝: 1w+
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功