LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end

Similar documents
LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

LAMPIRAN LISTING PROGRAM

LAMPIRAN 1. Percobaan

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware;

LAMPIRAN A LISTINGPROGRAM

% Edit the above text to modify the response to help Video_Player. % Last Modified by GUIDE v May :38:12

Signal and Systems. Matlab GUI based analysis. XpertSolver.com

1. Peralatan LAMPIRAN

% Edit the above text to modify the response to help Principal

GUI code for different sections is in following sections

1.Matlab Image Encryption Code

MV 1:00 1:05 1:00 1:05

LAMPIRAN A PROGRAM PELATIHAN DAN PENGUJIAN

Homeworks on FFT Instr. and Meas. for Communication Systems- Gianfranco Miele. Name Surname

OMR Sheet Recognition

Lampiran 1. Script M-File Global Ridge

Ear Recognition. By: Zeyangyi Wang

Supplementary Information

GUI Signal Analysis and Filtering Design

COMPLETELY AUTOMATED PUBLIC TURING TEST TO TELL COMPUTERS AND HUMANS APART

Akkad Bakad Bambai Bo

Finding a Minimum Covering Circle Based on Infinity Norms

We are IntechOpen, the world s leading publisher of Open Access books Built by scientists, for scientists. International authors and editors

ECE Fall 05. Undergraduate Research: Digital Signal Processing & Quantization Effects

Main Form visual Studio

A NEW MACHINING COST CALCULATOR (MC 2 )

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i];

Solving Sudoku with MATLAB

Parallel-connected solar arrays

Lithium-Ion Battery Data. Management

PROGRAMMING IN MATLAB

Contents INTERFACING MATLAB WITH EMBEDDED SYSTEMS

.., 7. References. [ 1] 1 mage Analysis and Mathematical Morphology:J.Serra. [2] Erosion, dilation and related operators,by Mariusz Jankowski

Implementation of a Motion Detection System

LOK-Viewer : Graphical Interface Application for Geomagnetic Data in Observatory Geomagnetic Lombok

Airfoil Boundary Layer Separation Prediction

ALGORITHMS AND INTERFACE FOR OCEAN ACOUSTIC RAY-TRACING (Developed in MATLAB)

IMAGE STEGANOGRAPHY USING DISCRETE COSINE TRNASFORM ALGORITHM

MEASURING INTERFACIAL TENSION WITH THE PENDANT DROP METHOD

Accepted by... John H. Lienhard V

TREBALL FINAL DE GRAU

Real-Time IIR Digital Filters

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

UNIVERSITÀ DEGLI STUDI DI PADOVA

Listing Progam. Universitas Sumatera Utara

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time.

Digital Image Processing. Today Outline. Matlab Desktop. Matlab Basics

GENDER ESTIMATION BASED ON FACIAL IMAGE AZLIN BT YAJID UNIVERSITI TEKNOLOGI MALAYSIA

Keywords: Learning automata, Vertex multicoloring.

Blind to Change. More on Graphical User Interfaces. Exploring change blindness

Design of Automated Digital Eye Palpation Exam for Intraocular Pressure Measurement

LAMPIRAN A: LISTING PROGRAM

Special Topics II: Graphical User Interfaces (GUIs)

LAMPIRAN A : LISTING PROGRAM

Lampiran 2 MASTER TABEL

LAMPIRAN A LISTING PROGRAM

MATLAB. Creating Graphical User Interfaces Version 7. The Language of Technical Computing

Chapter 6 User-Defined Functions. dr.dcd.h CS 101 /SJC 5th Edition 1

Error-Bar Charts from Summary Data

Sandia National Laboratories: Implementation of and Experimenting with a Clustering Tool

ČVUT v Praze in Prague. Introduction to MATLAB

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara

W1005 Intro to CS and Programming in MATLAB. Data Structures. Fall 2014 Instructor: Ilia Vovsha. hep://

SEBARAN MATAKULIAH PROGRAM STUDI SARJANA TEKNIK SIPIL (S1) DI JURUSAN TEKNIK SIPIL UNIVERSITAS LAMPUNG

belajar html5 158E7F2D743EA866244C3EE391F064DC Belajar Html5 1 / 6

Matlab for Engineers

Lampiran 6 HASIL STATISTIK

MATLAB for the Sciences

LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

Spring 2010 Instructor: Michele Merler.

Flow Control. Spring Flow Control Spring / 26

LAMPIRAN A : LISTING PROGRAM

COMS 3101 Programming Languages: MATLAB. Lecture 2

Scientific Functions Complex Numbers

MICROSOFT EXCEL. Membina Hamparan Elektronik Fungsi Hamparan Elektronik

Computational Methods of Scientific Programming

CS1114 Assignment 5, Part 1

1 Lab 3, Simulation of crank-piston system

CDA5530: Performance Models of Computers and Networks. Chapter 8: Using Matlab for Performance Analysis and Simulation

Interactive Programs

LISTING PROGRAM. void FilteringToolStripMenuItemClick(object sender, EventAr s e) { Filtering a = new Filtering(); this.hide(); a.

INTRODUCTION TO MATLAB INTERACTIVE GRAPHICS EXERCISES

Chapter 2 Fundamentals. Chapter 2 Fundamentals The images used here are provided by the authors.

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation

Pengenalan Sistem Maklumat Dalam Pendidikan

Tutorial Excel 2013 Gratis 2007 Bahasa Indonesia

Hybrid learning vector quantization (LVQ) algorithm on face recognition using webcam

CDA6530: Performance Models of Computers and Networks. Chapter 4: Using Matlab for Performance Analysis and Simulation

CHAPTER V IMPLEMENTATION AND TESTING

Flow Control and Functions

LAMPIRAN A PROGRAM FLOWSTONE

Lecture #3. MATLAB image processing (cont.) Histograms Mathematics of image processing Geometric transforms Image Warping.

INSTRUCTION: This section consists of FOUR (4) questions. Answer ALL questions. ARAHAN: Bahagian ini mengandungi EMPAT (4) soalan. Jawab SEMUA soalan.

Computer Aided Engineering Applications 5. Machine Vision

LAMPIRAN 1 PENGARUH KETERSEDIAAN KOLEKSI PERPUSTAKAAN TERHADAP MINAT BACA SISWA SMP NEGERI 30 MEDAN

DAFTAR ISI ABSTRAK... 1 KATA PENGANTAR...ERROR! BOOKMARK NOT DEFINED. UCAPAN TERIMAKASIH...ERROR! BOOKMARK NOT DEFINED. DAFTAR ISI...

DAFTAR ISI. ABSTRAK... Error! Bookmark not defined. ABSTRACT... Error! Bookmark not defined. KATA PENGANTAR... Error! Bookmark not defined.

1. (10 pts) Order the following three images by how much memory they occupy:

UNIVERSITI SAINS MALAYSIA. CST131 Computer Organisation [Organisasi Komputer]

Transcription:

A-1 LISTING PROGRAM 1. Form Cover function varargout = cover(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @cover_openingfcn,... 'gui_outputfcn', @cover_outputfcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1}); if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); gui_mainfcn(gui_state, varargin{:}); function cover_openingfcn(hobject, eventdata, handles, varargin) handles.output = hobject; guidata(hobject, handles); axes(handles.axes1); image(imread('fasilkomti','jpg')); grid off; axis off; function varargout = cover_outputfcn(hobject, eventdata, handles) varargout{1} = handles.output; function axes1_createfcn(hobject, eventdata, handles) function cover_callback(hobject, eventdata, handles) cover; function filtering_callback(hobject, eventdata, handles) close(cover); Filtering; function help_callback(hobject, eventdata, handles) close(cover) help; 2. Form Filtering function varargout = Filtering(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @Filtering_OpeningFcn,... 'gui_outputfcn', @Filtering_OutputFcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1});

A-2 if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); gui_mainfcn(gui_state, varargin{:});. function Filtering_OpeningFcn(hObject, eventdata, handles, varargin) guidata(hobject, handles); function varargout = Filtering_OutputFcn(hObject, eventdata, handles) varargout{1} = handles.output; function window_size_callback(hobject, eventdata, handles) function window_size_createfcn(hobject, eventdata, handles) function amf_btn_callback(hobject, eventdata, handles) global runtime; runtime = cputime; select = get( handles.window_size,'value'); switch select case 1 warndlg('masukkan pilihan yang benar!') case 2 Smax = 3; case 3 Smax = 5; case 4 Smax = 7; C = getimage(handles.citra_degradasi); f = C; f(:) = 0; hasilfilter = false(size(c)); for k = 3:2:Smax zmin = ordfilt2(c, 1, ones(k, k),'symmetric'); zmax = ordfilt2(c, k*k, ones(k, k), 'symmetric'); zmed = medfilt2(c, [k k],'symmetric'); proseslevelb = (zmed > zmin) & (zmax > zmed) &... ~hasilfilter; zb = (C > zmin) & (C < zmax); outputzxy = proseslevelb & zb; outputzmed = proseslevelb & ~zb; f(outputzxy) = C(outputZxy); f(outputzmed) = zmed(outputzmed); hasilfilter = hasilfilter proseslevelb; if all(hasilfilter(:)) break; f(~hasilfilter) = zmed(~hasilfilter); axes(handles.citra_filtering_amf); imshow(f); runtime = cputime -runtime;

A-3 citra = getimage(handles.citra_grayscale); citra_hasil = getimage(handles.citra_filtering_amf); [NilaiMSE NilaiPSNR] = msepsnr (citra,citra_hasil); set(handles.psnr3_txt,'string',nilaipsnr); set(handles.mse3_txt,'string',nilaimse); set(handles.rt3_txt,'string',runtime); msgbox('adaptive Median Filter Berhasil'); function pushbutton5_callback(hobject, eventdata, handles) [nama_file_simpan, path_simpan]=uiputfile(... {'*.jpg','file jpg (*.jpg)';},... 'Simpan Gambar'); simpan=getimage(handles.citra_filtering_amf); imwrite(simpan,fullfile(path_simpan,nama_file_simpan),'jpeg'); function atmf_btn_callback(hobject, eventdata, handles) global runtime; runtime = cputime; C = getimage(handles.citra_degradasi); C= im2double(c) * 255; select = get( handles.trimmed_size,'value'); switch select case 1 warndlg('masukkan pilihan yang benar!') case 2 d = 2; case 3 d = 4; case 4 d = 6; msub=3;nsub=3; [ro col] = size(c); citrafilter = zeros(ro, col); for i=2:ro-1; for j =2:col-1; maks = 0; mini = 0; jumlah = 0; for m=-1:1; for n =-1:1; pixel = C(i + m,j + n); jumlah = jumlah + pixel; if(pixel > maks) maks = pixel; if(pixel < mini) mini = pixel; if(m == -1 && n == -1) maks = C(i + m,j + n); mini = C(i + m,j + n); jumlah = jumlah - maks - mini;

A-4 hasil = jumlah / (msub*nsub - d); citrafilter(i,j) = hasil; citrafilter = uint8(citrafilter); axes(handles.citra_filtering_atmf); imshow(citrafilter); runtime = cputime-runtime; citra = getimage(handles.citra_grayscale); citra_hasil = getimage(handles.citra_filtering_atmf); [NilaiMSE NilaiPSNR] = msepsnr (citra,citra_hasil); set(handles.psnr2_txt,'string',nilaipsnr); set(handles.mse2_txt,'string',nilaimse); set(handles.rt2_txt,'string',runtime); msgbox('alpa-trimmed Mean Filter Berhasil'); function pushbutton3_callback(hobject, eventdata, handles) [nama_file_simpan, path_simpan]=uiputfile(... {'*.jpg','file jpg (*.jpg)';},... 'Simpan Gambar'); simpan=getimage(handles.citra_filtering_atmf); imwrite(simpan,fullfile(path_simpan,nama_file_simpan),'jpeg'); function trimmed_size_callback(hobject, eventdata, handles) function trimmed_size_createfcn(hobject, eventdata, handles) function noise_txt_callback(hobject, eventdata, handles) function noise_txt_createfcn(hobject, eventdata, handles) function generate_noise_callback(hobject, eventdata, handles) function noise_type_callback(hobject, eventdata, handles) global runtime; runtime = cputime; contents = get(hobject,'value'); add_noise=str2double(get(handles.noise_txt,'string')); switch contents case 1 warndlg('masukkan pilihan yang benar!'); case 2 %SaltandPepper if(add_noise>=1 && add_noise<=100) A=getimage(handles.citra_grayscale); add_noise=add_noise/100; [m, n] = size(a); G = double(a); for i=1 : m

A-5 for j=1 : n nilai_acak = rand; if nilai_acak <= add_noise / 2 G(i,j) = 0; if (nilai_acak > add_noise / 2) && (nilai_acak <= add_noise) G(i,j) = 255; axes(handles.citra_degradasi); G = uint8(g); imshow(g); warndlg('nilai inputan salah. Periksa kembali nilai inputan anda.') case 3 %Speckle if(add_noise>=1 && add_noise<=100) A=getimage(handles.citra_grayscale); add_noise=add_noise/100; A=im2double(A); G=A+sqrt(12*add_noise)*A.*(rand(size(A))-.5); axes(handles.citra_degradasi); imshow(g); warndlg('nilai inputan salah. Periksa kembali nilai inputan anda.') case 4 %Uniform if(add_noise>= 1 && add_noise<= 100 ) a = add_noise/5; A = getimage(handles.citra_grayscale); [m n]=size(a); A = double(a); G = zeros(m,n); for i=1:m for j=1:n noise=a+(add_noise-a)*rand; G(i,j)=round(A(i,j)+noise); if G(i,j)>255 G(i,j)=255; if G(i,j)<0 G(i,j)=0; G = uint8(g); axes(handles.citra_degradasi); imshow(g); warndlg('nilai inputan salah. Periksa kembali nilai inputan anda.') runtime = cputime -runtime; citra = getimage(handles.citra_grayscale); citra_hasil = getimage(handles.citra_degradasi);

A-6 [NilaiMSE NilaiPSNR] = msepsnr (citra,citra_hasil); set(handles.psnr1_txt,'string',nilaipsnr); set(handles.mse1_txt,'string',nilaimse); set(handles.rt1_txt,'string',runtime); function noise_type_createfcn(hobject, eventdata, handles) function cover_callback(hobject, eventdata, handles) close(filtering); cover; function filtering_callback(hobject, eventdata, handles) function help_callback(hobject, eventdata, handles) close(filtering); help; function browse_callback(hobject, eventdata, handles) [nama_file,nama_path] = uigetfile({'*.jpg','file jpeg (*.jpg)'},'browse'); if ~isequal(nama_file,0) handles.citra=imread(fullfile(nama_path,nama_file)); guidata(hobject,handles); axes(handles.citra_asli); imshow(handles.citra); return; ; set(handles.file_name,'string',nama_file); set(handles.image_width,'string',size(handles.citra,1)); set(handles.image_height,'string',size(handles.citra,2)); A = getimage(handles.citra_asli); AA = A; R = AA(:,:,1); G = AA(:,:,2); B = AA(:,:,3); grayscale = 0.3*R+0.5*G+0.2*B; axes(handles.citra_grayscale); imshow(grayscale); function reset_callback(hobject, eventdata, handles) axes(handles.citra_asli); axes(handles.citra_grayscale); axes(handles.citra_degradasi); axes(handles.citra_filtering_atmf); axes(handles.citra_filtering_amf); set(handles.file_name,'string',''); set(handles.image_width,'string','');

A-7 set(handles.image_height,'string',''); set(handles.noise_txt,'string',''); set(handles.psnr1_txt,'string',''); set(handles.mse1_txt,'string',''); set(handles.rt1_txt,'string',''); set(handles.psnr2_txt,'string',''); set(handles.mse2_txt,'string',''); set(handles.rt2_txt,'string',''); set(handles.psnr3_txt,'string',''); set(handles.mse3_txt,'string',''); set(handles.rt3_txt,'string',''); function edit2_callback(hobject, eventdata, handles). function edit2_createfcn(hobject, eventdata, handles) function pushbutton9_callback(hobject, eventdata, handles) [nama_file_simpan, path_simpan]=uiputfile(... {'*.jpg','file jpg (*.jpg)';},... 'Simpan Gambar'); simpan=getimage(handles.citra_degradasi); imwrite(simpan,fullfile(path_simpan,nama_file_simpan),'jpeg'); 3. Form Help function varargout = help(varargin) gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @help_openingfcn,... 'gui_outputfcn', @help_outputfcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1}); if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); gui_mainfcn(gui_state, varargin{:}); function help_openingfcn(hobject, eventdata, handles, varargin) handles.output = hobject; guidata(hobject, handles); function varargout = help_outputfcn(hobject, eventdata, handles) varargout{1} = handles.output; function axes6_createfcn(hobject, eventdata, handles) function axes1_createfcn(hobject, eventdata, handles)

A-8 function cover_callback(hobject, eventdata, handles) close(help); cover; function filtering_callback(hobject, eventdata, handles) close(help); filtering; function help_callback(hobject, eventdata, handles) help; function ATMF_Callback(hObject, eventdata, handles) close(help); ATMF; function AMF_Callback(hObject, eventdata, handles) close(help); AMF; function listbox1_callback(hobject, eventdata, handles) function listbox1_createfcn(hobject, eventdata, handles) function listbox2_callback(hobject, eventdata, handles). function listbox2_createfcn(hobject, eventdata, handles) 4. msepsnr.m function [NilaiMSE NilaiPSNR] = msepsnr(citra,citra_hasil) mse = (double(citra) - double(citra_hasil)).^ 2; [b, k] = size(citra_hasil); NilaiMSE = sum(mse(:)) / (b*k); NilaiPSNR = 20 * log10( 255^2 / NilaiMSE);

B-1 CURRICULUM VITAE Nama Alamat Sekarang Alamat Orang Tua : Sunfirst Lady Jeanfera Nababan : Jln. Bahagia By Pass No.20 Medan : Jln. Raden Wijaya Lorong Kopi II No.305 Jambi Telp/HP : 082379070730 Email : sunfirstlady@gmail.com Riwayat Pidikan: 1998 2000 Sekolah Dasar (SD) St. Antonius Medan 2000 2004 Sekolah Dasar (SD) Xaverius 2 Jambi 2004 2007 Sekolah Menengah Pertama (SMP) Xaverius 1 Jambi 2007 2010 Sekolah Menengah Atas (SMA) Xaverius 2 Jambi Keahlian Bahasa : Indonesia, Inggris Bahasa Pemrograman : Matlab, Adobe Flash Database Design : MySQL, Microsoft Access : Corel Draw