【正文】
w=w+1。 %進(jìn)行下一次迭代 A=round(A)。isodata=mat2gray(A)。close?!秷D像分析與模式識(shí)別》課程 期末大作業(yè)報(bào)告 姓名:趙世瑜 學(xué)號(hào):2022204067 19 / 19附錄一:MATLAB 的 GUI 操作界面代碼function varargout = sztxfx_mssb_zsy(varargin)gui_Singleton = 1。gui_State = struct(39。gui_Name39。, mfilename, ... 39。gui_Singleton39。, gui_Singleton, ... 39。gui_OpeningF39。, @sztxfx_mssb_zsy_OpeningF, ... 39。gui_OutputF39。, @sztxfx_mssb_zsy_OutputF, ... 39。gui_LayoutF39。, [] , ... 39。gui_Callback39。, [])。if nargin amp。amp。 ischar(varargin{1}) = str2func(varargin{1})。endif nargout [varargout{1:nargout}] = gui_mainf(gui_State, varargin{:})。else gui_mainf(gui_State, varargin{:})。end% End initialization code DO NOT EDIT% Executes just before sztxfx_mssb_zsy is made visible.function sztxfx_mssb_zsy_OpeningF(hObject, eventdata, handles, varargin)% Choose default mand line output for sztxfx_mssb_zsy = hObject。% Update handles structureguidata(hObject, handles)。% Outputs from this function are returned to the mand line.function varargout = sztxfx_mssb_zsy_OutputF(hObject, eventdata, handles) varargout{1} = 。% Executes during object creation, after setting all properties.function axes1_CreateF(hObject, eventdata, handles)set(hObject,39。xTick39。,[])。set(hObject,39。ytick39。,[])。set(hObject,39。box39。,39。on39。)。% Hint: place code in OpeningF to populate axes1《圖像分析與模式識(shí)別》課程 期末大作業(yè)報(bào)告 姓名:趙世瑜 學(xué)號(hào):2022204067 20 / 19% Executes during object creation, after setting all properties.function axes2_CreateF(hObject, eventdata, handles)set(hObject,39。xTick39。,[])。set(hObject,39。ytick39。,[])。set(hObject,39。box39。,39。on39。)。% Hint: place code in OpeningF to populate axes2% Executes on button press in togglebutton1.function togglebutton1_Callback(hObject, eventdata, handles)global imgage % global info[filename,pathname]=uigetfile({39。*.bmp39。39。*.tif39。39。*.jpg39。39。*.gif39。39。*.*39。},39。選擇圖片39。)。if pathname == 0 return。endstr=[pathname filename]。% info=imfinfo(str)。imgage=imread(str)。axes()。imshow(imgage)。% Hint: get(hObject,39。Value39。) returns toggle state of togglebutton1% Executes on selection change in popupmenu1.function popupmenu1_Callback(hObject, eventdata, handles)global value value = get(hObject,39。Value39。)。 switch value case 1 cla。 end% Executes during object creation, after setting all properties.function popupmenu1_CreateF(hObject, eventdata, handles)if ispc amp。amp。 isequal(get(hObject,39。BackgroundColor39。), get(0,39。defaultUicontrolBackgroundColor39。)) set(hObject,39。BackgroundColor39。,39。white39。)。end% Executes on button press in togglebutton2.function togglebutton2_Callback(hObject, eventdata, handles)global imgageglobal value《圖像分析與模式識(shí)別》課程 期末大作業(yè)報(bào)告 姓名:趙世瑜 學(xué)號(hào):2022204067 21 / 19[m n]=size(imgage)。axes()。switch value case 1 cla。 case 2 h = waitbar(,39。正在處理,請(qǐng)稍候...39。)。 IMG=jiaozheng(imgage)。% waitbar(1,h,39。ok!39。)。 pause()。% delete(h)。 imshow(IMG)。 case 3 h = waitbar(,39。正在處理,請(qǐng)稍候...39。)。 isodata=isodata_zsy(imgage)。 waitbar(1,h,39。ok!39。)。 pause()。 delete(h)。 imshow(isodata)。 %figure ,imshow(B)。title(39。hough 變換后的圖像39。)。 %xlabel(39。\theta39。), ylabel(39。\rho39。)。 %axis on, axis normal, hold on。endclear。% Hint: get(hObject,39。Value39。) returns toggle state of togglebutton2% Executes on button press in togglebutton3.function togglebutton3_Callback(hObject, eventdata, handles)clc。clear。close(gcbf)。% Hint: get(hObject,39。Value39。) returns toggle state of togglebutton3