1 of 38

PERTEMUAN KE 4 – METODE KONVOLUSI DAN FILTERING CITRA

PENGOLAHAN CITRA

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

2 of 38

R

P

S

METODE KONVOLUSI

01

FILTERING CITRA

02

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

3 of 38

METODE KONVOLUSI

01

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

4 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Metode konvolusi adalah metode untuk menggabungkan nilai dua buah citra untuk menghasilkan nilai baru.

Pada metode konvolusi terdapat dua istilah yaitu �citra asli dan �citra kernel atau masking atau filter.

Citra kernel adalah citra dengan ukuran yang lebih kecil yang mendefinisikan operasi pada citra tersebut. �Ukuran citra yang umum dipakai adalah 2x2, 3x3, dan 5x5.

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

5 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Metode konvolusi tidak mengubah ukuran citra, akan tetapi hanya mengubah nilai tiap pixel citra.

Nilai baru ini dipengaruhi oleh nilai pada citra asli dan citra kernel.

Langkah-langkah pada metode konvolusi adalah sebagai berikut :

  • Tentukan citra asli dan citra kernel dalam bentuk matriks/array.
  • Tempatkan citra kernal pada citra asli, dimulai dari bagian kiri atas.
  • Kalikan nilai pada citra asli dan nilai pada kernal, pixel per pixel.
  • Jumlahkan hasil perkalian pada poin c. Beberapa model konvolusi perlu dibagi.
  • Ganti nilai pixel pada citra asli dengan nilai baru hasil konvolusi.
  • Geser kernel satu kotak dan lakukan langkah dari poin c hingga e. Ulangi hingga mencapai pixel terakhir.

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

6 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Berikut akan dijelaskan langkah per langkahnya dengan menggunakan citra berikut :

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

7 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Tempatkan kernel ke citra asli dimulai dari bagian kiri atas.

Setelah itu, kalikan semua nilai yang saling bertumpukan, dimulai dari index ke [0,0].

Selanjutnya, jumlahkan semua nilai hasil perkalian.

Ganti nilai lama dengan nilai baru

LANGKAH 1

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

8 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

9 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

geser kernel ke pixel berikutnya

dan hitung kembali.

Pada pixel kali ini nilai akhir yang didapatkan adalah 0. Maka, nilai yang sebelumnya 5 berubah menjadi 0.

LANGKAH 2

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

10 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

11 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Setelah sampai di ujung kanan,

selanjutnya geser kernel ke bawah.

Dimulai dari kiri lagi dan hitung kembali.

LANGKAH 3

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

12 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

13 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Lakukan langkah yang sama hingga semua kernel masking tidak bisa bergeser lagi

LANGKAH 4

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

14 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

15 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Pada hasil di atas terlihat bahwa terdapat pixel yang tidak bisa dihitung nilai konvolusinya, karena nilainya tidak lengkap, yaitu pada tepi-tepi citra.

LANGKAH 5

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

16 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

17 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

Pada kasus seperti ini, Rinaldi Munir (2014) menawarkan beberapa pendekatan yang bisa dilakukan, antara lain adalah :

  • Piksel-piksel pinggir diabaikan, tidak dikonvolusi. Sehingga nilai piksel pinggir sama dengan nilai pada citra semula.
  • Duplikasi elemen citra. Misalnya elemen kolom pertama disalin ke kolom M+, dan seterusnya.
  • elemen bertanda “?” diasumsikan bernilai 0 atau konstanta lain, sehingga konvolusi pada tepi citra dapat dilakukan.

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

18 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

METODE KONVOLUSI

jika menggunakan solusi (a),

maka citra hasil konvolusi adalah sebagai berikut

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

19 of 38

FILTERING CITRA

02

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

20 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA

Pada pengolahan citra, penerapan metode konvolusi sangatlah luas, salah satunya adalah untuk proses filtering citra.

Berikut ini adalah contoh-contoh penerapan metode konvolusi pada citra yang umum digunakan :�SMOOTHING/NOISE REMOVAL

SHARPENING

EMBOSS

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

21 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SMOOTHING

Smoothing atau kadang-kadang disebut bluring adalah metode pengolahan citra untuk memperhalus citra.

Metode ini biasanya digunakan mengurangi noise atau persiapan pre-processing dengan fokus pada obyek yang tajam dan menghilangkan obyek halus.

Beberapa metode bluring Adalah :

MEAN FILTERING

GAUSSIAN

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

22 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SMOOTHING

MEAN FILTERING�Metode pertama yang relatif mudah dilakukan adalah mean filter.

Nilai baru pada metode ini adalah untuk mencari rata-rata dari window.

Kernal yang digunakan biasanya adalah kernel 3x3.

Jika menggunakan 1, harus dibagi 9

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

23 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SMOOTHING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

24 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SMOOTHING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

25 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SMOOTHING

GAUSSIAN�Metode Gaussian adalah teknik penyaringan citra menggunakan kernel Gaussian. Kernal gaussian yaitu kernal yang nilainya mengikuti bentuk distribusi normal (kurva lonceng), dimana nilai bagian tengah lebih besar dibanding bagian tepinya.

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

26 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SMOOTHING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

27 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SMOOTHING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

28 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

Kebalikan dari filter blurring, adalah sharpening. Filter ini akan mempertajam pixel pada citra, sehingga jelas perbedaan antar pixel. Proses konvolusinya sama saja dengan filter pada blurring. Hanya saja kernel yang digunakan yang berbeda.

Beberapa metode bluring Adalah :

MEAN REMOVAL

LAPLACIAN

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

29 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

MEAN REMOVAL�Metode sharpening yang umum digunakan adalah mean removal. Cara kerja mean removal adalah dengan mempertajam pixel pusat dan mengurangi kontribusi pixel tetangganya. Sehingga tepi obyek akan menjadi leih kontras.

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

30 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

31 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

32 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

LAPLACIAN�Konsep metode Laplacian adalah menggunakan second derivative (turunan kedua) dari intensitas cahaya. Dimana fungsi f(x,y) akan menjadi f’’(x,y)≈[f(x+1,y)+f(x−1,y) −4f(x,y)+f(x,y+1)+f(x,y−1)]. Fungsi ini jikga diterjemahkan ke dalam kernel akan menjadi sebagai berikut.

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

33 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

34 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

35 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - EMBOSS

Emboss adalah operasi konvolusi pada citra menggunakan kernel khusus untuk menonjolkan perbedaan intensitas (tepi), sehingga memberikan kesan 3D atau timbul pada hasil akhir.

Efek emboss biasanya:

  • Menonjolkan kontur (tepi objek)
  • Mengubah warna dasar menjadi keabuan (abu-abu)
  • Membuat bagian terang seolah “naik” dan bagian gelap seolah “masuk ke dalam”

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

36 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - SHARPENING

Kernel Emboss

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

37 of 38

  • Input the text content you want according to the content you need, and input the text and other information.Input the text content you want according to the content you need, and input the text and other information.

  • Input the text content you want according to the content you need, and input the text and other information.

20NN

FILTERING CITRA - EMBOSS

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

38 of 38

Tim Penyusun:

1.

2.

3

TERIMA

KASIH

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA

PROGRAM STUDI INFORMATIKA

UNIVERSITAS GUNADARMA