数位影像处理实习课件_第1页
数位影像处理实习课件_第2页
数位影像处理实习课件_第3页
数位影像处理实习课件_第4页
数位影像处理实习课件_第5页
已阅读5页,还剩43页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、數位影像處理實習 - GUI基本介面介紹指導教授:沈岱範 老師投影片製作:許進宗參考書籍:Matlab程式設計與應用 張智星著數位影像處理實習 - GUI基本介面介紹指導教授:沈岱範 開啟GUI開啟GUI開啟GUI開啟GUI點選Axes點選Axes產生兩個axes框框產生兩個axes框框點選兩次Axes視窗以顯示其屬性視窗點選兩次Axes視窗以顯示其屬性視窗修改Tag屬性修改Tag屬性點選Push Button點選Push Button產生Push Button框框產生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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论