




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、數(shù)位影像處理實習 - GUI基本介面介紹指導教授:沈岱範 老師投影片製作:許進宗參考書籍:Matlab程式設計與應用 張智星著數(shù)位影像處理實習 - GUI基本介面介紹指導教授:沈岱範 開啟GUI開啟GUI開啟GUI開啟GUI點選Axes點選Axes產(chǎn)生兩個axes框框產(chǎn)生兩個axes框框點選兩次Axes視窗以顯示其屬性視窗點選兩次Axes視窗以顯示其屬性視窗修改Tag屬性修改Tag屬性點選Push Button點選Push Button產(chǎn)生Push Button框框產(chǎn)生Push Button框框顯示屬性視窗並修改屬性顯示屬性視窗並修改屬性顯示屬性視窗並修改屬性顯示屬性視窗並修改屬性顯示屬性視窗
2、並修改屬性顯示屬性視窗並修改屬性顯示屬性視窗並修改屬性顯示屬性視窗並修改屬性顯示屬性視窗並修改屬性顯示屬性視窗並修改屬性點選Edit Text點選Edit Text點選Static Text點選Static Text修改Edit Text屬性修改Edit Text屬性修改Static Text屬性修改Static Text屬性點選Menu Editor點選Menu Editor修改屬性修改屬性建立一個子列建立一個子列修改屬性修改屬性存檔存檔存檔後會顯示出M-file檔存檔後會顯示出M-file檔主程式主程式程式碼clc;image=zeros(3,3);axes(handles.pixel);
3、imshow(uint8(image);handles.output = hObject;handles.data=;handles.i = 0;handles.fv = 0;handles.bv = 0;程式碼clc;back1副程式back1副程式程式碼if handles.bv = 250 handles.bv=handles.bv+5; set(handles.edit1,string,handles.bv); image(1:3,1:3)=handles.bv; image(2,2)=handles.fv; axes(handles.pixel); imshow(uint8(imag
4、e); guidata(hObject, handles);elseif handles.bv = 255 fprintf(The value of background is less than 0.n);else handles.bv=handles.bv+10; set(handles.edit1,string,handles.bv); image(1:3,1:3)=handles.bv; image(2,2)=handles.fv; axes(handles.pixel); imshow(uint8(image); guidata(hObject, handles);end程式碼if
5、handles.bv = 250back2副程式back2副程式程式碼if handles.bv = 255 handles.bv=handles.bv-5; set(handles.edit1,string,handles.bv); image(1:3,1:3)=handles.bv; image(2,2)=handles.fv; axes(handles.pixel); imshow(uint8(image); guidata(hObject, handles);elseif handles.bv = 0 fprintf(The value of background is less th
6、an 0.n);else handles.bv=handles.bv-10; set(handles.edit1,string,handles.bv); image(1:3,1:3)=handles.bv; image(2,2)=handles.fv; axes(handles.pixel); imshow(uint8(image); guidata(hObject, handles);end程式碼if handles.bv = 255front1副程式front1副程式程式碼if handles.fv = 255 fprintf(The value is lager than 255.n);
7、else handles.fv=handles.fv+1; set(handles.edit2,string,handles.fv); image(1:3,1:3)=handles.bv; image(2,2)=handles.fv; axes(handles.pixel); imshow(uint8(image); guidata(hObject, handles);end程式碼if handles.fv = 255front2副程式front2副程式程式碼if handles.fv = 0 fprintf(The value of front is less than 0.n);else
8、handles.fv=handles.fv-1; set(handles.edit2,string,handles.fv); image(1:3,1:3)=handles.bv; image(2,2)=handles.fv; axes(handles.pixel); imshow(uint8(image); guidata(hObject, handles);end程式碼if handles.fv = 0edit1副程式edit1副程式程式碼handles.bv=round(str2num(get(handles.edit1,string);set(handles.edit1,string,h
9、andles.bv);image(1:3,1:3)=handles.bv;image(2,2)=handles.fv;axes(handles.pixel);imshow(uint8(image);guidata(hObject, handles);程式碼handles.bv=round(str2num(geedit2副程式edit2副程式程式碼handles.fv=round(str2num(get(handles.edit2,string);set(handles.edit2,string,handles.fv);image(1:3,1:3)=handles.bv;image(2,2)=h
10、andles.fv;axes(handles.pixel);imshow(uint8(image);guidata(hObject, handles);程式碼handles.fv=round(str2num(gerecord副程式record副程式程式碼handles.i = handles.i + 1;guidata(hObject, handles);handles.data(1,handles.i) =handles.bv;handles.data(2,handles.i) =handles.fv - handles.bv;guidata(hObject,handles);程式碼hand
11、les.i = handles.i + 1;close副程式close副程式程式碼close(gcbf);程式碼close(gcbf);reset副程式reset副程式程式碼handles.fv = 0;handles.bv = 0;image(1:3,1:3)=handles.bv;image(2,2)=handles.fv;axes(handles.pixel);imshow(uint8(image);set(handles.edit1,string,int2str(handles.bv)set(handles.edit2,string,int2str(handles.fv)guidata(hObject, handles);程式碼ha
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025競業(yè)禁止協(xié)議合同模板范文
- 班級互動游戲的設計思路計劃
- 2025建筑給排水工程施工合同
- 生物課堂教學互動策略計劃
- 針對市場波動的年度應對策略計劃
- 制定合理目標的實踐經(jīng)驗計劃
- 責任教育與公民素養(yǎng)提升計劃
- 2025店鋪租賃合同協(xié)議書
- 物聯(lián)網(wǎng)在智能城市中的應用與實踐
- 人工智能基礎(chǔ)試題集
- 庫房管理工作職責與規(guī)范化
- 2024-2025學年七年級下學期數(shù)學期中測試(浙江瑞安市專用)(含答案)
- 酒駕案件辦理培訓課件
- 2022年10月自考06779應用寫作學試題及答案
- 土壤污染及防治課件
- 視頻編碼技術(shù)課件
- 道法《我們的公共生活》第一課時課件
- 科學教學儀器設備借用登記表(精品文檔)
- 火災報警系統(tǒng)安裝檢查記錄
- 壓力性損傷管理制度
- 減重代謝手術(shù)護理---副本課件
評論
0/150
提交評論