M精編B課程設(shè)計(jì)GUI圖像處理完整版_第1頁(yè)
M精編B課程設(shè)計(jì)GUI圖像處理完整版_第2頁(yè)
M精編B課程設(shè)計(jì)GUI圖像處理完整版_第3頁(yè)
M精編B課程設(shè)計(jì)GUI圖像處理完整版_第4頁(yè)
M精編B課程設(shè)計(jì)GUI圖像處理完整版_第5頁(yè)
已閱讀5頁(yè),還剩163頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

M精編B課程設(shè)計(jì)GUI圖像處理 3 3 3 5 34 34 362)設(shè)計(jì)圖形用戶界面,讓用戶能夠?qū)D像進(jìn)行任意的亮度和對(duì)比度變化調(diào)整在截圖中可見(jiàn),左部為一系列功能按鍵如“還原”、“撤銷(xiāo)”、“截圖”通過(guò)MenuEditor創(chuàng)建如下菜單,通過(guò)以下菜單來(lái)控制顯示或隱藏功能按鍵以“編輯”菜單中“圖像變形”中的“圖像翻轉(zhuǎn)”為例說(shuō)明實(shí)現(xiàn)用戶界面functiontuxiangfanzhuan_Callback(hObject,eventdata,handles)(1)利用“文件”菜單中的“打開(kāi)”、“保存為…”分別實(shí)現(xiàn)圖片的讀取與保functionopenfile_Callback(hObject,eventdata,handles)return;通過(guò)[filename,pathname]=uigetfile({'*.jpg';'*.bmp';'*.tif';'選擇相應(yīng)路徑打開(kāi)的圖像;通過(guò)file=[pathname,filename];x=imreadfunctionsave_Callback(hObject,msgbox('你按了取消鍵','保存失敗');件','untitled.jpg')選擇圖像文件保functionexit_Callback(hObject,closeall;運(yùn)行程序后,通過(guò)“編輯”菜單中的“常用處理”選中“亮度調(diào)節(jié)”%---Executesonbuttonpressinradiobutton12.functionradiobutton12_Callback(hObject,eventdata,handles)%Hint:get(hObject,'Value')returnstogglestateofradiobutton12prompt={'調(diào)整倍數(shù)'};p=inputdlg(prompt,'input',functionuipanel10_SelectionChangeFcn(hObject,p=inputdlg(prompt,'input',p=inputdlg(prompt,'input',p=inputdlg(prompt,'input',4.4用鼠標(biāo)選取圖像感興趣區(qū)域,顯示和保存該選擇區(qū)域。通過(guò)imcrop(x)函數(shù)來(lái)實(shí)現(xiàn)對(duì)圖片某一區(qū)域的截functionpushbutton1_Callback(hObject,functionradiobutton16_Callback(hObject,%Hint:get(hObject,'Value')rfunctionuipanel9_SelectionChangeFcn(hObject,eventdata,hp=inputdlg(prompt,'input',p=inputdlg(prompt,'input',f=imresize(handles.%---Executesonbuttonpressinpushbutton7.functionpushbutton7_Callback(hObject,eventdata,handles)axes(handles.axes2);T=getimage;functionpushbutton8_Callback(hObject,functionuipanel4_SelectionChangeFcn(hObject,eventdata,handles)p=inputdlg(prompt,'input',f=imnoise(handles.img,'prompt={'輸入高斯噪聲1:','輸p=inputdlg(prompt,'input',f=imnoise(handles.imp=inputdlg(prompt,'input',functionuipanel5_SelectionChangeFcn(hObject,eventdata,k=medfilt2(handles.k=wiener2(handles.imfunctionpushbutton14_Callback(hObject,functionpushbutton15_Callback(hObject,通過(guò)一個(gè)全局變量保存原始圖像路徑,在需要還functionpushbutton9_Callback(hObject,撤銷(xiāo)上一步的操作。通過(guò)另設(shè)一個(gè)全局變量T保存是上一次操作后的圖像。functionpushbutton11_Callback(hObject,functionuipanel7_SelectionChangeFcn(hObject,eventdat程序關(guān)鍵部分:通過(guò)f=fliplr(handles.img);f=flipud(handlefunctionpushbutton3_Callback(hObject,eventdata,han轉(zhuǎn)p=inputdlg(prompt,'input',f=imrotate(handles.img,p1,關(guān)鍵部分:通過(guò)p=inputdlg(prompt,'input',1,defans);p1=str2nu%---Executesonbuttonpressinpushbutton12.functionpushbutton12_Callback(hObject,eventdata,handles)T=getimage;f=imcomplement(handles.img);%圖像取反′handles.img=f;guidata(hObject,handles);functionpushbutton16_Callback(hObject,軟件測(cè)試基本成功,課題所要求的功能均能較好實(shí)現(xiàn)。但一些功能只支持灰度圖像的其中值得一提的是在濾波處理中的低通濾波與高通濾波的效果。由于一般圖像中含有較多的低頻信息成分高頻成分較少,通過(guò)低通濾波后,噪聲以及高頻成分被濾除,圖像雖有少量失真,略顯模糊,但尚可辨識(shí)。但若是通過(guò)高通濾波后,大量的有效低頻信息被濾雖然對(duì)課題感到很懵懂,但在鄭老師的簡(jiǎn)單提示與指導(dǎo)后,我開(kāi)始找到了解決問(wèn)分的準(zhǔn)備。在參考了相關(guān)材料及源程序,我對(duì)自己以及一些函數(shù)使用的不恰當(dāng),使得在對(duì)圖像文件的保[2]《MATLAB仿真在信號(hào)處理中的應(yīng)用》徐明遠(yuǎn)劉增力西安電子科技大學(xué)出版社%TUXIANGCHULIM-fi%%%TUXIANGCHULI('CALLBACK',arguments.%%TUXIANGCHULI('Property','Value',...)createsanewTUXIAN%appliedtothe%unrecognizedpr%%%Seealso:GUIDE,GU'gui_Singleton',gui_S'gui_OpeningFcn',@tuxiangchuli_Ope'gui_OutputFcn',@tuxiangchuli_Ougui_State.gui_Callback=sfunctiontuxiangchuli_OpeningFcn(hObject,eventdat%uiwait(handles.figurfunctionvarargout=tuxiangchuli_OutputFcn(hObject,%------------------------文件-------------------------------------functionfile_Callback(hObject,%-----------------------------退出--------------------------------functionexit_Callback(hObject,closeall;%--------------------------打開(kāi)文件-------------------------------functionopenfile_Callback(hObject,return;globalS%éèòè±áS£?±£′3ê%-------------------------關(guān)于------------------------------------functionabout_Callback(hObject,%--------------------------幫助-----------------------------------functionhelp_Callback(hObject,%-------------------------保存------------------------------------functionsave_Callback(hObject,functionradiobutton12_Callback(hObject,%Hint:get(hObject,'Value')rp=inputdlg(prompt,'input',%------------------------噪聲-------------------------------------functionuipanel4_SelectionChangeFcn(hObject,p=inputdlg(prompt,'input',f=imnoise(handles.img,prompt={'êè1éù2?êy1:','êè1p=inputdlg(prompt,'input',f=imnoise(handles.ip=inputdlg(prompt,'input',functionradiobutton16_Callback(hObject,%Hint:get(hObject,'Value')rfunctionpushbutton1_Callback(hObject,functionpushbutton3_Callback(hObject,eventdata,hap=inputdlg(prompt,'input',f=imrotate(handles.img,p1%Hint:popupmenucontrolsusuallyhaveawhitebackgroundonWindows.get(0,'defaultUicontr%-----------------------------濾波--------------------------------functionuipanel5_SelectionChangeFck=medfilt2(handles.k=wiener2(handles.im%--------------------------------------------------------------functionuipanel7_SelectionChangeFcfunctionpushbutton7_Callback(hObject,functionpushbutton8_Callback(hObject,%--------------------------------------------------------------functionuipanel9_SelectionChangeFcn(hObject,p=inputdlg(prompt,'input',p=inputdlg(prompt,'input',functionpushbutton9_Callback(hObject,functionpushbutton11_Callback(hObject,%--------------------------------------------------------------functionuipanel10_SelectionChangeFcn(hObject,p=inputdlg(prompt,'input',functionpushbutton12_Callback(hObject,functionpushbutton14_Callback(hObject,f=double(y1);%êy?YààDí%t×°íì?1(Butterworth)μíífunctionpushbutton15_Callback(hObject,f=double(x);functionpushbutton16_Callback(hObject,%----------------------------退出---------------------------------functionedit_Callback(hObject,%---------------------------圖像編輯------------------------------functiontuxiangbianxing_Callback(hObject,%------------------------添加噪聲---------------------------------functiontianjiazaosheng_Callback(hObject,%--------------------------濾波處理-------------------------------functionlvbochuli_Callback(hObject,%-----------------------常用處理----------------------------------functionchangyongchuli_Callback(hObject,%---------------------------圖像處理------------------------------functionteshuchuli_Callback(hObject,%------------------------------圖像翻轉(zhuǎn)----------------------------functiontuxiangfanzhuan_Callback(hObject,%---------------------------圖像旋轉(zhuǎn)------------------------------functiontuxiangxuanzhuan_Callback(hObject,%-----------------------------低通濾波處理-------------------------functionditonglvbochuli_Callback(hObject,%----------------------------高通濾波處理--------------------------functiongaotonglvbochuli_Callback(hObject,%----------------------------圖像濾波處理--------------------------functiontuxianglvbo_Callback(hObject,%--------------------------亮度調(diào)節(jié)-------------------------------

溫馨提示

  • 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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論