




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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修订
- 2024-2025学年广东省茂名市电白区高二下学期期中生物试题及答案
- 中国幕墙建筑行业市场调查研究及发展战略规划报告
- 2025年 烟草陕西公司招聘考试笔试试题附答案
- 2025年 广东省注册安全工程师-安全生产技术基础考试练习题附答案
- “传统文化线上商业传奇”商业计划
- 2025年 丹东市技师学院普通高校招聘教师考试试题附答案
- 2025年 保山市隆阳区永昌街道社区卫生服务中心招聘考试笔试试题附答案
- 1,2-环氧丁烷行业深度研究分析报告(2024-2030版)
- 2025年中国光纤行业市场调研分析及投资前景预测报告
- 蛇类解剖生理特征(特种宠物疾病防治)
- 高中日语学习宣讲+课件
- 最全广联达教程全套
- 广东省全国大学英语四、大级考试考务手册
- 年产10吨功能益生菌冻干粉的工厂设计改
- 2022年河北唐山市公安交通警察支队第五交通警察大队招聘辅警17人笔试备考题库及答案解析
- 实验设计与数据处理
- GB/T 42101-2022游乐园安全基本要求
- GB/T 9966.16-2021天然石材试验方法第16部分:线性热膨胀系数的测定
- GB/T 9800-1988电镀锌和电镀镉层的铬酸盐转化膜
- GB/T 7193-2008不饱和聚酯树脂试验方法
评论
0/150
提交评论