1 / 21

SIMULASI PENDETEKSIAN GARIS LURUS PADA CITRA DIGITAL MENGGUNAKAN MATLAB 7.1

SIMULASI PENDETEKSIAN GARIS LURUS PADA CITRA DIGITAL MENGGUNAKAN MATLAB 7.1. Anggit Praharasty (L2F005513). ………………………………….Outline. Citra Digital Teori Dasar Citra Pengolahan Citra Segmentasi Citra Deteksi Garis Lurus Perancangan Program Kesimpulan. …………………………….Citra Digital.

yoko
Télécharger la présentation

SIMULASI PENDETEKSIAN GARIS LURUS PADA CITRA DIGITAL MENGGUNAKAN MATLAB 7.1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SIMULASI PENDETEKSIAN GARIS LURUSPADA CITRA DIGITALMENGGUNAKAN MATLAB 7.1 Anggit Praharasty (L2F005513)

  2. ………………………………….Outline • Citra Digital • Teori Dasar Citra • Pengolahan Citra • Segmentasi Citra • Deteksi Garis Lurus • Perancangan Program • Kesimpulan

  3. …………………………….Citra Digital • Citra digital merupakan larik dua dimensi atau suatu matriks yang elemen-elemennya menyatakan tingkat keabuan dari elemen gambar. Contoh bentuk citra monokrom dan bentuk matriks penyusunnya

  4. ……………..Teori Dasar Citra Digital • Citra dapat dinyatakan sebagai fungsi kontinu dari intensitas cahaya dalam bidang dua dimensi,f(x,y), x, dan y menyatakan koordinat ruang dan nilai f pada suatu koordinat menyatakan kecerahan dan informasi warna citra.

  5. …………….Pengolahan Citra Digital • Pengertian • Tujuan • Macam

  6. ……………..………Segmentasi Citra • Segmentasi membagi citra menjadi region-region atau objek-objek. • Secara umum algoritma-algoritma segmentasi didasarkan pada satu di antara dua buah karakteristik intensitas, yaitu : • Diskontinuitas • similaritas.

  7. …………………Deteksi Garis Lurus • Pertama kali dijelaskan oleh Canny,dan diperkuat oleh Rothwell. • Cara yang paling umum untuk melakukan deteksi garis lurus adalah dengan menjalankan suatu mask atau tapis pada citra.

  8. ………..Deteksi Garis Lurus (Lanjut) • Operator pendeteksian garis terdiri atas suatu mask konvolusi yang diatur untuk mendeteksi keberadaan garis pada lebar n tertentu, pada orientasi tertentu. Empat mask pendeteksian garis dengan respon maksimum pada horisontal, vertikal, +450 , 450

  9. ……………….Perancangan Program • Algoritma • Source Code • Simulasi

  10. ……………………………….Algoritma • Memperoleh suatu bitmap dari citra, dengan sebuah nilai dari setiap kanal warna merah, hijau, dan biru untuk setiap pixel. • Menciptakan suatu larik Boolean 2D yang dinamakan selected dengan setiap masukan sesuai dengan pixel pada bitmap. Setiap masukan menandakan bahwa suatu pixel telah melewati semua tapis sejauh ini, lalu atur semua masukan agar true sebagaimana yang ditetapkan.

  11. …………………………Source Code function varargout = anggit(varargin) % ANGGIT M-file for anggit.fig % ANGGIT, by itself, creates a new ANGGIT or raises the existing % singleton*. % % H = ANGGIT returns the handle to a new ANGGIT or the handle to % the existing singleton*. % % ANGGIT('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in ANGGIT.M with the given input arguments. % % ANGGIT('Property','Value',...) creates a new ANGGIT or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before anggit_OpeningFunction gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to anggit_OpeningFcn via varargin. % % *See GUI Options on GUIDE's 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 anggit % Last Modified by GUIDE v2.5 17-Dec-2008 13:48:32 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @anggit_OpeningFcn, ... 'gui_OutputFcn', @anggit_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT

  12. …….…………………Source Code (Lanjut) % --- Executes just before anggit is made visible. function anggit_OpeningFcn(hObject, eventdata, 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 anggit (see VARARGIN) % Choose default command line output for anggit handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes anggit wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = anggit_OutputFcn(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 handles structure varargout{1} = handles.output; % --- Executes on button press in pushbutton1. function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global I Proyek=guidata(gcbo); [FileName,PathName]=uigetfile('*.jpg'); I=imread(FileName); I=im2double(I); axes(handles.axes1); set(imshow(I));

  13. …….…………………Source Code (Lanjut) % --- Executes on selection change in popupmenu1. function popupmenu1_Callback(hObject, eventdata, handles) % hObject handle to popupmenu1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array % contents{get(hObject,'Value')} returns selected item from popupmenu1 % --- Executes during object creation, after setting all properties. function popupmenu1_CreateFcn(hObject, eventdata, handles) % hObject handle to popupmenu1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in pushbutton2. function pushbutton2_Callback(hObject, eventdata, handles) % hObject handle to pushbutton2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global I as H=[-1 -1 -1; 2 2 2;-1 -1 -1]; V=[-1 2 -1;-1 2 -1;-1 2 -1]; P45=[-1 -1 2;-1 2 -1;2 -1 -1]; M45=[2 -1 -1;-1 2 -1;-1 -1 2];

  14. …….…………………Source Code (Lanjut) qqqq = get(findobj('Tag','popupmenu1'),'value'); if qqqq==1 as=imfilter(I,H); elseif qqqq==2 as=imfilter(I,V); elseif qqqq==3 as=imfilter(I,P45); elseif qqqq==4 as=imfilter(I,M45); end; axes(handles.axes3); set(imshow(as)); % --- Executes on button press in pushbutton4. function pushbutton4_Callback(hObject, eventdata, handles) % hObject handle to pushbutton4 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) exit;

  15. …………………….Simulasi Program • Tampilan Awal Program

  16. ………….Simulasi Program (Lanjut) • Hasil Pendeteksian Garis Horisontal

  17. ………….Simulasi Program (Lanjut) • Hasil Pendeteksian Garis Vertikal

  18. ………….Simulasi Program (Lanjut) • Hasil Pendeteksian Garis Miring 450

  19. ………….Simulasi Program (Lanjut) • Hasil Pendeteksian Garis Miring -450

  20. …………………………….Kesimpulan Hasil dari program pendeteksian garis lurus ini merupakan hasil konvolusi antara matriks citra asli dengan mask yang digunakan.

  21. …………………………...………………Terima Kasih…………………………………….……

More Related