數字圖像處理課程設計941_第1頁
數字圖像處理課程設計941_第2頁
數字圖像處理課程設計941_第3頁
數字圖像處理課程設計941_第4頁
數字圖像處理課程設計941_第5頁
已閱讀5頁,還剩6頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、南京信息工程大學 題目: 數字圖像處理課程設計 姓 名: 孟田翠 學 號: 20111325027 班 級: 1班 指導老師: 孫 寶 玉 專 業: 信息工程(系統控制方向) 2013年 12月19日設計目標實現簡單的數字圖像處理功能直方圖均勻化;顯示原圖;比例放大5倍;非比例放大到800*800像素;線性變換;檢測圖像中的點、線和邊緣;分別采用 Sobel,Prewitt,Robert算子進行邊緣銳化。設計內容及要求:(1)、獨立設計方案,實現對圖像的4種及以上處理(比如:底片化效果、灰度增強、圖像復原等等),并至少對其中一種處理方法獨立編程實現,不能完全使用工具箱中的函數。(2)、參考ph

2、otoshop軟件或參考matlab軟件中GUI設計,設計軟件界面,對處理前后的圖像以及直方圖等進行對比顯示;(3)、將實驗結果與其他軟件實現的效果進行比較、分析。總結設計過程所遇到的問題。(4)、可設計菜單式界面,在功能較少的情況下,也可以設計按鍵式界面,視功能多少而定。三、設計過程及步驟1)使用圖形用戶界面開發環境(GUIDE)中的開發工具,設計GUI布局;2)創建GUI應用程序,在自動生成的M文件中編寫程序代碼及調用相關函數,運行結果如下:直方圖均勻化顯示原圖非比例放大比例放大線性變換邊緣銳化四、MATLAB源代碼function varargout = untitled(varargi

3、n)% UNTITLED MATLAB code for untitled.fig% UNTITLED, by itself, creates a new UNTITLED or raises the existing% singleton*.% H = UNTITLED returns the handle to a new UNTITLED or the handle to% the existing singleton*.% UNTITLED(CALLBACK,hObject,eventData,handles,.) calls the local% function named CAL

4、LBACK in UNTITLED.M with the given input arguments.% UNTITLED(Property,Value,.) creates a new UNTITLED or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before untitled_OpeningFcn gets called. An% unrecognized property name or invalid value make

5、s property application% stop. All inputs are passed to untitled_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help untitled % Last Modifie

6、d by GUIDE v2.5 06-Dec-2013 13:54:24 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, untitled_OpeningFcn, . gui_OutputFcn, untitled_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & ischar(

7、varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before untitled is made visible.function untitled_OpeningFcn(hObject, even

8、tdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line arguments to untitled (see VARARGIN) % Choose def

9、ault command line output for untitledhandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes untitled wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = untitled_Ou

10、tputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Get default command line output from handle

11、s structurevarargout1 = handles.output; %顯示原圖% - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)a=imread(cameraman.jpg);imshow(a); % hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles

12、structure with handles and user data (see GUIDATA) % 比例放大% - Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)a=imread(cameraman.jpg);b=imresize(a,5,bilinear);imshow(b); % hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in

13、 a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % 非比例放大% - Executes on button press in pushbutton4.function pushbutton4_Callback(hObject, eventdata, handles)a=imread(cameraman.jpg);c=imresize(a,800 800);imshow(c); % hObject handle to pushbutton4 (see GCBO)% ev

14、entdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % 直方圖均勻化% - Executes on button press in pushbutton6.function pushbutton6_Callback(hObject, eventdata, handles)I=imread(cameraman.jpg);J=histeq(I);subplot(411);imshow(I);subplot(

15、412);imshow(J);subplot(413);imhist(I);subplot(414);imhist(J);% hObject handle to pushbutton6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) %線性變換% - Executes on button press in pushbutton7.function pushbutton7_

16、Callback(hObject, eventdata, handles)a=imread(cameraman.jpg);b=2*a+1;subplot(2,1,1);imshow(a);subplot(2,1,2);imshow(b); % hObject handle to pushbutton7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % 邊緣檢測銳化% -

17、 Executes on button press in pushbutton8.function pushbutton8_Callback(hObject, eventdata, handles)I = imread(cameraman.jpg);H=fspecial(sobel);J=imfilter(I,H);K=fspecial(prewitt);M=imfilter(I,K);G=edge(I,roberts);subplot(4,1,1); imshow(I);subplot(4,1,2); imshow(J);subplot(4,1,3); imshow(M);subplot(4

18、,1,4); imshow(G);% hObject handle to pushbutton8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) %退出 % - Executes on button press in pushbutton9.function pushbutton9_Callback(hObject, eventdata, handles)exit(0);%

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論