PEMBANGUNAN SISTEM CONTENT-BASED IMAGE RETRIEVAL MENGGUNAKAN KODE FRAKTAL DARI DOKUMEN CITRA
TESIS Karya tulis sebagai salah satu syarat untuk memperoleh gelar Magister dari Institut Teknologi Bandung
Oleh
ARIF RAHMAN NIM : 23505014
Program Studi Magister Informatika
SEKOLAH TEKNIK ELEKTRO DAN INFORMATIKA INSTITUT TEKNOLOGI BANDUNG 2007
ABSTRAK PEMBANGUNAN SISTEM CONTENT-BASED IMAGE RETRIEVAL MENGGUNAKAN KODE FRAKTAL DARI DOKUMEN CITRA Oleh
Arif Rahman NIM : 23505014 Sistem Content-Based Image Retrieval (CBIR) melakukan pencarian berdasarkan kemiripan muatan visual yang dimiliki citra. Muatan visual yang digunakan antara lain distribusi warna, tekstur atau bentuk. Koleksi dokumen yang terlibat dalam CBIR memiliki jumlah yang besar, sehingga untuk efisiensi pencarian perlu dibangun indeks dari ciri yang mewakili muatan visual. Salah satu metode indeks yang umum digunakan dalam CBIR adalah indeks multidimensi menggunakan struktur pohon. Dalam penelitian ini dikemukakan sistem CBIR menggunakan kode fraktal dari dokumen citra yang dinamakan SPECKTRAL. Analisis dan perancangan SPECKTRAL menggunakan metode Unified Process dan diimplementasikan dalam lingkungan berbasis web menggunakan Java Servlet. Kode fraktal adalah kode yang dihasilkan dari proses pengkodean citra dalam FIC (Fractal Image Compression). Ciri utama FIC adalah pencarian kesamaan-diri (self-similarity) antar bagian dalam citra berdasarkan nilai intensitas piksel. Dari ciri utama tersebut dapat diasumsikan bahwa kemiripan kode fraktal mewakili kemiripan pola variasi intensitas piksel yang secara visual mewakili tekstur citra. Pengukuran kemiripan kode fraktal menggunakan rata-rata selisih minimum jarak Euclidean dari tiap koefisien kekontrasan dan kecerahan dalam kode fraktal. Struktur indeks yang digunakan adalah Inverted File yang berisi kode fraktal dan pointer ke dokumen dimana kode tersebut muncul. Inverted File digunakan karena memiliki kompleksitas komputasi yang lebih rendah dibandingkan dengan indeks multidimensi. Hasil penelitian menunjukkan bahwa kemiripan kode fraktal antara dua citra dapat mewakili kemiripan tekstur yang dimiliki citra. Ini dapat dilihat dari hasil pengujian query terhadap koleksi citra Brodatz dan Vistex dimana rata-rata 64,61% dari jumlah keseluruhan citra yang teksturnya mirip berada di ranking teratas. kata kunci : content based, image retrieval, kode fraktal.
i
ABSTRACT CONTENT-BASED IMAGE RETRIEVAL SYSTEM DEVELOPMENT USING FRACTAL CODE OF IMAGE DOCUMENT Arif Rahman NIM : 23505014 Content-Based Image Retrieval (CBIR) system finds images based on similarity of their visual content, i.e color, texture or shape. CBIR involve collection of documents with huge number, that is for retrieval efficiency, index of visual content features should be built. A common indexing method in CBIR is multidimensional –index using tree structure. A CBIR system using fractal codes of image document, called SPECKTRAL is proposed in this research. SPECKTRAL is analyzed and designed using Unified Process method and implemented in web-based environment using Java Servlet. Fractal code is code from image encoding process in FIC (Fractal Image Compression). Main characteristic of FIC is self-similarity searching between image parts based on value of pixels intensity. From that characteristic, can be assumed that similarity of fractal code represents similarity of pixels intensity variance pattern which visually represents the image texture. Similarity of fractal code measured with average of minimum Euclidean distance difference between contrast and brightness coefficients in fractal code. Index structure that used in this system is Inverted File which consists of fractal codes and pointers to document which that codes appear. An Inverted File is used because it has lower computation complexity than multidimensional index. The experiment result shows that similarity of fractal code between two images represents similarity of their textures. These could see from the query testing result toward Brodatz and Vistex image collection which is in average, 64,61% from all the image with similar texture rank on the top. keywords : content based, image retrieval, fractal code.
ii
PENGESAHAN PEMBANGUNAN SISTEM CONTENT-BASED IMAGE RETRIEVAL MENGGUNAKAN KODE FRAKTAL DARI DOKUMEN CITRA Oleh ARIF RAHMAN NIM : 23505014
Program Studi Magister Informatika Sekolah Teknik Elektro Dan Informatika Institut Teknologi Bandung
Menyetujui, Pembimbing Tanggal ………………………..
___________________________ (Ir. Dwi Hendratmo, M.Sc. Ph.D)
iii
PEDOMAN PENGGUNAAN TESIS Tesis S2 yang tidak dipublikasikan terdaftar dan tersedia di Perpustakaan Institut Teknologi Bandung, dan terbuka untuk umum dengan ketentuan bahwa hak cipta ada pada pengarang dengan mengikuti aturan HaKI yang berlaku di Institut Teknologi Bandung. Referensi kepustakaan
diperkenankan dicatat, tetapi
pengutipan atau peringkasan hanya dapat dilakukan seizin pengarang dan harus disertai dengan kebiasaan ilmiah untuk menyebutkan sumbernya. Memperbanyak atau menerbitkan sebagian atau seluruh tesis haruslah seizin Direktur Program Pascasarjana, Institut Teknologi Bandung.
I.
iv
PERSEMBAHAN
Tulisan ini kepersembahakan untuk Bapak, Ibu dan Kakak-kakak tercinta atas kasih sayang, bimbingan dan perhatiannya
v
UCAPAN TERIMA KASIH
vi
DAFTAR ISI DAFTAR ISI................................................................................................................... vii DAFTAR GAMBAR........................................................................................................ ix DAFTAR TABEL ............................................................................................................. x DAFTAR TABEL ............................................................................................................. x ABSTRAK .......................................................................................................................... i ABSTRACT....................................................................................................................... ii Bab I
Pendahuluan ........................................................................................................ 1
I.1
Latar Belakang ....................................................................................................... 1
I.2
Rumusan Masalah.................................................................................................. 2
I.3
Tujuan .................................................................................................................... 3
I.4
Ruang Lingkup Tesis ............................................................................................. 3
I.5
Batasan Masalah .................................................................................................... 3
I.6
Metode Penelitian .................................................................................................. 3
I.7
Sistematika Penulisan ............................................................................................ 4
Bab II
Landasan Teori .................................................................................................. 6
II.1
Sistem Content-Based Image Retrieval ............................................................. 6
II.2
Muatan Visual ................................................................................................... 7
II.2.1
Warna............................................................................................................ 7
II.2.2
Teksture ......................................................................................................... 9
II.2.3
Bentuk.......................................................................................................... 10
II.3
Pengukuran Kemiripan Citra ........................................................................... 11
II.4
Pembangunan Indeks....................................................................................... 11
II.5
Evaluasi Kinerja Retrieval............................................................................... 12
II.6
Implementasi Sistem CBIR ............................................................................. 13
II.7
Pengkodean Citra dengan Algoritma Fraktal .................................................. 13
II.7.1
Partitioned Iterated Function System ......................................................... 14
II.7.2
Metode Pengkodean Citra........................................................................... 16
II.8
Kode Fraktal .................................................................................................... 18
II.9
CBIR dengan Kode Fraktal ............................................................................. 19
vii
Bab III Analisis Sistem ................................................................................................. 21 III.1
Deskripsi Umum Sistem.................................................................................. 21
III.2
Pembentukan Kode Fraktal ............................................................................. 21
III.3
Proses Retrieval ............................................................................................... 22
III.4
Pengukuran Kemiripan Citra ........................................................................... 24
III.5
Pembangunan Indeks....................................................................................... 24
III.6
Metode Pengembangan Perangkat Lunak SPECKTRAL................................ 25
III.7
Model Use-Case .............................................................................................. 26
III.8
Pemodelan Kelas Tahap Analisis .................................................................... 28
Bab IV Perancangan Sistem ........................................................................................ 31 IV.1
Perancangan Arsitektur Sistem........................................................................ 31
IV.2
Perancangan Kelas........................................................................................... 32
IV.3
Perancangan Data ............................................................................................ 35
IV.4
Perancangan Antarmuka.................................................................................. 37
Bab V Implementasi dan Pengujian............................................................................ 44 V.1
Implementasi Sistem ....................................................................................... 44
V.1.1
Lingkungan Implementasi ........................................................................... 44
V.1.2
Implementasi Paket dan Kelas .................................................................... 45
V.1.3
Implementasi Antarmuka ............................................................................ 45
V.2
Pengujian Sistem ............................................................................................. 50
V.2.1
Prosedur Pengujian .................................................................................... 50
V.2.2
Hasil Pengujian........................................................................................... 52
Bab VI Kesimpulan dan Saran .................................................................................... 57 VI.1
Kesimpulan...................................................................................................... 57
VI.2
Saran ................................................................................................................ 57
Daftar Pustaka ................................................................................................................ 58 LAMPIRAN A................................................................................................................ 60 LAMPIRAN B................................................................................................................ 62 LAMPIRAN C................................................................................................................ 65
viii
DAFTAR GAMBAR GAMBAR II.1.
DIAGRAM CONTENT-BASED IMAGE RETRIEVAL ...............................6
GAMBAR II.2.
HISTOGRAM WARNA..................................................................................8
GAMBAR II.3.
PEMBENTUKAN GCLM.............................................................................10
GAMBAR II.4.
TRANSFORMASI DOMAIN KE RANGE YANG SESUAI .......................15
GAMBAR II.5.
HIMPUNAN DOMAIN DAN PARTISI RANGE.........................................18
GAMBAR II. 6.
KUANTISASI NILAI....................................................................................19
GAMBAR III.1.
FORMAT KODE FRAKTAL .......................................................................22
GAMBAR III.4.
PROSES PENAMBAHAN KOLEKSI CITRA.............................................23
GAMBAR III.5.
INVERTED FILE UNTUK KODE FRAKTAL.............................................25
GAMBAR III.6.
DIAGRAM USE CASE .................................................................................27
GAMBAR III.7.
DIAGRAM INTERAKSI ANTAR KELAS PADA TAHAP ANALISIS ....30
GAMBAR IV.1.
DIAGRAM ARSITEKTUR SPECKTRAL...................................................31
GAMBAR IV.2.
DIAGRAM KELAS ......................................................................................33
GAMBAR IV.3.
SEQUENCE DIAGRAM UNTUK USE CASE BROWSE CITRA................35
GAMBAR IV.5.
RANCANGAN ANTARMUKA LOGINPAGE ............................................39
GAMBAR IV-6
RANCANGAN ANTARMUKA INSERTCATEGORYPAGE .......................40
GAMBAR IV.7.
RANCANGAN ANTARMUKA EDITCATEGORYPAGE ............................40
GAMBAR IV.8.
RANCANGAN ANTARMUKA INSERTDOCPAGE ...................................41
GAMBAR IV.9.
RANCANGAN ANTARMUKA EDITDOCPAGE........................................42
GAMBAR IV.10. RANCANGAN ANTARMUKA DELETEDOCPAGE ..................................42 GAMBAR V.1.
IMPLEMENTASI ANTARMUKA SEARCHPAGE .....................................46
GAMBAR V.2.
IMPLEMENTASI ANTARMUKA LOGINPAGE ........................................46
GAMBAR V.3.
IMPLEMENTASI ANTARMUKA INSERTCATEGORYPAGE ...................47
GAMBAR V.4.
IMPLEMENTASI ANTARMUKA EDITCATEGORYPAGE .......................47
GAMBAR V.5.
IMPLEMENTASI ANTARMUKA INSERTDOCPAGE...............................48
GAMBAR V.6.
IMPLEMENTASI ANTARMUKA EDITDOCPAGE ...................................49
GAMBAR V.7.
IMPLEMENTASI ANTARMUKA DELETEDOCPAGE .............................49
GAMBAR V.9.
HASIL QUERY KOLEKSI CITRA BRODATZ...........................................52
GAMBAR V.10.
HASIL QUERY KOLEKSI CITRA VISTEX-FLAT ....................................55
GAMBAR V.11.
HASIL QUERY KOLEKSI CITRA VISTEX-SCENE .................................54
ix
DAFTAR TABEL
TABEL II.1. IKHTISAR PENELITIAN TERKAIT ...................................................................20 TABEL III.1. AKTOR SISTEM SPECKTRAL ............................................................................27 TABEL III.2. USE CASE SISTEM SPECKTRAL........................................................................28 TABEL III.3. HASIL IDENTIFIKASI PAKET ...........................................................................29 TABEL III.4. HASIL IDENTIFIKASI KELAS ...........................................................................29 TABEL IV.1. DESKRIPSI DATA KELAS CATEGORY ...........................................................35 TABEL IV.2. DESKRIPSI DATA KELAS DOCUMENT ..........................................................36 TABEL IV.4 . DESKRIPSI KELAS INVERTEDINDEX.............................................................36 TABEL IV.5 . DESKRIPSI KELAS ADMIN ...............................................................................37 TABEL IV.6. ANTARMUKA PENGGUNA ...............................................................................38 TABEL V.1. IMPLEMENTASI PAKET DAN KELAS.............................................................45
x