資源簡介
matlab gui,改變圖像灰度級個數(shù),使用sobel算子提取圖像輪廓,包含對輪廓的信息量分析。運行前情添加壓縮文件里的graylevel.m函數(shù)文件,回調(diào)函數(shù)中會用到。第一次運行直接打開figure文件后選擇打開圖片會有錯誤,請運行.m文件,再選擇圖片。

代碼片段和文件信息
function?varargout?=?GrayChange(varargin)
%?GRAYCHANGE?MATLAB?code?for?GrayChange.fig
%??????GRAYCHANGE?by?itself?creates?a?new?GRAYCHANGE?or?raises?the?existing
%??????singleton*.
%
%??????H?=?GRAYCHANGE?returns?the?handle?to?a?new?GRAYCHANGE?or?the?handle?to
%??????the?existing?singleton*.
%
%??????GRAYCHANGE(‘CALLBACK‘hobjecteventDatahandles...)?calls?the?local
%??????function?named?CALLBACK?in?GRAYCHANGE.M?with?the?given?input?arguments.
%
%??????GRAYCHANGE(‘Property‘‘Value‘...)?creates?a?new?GRAYCHANGE?or?raises?the
%??????existing?singleton*.??Starting?from?the?left?property?value?pairs?are
%??????applied?to?the?GUI?before?GrayChange_OpeningFcn?gets?called.??An
%??????unrecognized?property?name?or?invalid?value?makes?property?application
%??????stop.??All?inputs?are?passed?to?GrayChange_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?GrayChange
%?Last?Modified?by?GUIDE?v2.5?05-May-2015?00:08:16
%?Begin?initialization?code?-?DO?NOT?EDIT
gui_Singleton?=?1;
gui_State?=?struct(‘gui_Name‘???????mfilename?...
???????????????????‘gui_Singleton‘??gui_Singleton?...
???????????????????‘gui_OpeningFcn‘?@GrayChange_OpeningFcn?...
???????????????????‘gui_OutputFcn‘??@GrayChange_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?GrayChange?is?made?visible.
function?GrayChange_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?GrayChange?(see?VARARGIN)
%?Choose?default?command?line?output?for?GrayChange
handles.output?=?hobject;
%?Update?handles?structure
guidata(hobject?handles);
%?UIWAIT?makes?GrayChange?wait?for?user?response?(see?UIRESUME)
%?uiwait(handles.figure1);
%?---?Outputs?from?this?function?are?returned?to?the?command?line.
function?varargout?=?GrayChange_OutputFcn(hobject?eventdata?handles)?
%?varargout??cell?array?for?returning?output?args?(see?VARARGOUT);
%?hobject????handle?to?figure
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?Get?default?command?line?output?from?handles?structure
varargout{1}?=?handles.output;
%?---?Executes?on?button?press?in?pushbutton1.
function?pushbutton1_Callback(hobject?eventdata?handles)
global?imGray;
[filenamepathname]=uigetfile({‘
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????92057??2015-05-21?16:29??GrayChange\GrayChange.fig
????I.A....?????11371??2015-05-21?16:29??GrayChange\GrayChange.m
????I.A....???????387??2015-05-04?23:06??GrayChange\graylevel.m
????I..D...?????????0??2015-05-21?16:47??GrayChange
-----------?---------??----------?-----??----
???????????????103815????????????????????4
評論
共有 條評論