




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 电缆保护管施工方案
- 库房硬化地坪施工方案
- 2025年度福建省劳动合同制员工社会保险及福利待遇合同
- 2025年度电商平台会员购物返利协议
- 2025年度海鲜电商平台运营合作协议
- 二零二五年度农村土地流转及农业项目投资合同
- 二零二五年度社会保险经办机构与金融机构合作协议
- 桩基合同-2025年度桩基施工项目管理与咨询服务协议
- 二零二五年度煤炭供应链金融服务协议
- 二零二五年度住房公积金购房合同原件遗失风险预防及应急处理合同
- 2025年黑龙江旅游职业技术学院单招职业技能测试题库含答案
- 工艺技术人员工作总结
- 医院护理人文关怀实践规范专家共识课件
- DeepSeek在自然灾害预警中的潜力
- DB61T-农产品区域公用品牌管理规范
- 2025年专利技术保密协议书模板
- 个人合伙开店合同范本
- 2024年设备监理师考试题库及答案参考
- 高一生活指南模板
- 2025年一次性死亡赔偿协议模板(2篇)
- 第6课 识别界限 拒绝性骚扰 课件 2024-2025学年人教版(2024)初中体育与健康七年级全一册
评论
0/150
提交评论