



免費(fèi)預(yù)覽已結(jié)束,剩余1頁(yè)可下載查看
下載本文檔
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
function varargout = mygui(varargin)% MYGUI M-file for mygui.fig% MYGUI, by itself, creates a new MYGUI or raises the existing% singleton*.% H = MYGUI returns the handle to a new MYGUI or the handle to% the existing singleton*.% MYGUI(CALLBACK,hObject,eventData,handles,.) calls the local% function named CALLBACK in MYGUI.M with the given input arguments.% MYGUI(Property,Value,.) creates a new MYGUI or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before mygui_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to mygui_OpeningFcn via varargin.% *See GUI Options on GUIDEs 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 mygui% Last Modified by GUIDE v2.5 18-May-2012 15:45:08% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, mygui_OpeningFcn, . gui_OutputFcn, mygui_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);endif nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT% - Executes just before mygui is made visible.function mygui_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 mygui (see VARARGIN)% Choose default command line output for myguihandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes mygui wait for user response (see UIRESUME)% uiwait(handles.figure1);% - Outputs from this function are returned to the command line.function varargout = mygui_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 structurevarargout1 = handles.output;% - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global im;filename pathname=uigetfile(*.jpg;*.bmp;*.gif,選擇圖片);str=pathname filename;im=imread(str);axes(handles.axes1);imshow(im);% - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)close(gcf);% - Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% - Executes when selected object is changed in uipanel1.function uipanel1_SelectionChangeFcn(hObject, eventdata, handles)% hObject handle to the selected object in uipanel1 % eventdata structure with the following fields (see UIBUTTONGROUP)%EventName: string SelectionChanged (read only)%OldValue: handle of the previously selected object or empty if none was selected%NewValue: handle of the currently selected object% handles structure with handles and user data (see GUIDATA)global im;str=get(hObject,string);axes(handles.axes1);switch str case 原圖 imshow(im); case sobel BW=edge(rgb2gray(im),sobel); imshow(BW); case prewitt BW=edge(rgb2gray(im),prewitt); imshow(BW); case canny BW=edge(rgb2gray(im),canny); imshow(BW);end% - Executes on selection change in popupmenu1.function popupmenu1_Callback(hObject, eventdata, handles)% hObject handle to popupmenu1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = cellstr(get(hObject,String) returns popupmenu1 contents as cell array% contentsget(hObject,Value) returns selected item from popupmenu1% - Executes during object creation, after setting all properties.function popupmenu1_CreateFcn(hObject, eventdata, handles)% hObject handle to popupmenu1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: popupmenu controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年高校創(chuàng)新創(chuàng)業(yè)教育課程體系改革下的實(shí)踐教學(xué)案例分析報(bào)告
- 加強(qiáng)安全檢查消除隱患
- 2025年工業(yè)領(lǐng)域CCS技術(shù)在工業(yè)環(huán)保產(chǎn)業(yè)國(guó)際合作中的應(yīng)用案例報(bào)告
- 2025年高速公路智能交通系統(tǒng)與新能源車輛適配技術(shù)研究報(bào)告
- 農(nóng)業(yè)大數(shù)據(jù)驅(qū)動(dòng)下的智慧農(nóng)業(yè)平臺(tái)建設(shè)與農(nóng)業(yè)風(fēng)險(xiǎn)管理研究報(bào)告001
- 銀行服務(wù)技巧培訓(xùn)
- 頂尖名校數(shù)學(xué)試卷
- 小學(xué)地球儀課件
- 2025年建筑信息模型(BIM)技術(shù)在工程項(xiàng)目全過(guò)程管理中的應(yīng)用報(bào)告
- 特色農(nóng)產(chǎn)品電商平臺(tái)農(nóng)產(chǎn)品標(biāo)準(zhǔn)化生產(chǎn)與質(zhì)量控制報(bào)告
- 核醫(yī)學(xué)講課比賽技巧與策略
- 2025年貴州六盤(pán)水市燃?xì)饧瘓F(tuán)六盤(pán)水燃?xì)庥邢薰菊衅腹P試參考題庫(kù)含答案解析
- 妊娠期子宮蛻膜息肉診治中國(guó)專家共識(shí)(2024年版)解讀課件
- 建筑工程設(shè)計(jì)合作協(xié)議書(shū)
- 谷子介紹課件
- 幼兒園教育懲戒的邊界與藝術(shù)
- 交通安全與一氧化碳安全教育
- 2025年出版:全球市場(chǎng)工程機(jī)械多路換向閥總體規(guī)模、主要生產(chǎn)商、主要地區(qū)、產(chǎn)品和應(yīng)用細(xì)分調(diào)研報(bào)告
- 2025屆高考政治復(fù)習(xí)重點(diǎn)知識(shí)大全(全7冊(cè))
- 電梯公告板制度
- 《2024 3610-T-339 可配置汽車信息娛樂(lè)服務(wù) 第 2 部分:要求》知識(shí)培訓(xùn)
評(píng)論
0/150
提交評(píng)論