資源簡介
用MATLAB讀lean.jpg圖片,進行DCT變換以壓縮,然后IDCT讀出圖片。有GUI.
代碼片段和文件信息
%--------------------------------------------------------------------------
%--------------------------------------------------------------------------
function?varargout?=?one(varargin)
%?ONE?M-file?for?one.fig
%??????ONE?by?itself?creates?a?new?ONE?or?raises?the?existing
%??????singleton*.
%
%??????H?=?ONE?returns?the?handle?to?a?new?ONE?or?the?handle?to
%??????the?existing?singleton*.
%
%??????ONE(‘CALLBACK‘hobjecteventDatahandles...)?calls?the?local
%??????function?named?CALLBACK?in?ONE.M?with?the?given?input?arguments.
%
%??????ONE(‘Property‘‘Value‘...)?creates?a?new?ONE?or?raises?the
%??????existing?singleton*.??Starting?from?the?left?property?value?pairs?are
%??????applied?to?the?GUI?before?one_OpeningFcn?gets?called.??An
%??????unrecognized?property?name?or?invalid?value?makes?property?application
%??????stop.??All?inputs?are?passed?to?one_OpeningFcn?via?varargin.
%
%??????*See?GUI?Options?on?GUIDE‘s?Tools?menu.??Choose?“GUI?allows?only?one
%??????instance?to?run?(singleton)“.
%
%?See?also:?GUIDE?GUIDATA?GUIHANDLES
%?Edit?the?above?text?to?modify?the?response?to?help?one
%?Last?Modified?by?GUIDE?v2.5?17-Apr-2009?09:19:32
%?Begin?initialization?code?-?DO?NOT?EDIT
gui_Singleton?=?1;
gui_State?=?struct(‘gui_Name‘???????mfilename?...
???????????????????‘gui_Singleton‘??gui_Singleton?...
???????????????????‘gui_OpeningFcn‘?@one_OpeningFcn?...
???????????????????‘gui_OutputFcn‘??@one_OutputFcn?...
???????????????????‘gui_LayoutFcn‘??[]??...
???????????????????‘gui_Callback‘???[]);
if?nargin?&&?ischar(varargin{1})
????gui_State.gui_Callback?=?str2func(varargin{1});
end
if?nargout
????[varargout{1:nargout}]?=?gui_mainfcn(gui_State?varargin{:});
else
????gui_mainfcn(gui_State?varargin{:});
end
%?End?initialization?code?-?DO?NOT?EDIT
%--------------------------------------------------------------------------
%-------------------------------------------------------------------------
%?---?Executes?just?before?one?is?made?visible.
function?one_OpeningFcn(hobject?eventdata?handles?varargin)
%?This?function?has?no?output?args?see?OutputFcn.
%?hobject????handle?to?figure
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?varargin???command?line?arguments?to?one?(see?VARARGIN)
%?Choose?default?command?line?output?for?one
handles.output?=?hobject;
%?Update?handles?structure
%--------------init?data
handles.coefficient=1;
handles.field=1;
handles.quantization=1;
handles.a=1;
%------------------------------------------------------
guidata(hobject?handles);
%?UIWAIT?makes?one?wait?for?user?response?(see?UIRESUME)
%?uiwait(handles.figure1);
%--------------------------------------------------------------------------
%--------------------------------------------------------------------------
%?---?Outputs?from?this?function?are?returned?to?the?command?line.
function?varargout?=?one_OutputFcn(hobject?eventdata?handles)?
%?varargout??cell?arr
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????517471??2009-04-17?12:01??dct\one.exe
?????文件??????25226??2009-04-17?12:00??dct\one.m
?????文件???????6878??2009-04-15?00:14??dct\read.fig
?????目錄??????????0??2009-05-30?10:30??dct
-----------?---------??----------?-----??----
???????????????549575????????????????????4
- 上一篇:戰勝MATLAB必做的50道題
- 下一篇:p文件,MATLAB的
評論
共有 條評論