PENGOLAHAN CITRA DIGITAL Operasi Aritmatik dan Geometri pada
- Slides: 60
PENGOLAHAN CITRA DIGITAL : Operasi Aritmatik dan Geometri pada Citra MULAAB TEKNIK INFORMATIKA FAKULTAS TEKNIK UNIVERSITAS TRUNOJOYO
PEMBENTUKAN CITRA Kontinu dihasilkan dari sistem optik yang menerima sinyal analog, contoh : mata manusia Citra Diskrit (Citra Digital) dihasilkan melalui proses digitalisasi terhadap citra kontinu 27/09/2021 PERTEMUAN KE-2 2
PEMBENTUKAN CITRA Citra Fungsi kontinu dari intensitas cahaya pada bidang dua dimensi. Sumber Cahaya i(x, y) Permukaan normal f(x, y) 27/09/2021 PERTEMUAN KE-2 3
PEMBENTUKAN CITRA (x, y) koordinat pada bidang dua dimensi f(x, y) intensitas cahaya (brightness) pada titik (x, y) i(x, y) Jumlah cahaya yang berasal dari sumbernya (illumination) r(x, y) Derajat kemampuan obyek memantulkan cahaya (Reflection). f(x, y) = i(x, y). r(x, y) 27/09/2021 PERTEMUAN KE-2 4
DIGITALISASI CITRA Digitalisasi Representasi citra dari fungsi kontinu menjadi nilai – nilai diskrit. Ukuran dimensi citra digital dinyatakan sebagai : tinggi x lebar atau N x M dan memiliki derajat keabuan L 27/09/2021 PERTEMUAN KE-2 5
DIGITALISASI CITRA Proses Digitalisasi ada 2 macam : Penerokan (sampling) digitalisasi spasial (x, y) Kuantisasi digitalisasi intensitas f(x, y) Column of samples Pixel Black 255 Gray 128 White 0 Line Spacing Picture 27/09/2021 Sample Spacing Sampling process Spatial resolution PERTEMUAN KE-2 Brightness Spacing Proses Kwantisasi Brightness Resolution 6
DIGITALISASI CITRA - PENEROKAN Elemen Gambar Elemen Matriks 0 Dy y M-1 0 i Dx Dy M Pixel N Pixel (0, 0) x Dx N-1 j Hubungan antara elemen gambar dan elemen matriks 27/09/2021 PERTEMUAN KE-2 7
DIGITALISASI CITRA-KUANTISASI Kuantisasi membagi skala keabuan (0, L) menjadi G level G= Skala Keabuan 27/09/2021 G = derajat keabuan m = bilangan bulat positif 2 m Rentang Nilai Keabuan Pixel Depth 21 0, 1 1 bit 22 0 sampai 7 2 bit 23 0 sampai 15 3 bit 28 0 sampai 255 8 bit PERTEMUAN KE-2 8
ELEMEN-ELEMEN CITRA DIGITAL 1. Kecerahan (brightness) 2. Kontras (contrast) 3. Kontur (contour) 4. Warna (color) 5. Bentuk (shape) 6. Tekstur (texture) 27/09/2021 PERTEMUAN KE-2 9
FORMAT BERKAS BITMAP (BMP) Bitmap Pemetaan Bit. Nilai intensitas pixel di dalam citra dipetakan ke sejumlah bit tertentu. Warna dalam citra bitmap kombinasi dari 3 warna : Red (R) , Green (G) , Blue (B). Citra dalam BMP ada 3 : 1. Citra biner nilai keabuannya hanya 0 dan 1 2. Citra greyscale nilai keabuannya 8 -bit 3. Citra berwarna nilai keabuannya 24 -bit 27/09/2021 PERTEMUAN KE-2 10
HUBUNGAN ANTARA PIKSEL 4 -tetangga piksel P X X 8 -tetangga piksel P X X X X Connectivity/Konektivitas: 4 -tetangga atau 8 -tetangga dengan kriteria gray level yang sama, misal: sama-sama 0 atau sama 1 atau sama-sama bedanya tidak lebih dari 5 tingkat keabuan, dlsb. nya 27/09/2021 PERTEMUAN KE-2 11
LABELLING OF CONNECTED COMPONENT Dengan kriteria piksel sama-sama bernilai 1: (a) dengan aturan 4 tetangga dan (b) dengan aturan 8 tetangga: 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 ekivalen dengan 27/09/2021 PERTEMUAN KE-2 12
OPERASI ARITMATIK v v v 27/09/2021 + - x / Band ratio antara citra sensor optik Landsat TM band 3 dan band 4 dapat digunakan untuk analisis vegetasi, begitu juga ratio antara selisih dan jumlahnya. Operasi selisih antara dua citra temporal dapat digunakan untuk deteksi perubahan wilayah. PERTEMUAN KE-2 13
Operasi jumlah matrik n The add filter takes two images (source and overlay images) of the same size and pixel format and produces an image, where each pixel equals to the sum value of corresponding pixels from provided images (if sum is greater than maximum allowed value, 255 or 65535, then it is truncated to that maximum
n n n n X = ([ 255 0 75; 44 225 100]); Y = ([ 50 50 50; 50 50 50 ]); Z = X+Y Z= 255 50 125 94 255 150
Pengurangan matrik n The subtract filter takes two images (source and overlay images) of the same size and pixel format and produces an image, where each pixel equals to the difference value of corresponding pixels from provided images (if difference is less than minimum allowed value, 0, then it is truncated to that minimum value
Pembagian n n n n Hasil pembagiannya dibulatkan X = ([ 255 10 75; 44 225 100]); Y = ([ 50 20 50; 50 50 50 ]); Z = X/Y Z= 5 1 2 1 5 2
Perkalian n Hasil perkalinnya dibulatkan
OPERASI ARITMATIK n Operasi selisih antara dua citra temporal dapat digunakan untuk deteksi perubahan wilayah. Jakarta in 1994 27/09/2021 Jakarta in 1998 PERTEMUAN KE-2 19
Complement Image n n n X = uint 8([ 255 10 75; 44 225 100]); X 2 = imcomplement(X) X 2 = 0 245 180 211 30 155
OPERASI GEOMETRI Memodifikasi koordinat piksel dalam suatu citra dengan kemungkinan mengubah nilai skala keabuan dari titik dengan pendekatan tertentu. Transformasi Spasial memetakan koordinat titik – titik citra asal ke koordinat titik – titik di citra hasil. 27/09/2021 PERTEMUAN KE-2 21
APLIKASI OPERASI GEOMETRI n n 27/09/2021 Pencerminan (flipping) Rotasi / pemutaran (rotating) Penskalaan (scaling / zooming) Pembekokan (warping) PERTEMUAN KE-2 22
Image Interpolation n Introduction ¡ ¡ n Interpolation Techniques ¡ n Apa itu interpolasi? Mengapa kita butuh interpolasi? 1 D zero-order, first-order, third-order Interpolation Applications ¡ ¡ ¡ Digital zooming (perbaikan resolution Image inpainting (error concealment) Transformasi geometri EE 465: Introduction to Digital Image Processing 23
Introduction (Con’t) n Mengapa butuh interpolasi? ¡ Ingin citra yang besar n ¡ Kita ingin gambar yang baik n ¡ Contoh, ingin tampilan full screen Perbaikan citra karena ada error pada proses transmisi Kita ingin COOL images n Manipulasi citra yang artistik EE 465: Introduction to Digital Image Processing 24
Scenario I: perbaikan Citra Low-Res. High-Res. EE 465: Introduction to Digital Image Processing 25
Penskalaan 27/09/2021 PERTEMUAN KE-2 26
Scenario II: Image Inpainting Non-damaged Damaged EE 465: Introduction to Digital Image Processing 27
Scenario III: Image Warping EE 465: Introduction to Digital Image Processing 28
• Interpolation Techniques EE 465: Introduction to Digital Image Processing 29
1 D Zero-order (Replication) f(n) n f(x) x EE 465: Introduction to Digital Image Processing 30
1 D First-order Interpolation (Linear) f(n) n f(x) x EE 465: Introduction to Digital Image Processing 31
Linear Interpolation Formula Basic idea: the closer to a pixel, the higher weight is assigned f(n) f(n+a) a f(n+1) 1 -a f(n+a)=(1 -a) f(n)+a f(n+1), 0<a<1 Note: when a=0. 5, we simply have the average of two EE 465: Introduction to Digital Image Processing 32
Numerical Examples f(n)=[0, 120, 180, 120, 0] Interpolate at 1/2 -pixel f(x)=[0, 60, 120, 150, 180, 150, 120, 60, 0], x=n/2 Interpolate at 1/3 -pixel f(x)=[0, 20, 40, 60, 80, 100, 120, 130, 140, 150, 160, 170, 180, …], x=n/6 EE 465: Introduction to Digital Image Processing 33
1 D Third-order Interpolation (Cubic) f(n) n f(x) x Cubic spline fitting EE 465: Introduction to Digital Image Processing 34
Graphical Interpretation of Interpolation row column f(m, n) g(m, n) EE 465: Introduction to Digital Image Processing 35
Numerical Examples zero-order a a b b c c d d a b c d first-order a (a+c)/2 c (a+b)/2 (a+b+c+d)/4 (c+d)/2 EE 465: Introduction to Digital Image Processing b (b+d)/2 d 36
Numerical Examples (Con’t) Col n+1 Col n X(m, n) row m a X(m, n+1) b Y 1 -a 1 -b row m+1 X(m+1, n) X(m+1, n+1) Q: what is the interpolated value at Y? Ans. : (1 -a)(1 -b)X(m, n)+(1 -a)b. X(m+1, n) +a(1 -b)X(m, n+1)+ab. X(m+1, n+1) EE 465: Introduction to Digital Image Processing 37
Bicubic Interpolation* EE 465: Introduction to Digital Image Processing 38
Pixel Replication low-resolution image (100× 100) high-resolution image (400× 400) EE 465: Introduction to Digital Image Processing 39
Bilinear Interpolation low-resolution image (100× 100) high-resolution image (400× 400) EE 465: Introduction to Digital Image Processing 40
Bicubic Interpolation low-resolution image (100× 100) high-resolution image (400× 400) EE 465: Introduction to Digital Image Processing 41
Error Concealment damaged interpolated EE 465: Introduction to Digital Image Processing 42
Image Inpainting EE 465: Introduction to Digital Image Processing 43
Geometric Transformation Widely used in computer graphics to generate special effects MATLAB functions: griddata, interp 2, maketform, imtransform EE 465: Introduction to Digital Image Processing 44
Basic Principle (x, y) (x’, y’) is a geometric transformation n We are given pixel values at (x, y) and want to interpolate the unknown values at (x’, y’) n Usually (x’, y’) are not integers and therefore we can use linear MATLAB implementation: to z’=interp 2(x, y, z, x’, y’, method); interpolation guess their values n EE 465: Introduction to Digital Image Processing 45
Rotation y’ y x’ θ x EE 465: Introduction to Digital Image Processing 46
MATLAB Example z=imread('cameraman. tif'); % original coordinates [x, y]=meshgrid(1: 256, 1: 256); % new coordinates a=2; for i=1: 256; for j=1: 256; x 1(i, j)=a*x(i, j); y 1(i, j=y(i, j)/a; end % Do the interpolation z 1=interp 2(x, y, z, x 1, y 1, 'cubic'); EE 465: Introduction to Digital Image Processing 47
Rotation Example θ=3 o EE 465: Introduction to Digital Image Processing 48
Scale a=1/2 EE 465: Introduction to Digital Image Processing 49
Affine Transform square parallelogram EE 465: Introduction to Digital Image Processing 50
Affine Transform Example EE 465: Introduction to Digital Image Processing 51
Shear square parallelogram EE 465: Introduction to Digital Image Processing 52
Shear Example EE 465: Introduction to Digital Image Processing 53
Projective Transform B’ B A D A’ C’ C D’ square quadrilateral EE 465: Introduction to Digital Image Processing 54
Projective Transform Example [ 0 0; 1 1; 0 1] [-4 2; -8 -3; -3 -5; 6 3] EE 465: Introduction to Digital Image Processing 55
APLIKASI OPERASI GEOMETRI Rotasi 27/09/2021 PERTEMUAN KE-2 56
SUMMARY n Operasi berbasis bingkai / frame adalah operasi yang melibatkan 2 buah citra atau lebih dan menghasilkan sebuah citra keluaran yang merupakan hasil operasi matematis ( operasi aritmatik dan operasi logika ) 27/09/2021 PERTEMUAN KE-2 57
SUMMARY n n Contoh implementasi operasi berbasis bingkai antara lain image blending, dan deteksi gerak. Operasi Geometrik berhubungan dengan perubahan bentuk geometrik citra, yaitu ukuran ataupun orientasinya. 27/09/2021 PERTEMUAN KE-2 58
TUGAS n Buat Program aplikasi pengolahan citra digital untuk operasi aritmatik / geometri 27/09/2021 PERTEMUAN KE-2 59
REFERENSI 1. 2. 3. Rafael C. Gonzales dan Richard E. Woods, Digital Image Processing, Edisi 2, Prentice Hall, 2002 Rafael C. Gonzales, Richard E. Woods dan Steven L. Eddins, Digital Image Processing using Mathlab, Prentice Hall, 2003 Achmad Balza, Firdausy Kartika. Teknik Pengolahan Citra Digital dengan Delphi. Ardi Publishing. Yogyakarta. 2005. 27/09/2021 PERTEMUAN KE-2 60
- Operasi aritmatika pada pengolahan citra
- Geometri
- Pengolahan citra digital
- Pengertian pengolahan citra digital
- Teknik sauteing
- Perkalian vektor
- Aritmetik ort
- Pengolahan citra
- Materi pengolahan citra teknik informatika
- Materi pengolahan citra
- File sharing management system
- Pengertian konsep set adalah.
- Contoh belanja pejabat
- Penjadwalan proses sistem operasi
- Organisasi komputer
- Data yang digunakan untuk operasi perhitungan disebut *
- Format citra digital
- Proses pembentukan citra digital
- Konsep sistem operasi manajemen operasi
- Un=-3n+7 jika un=-203 tentukan n
- Kuantisasi citra adalah
- Citra manusia dalam psikologi islam
- Pengolahan sinyal digital
- Mengolah data pada komputer disebut sebagai
- Pengertian transformasi z
- Pola pengolahan tanah spiral
- Microsoft excel adalah software yang berorientasi pada
- Proses pengolahan informasi pada manusia
- Metode sanitasi dengan menggunakan suhu tinggi disebut… *
- Pengolahan warna
- What is cycle in computer
- Akademis digital adalah
- Contoh sistem kontrol digital
- Syarat deret geometri tak hingga
- Geometri euclid dan non euclid
- Cbr geometri dan pengukuran
- Operasi pada queue
- Materi penjadwalan jangka pendek
- Operasi pada graf
- Manajemen memori pada sistem operasi
- Contoh priority queue
- Proyeksi vektor ortogonal
- Pengaturan proses pada sistem operasi
- Operasi dasar vektor
- Contoh soal penjadwalan proses pada sistem operasi
- Fractional binary numbers
- Jenis struktur data kue sering digunakan untuk
- Arsitektur firewall pada sistem operasi linux adalah
- Operasi hitung pada bentuk aljabar
- Alat untuk penyalai makanan disebut
- Makalah pengumpulan dan pengolahan informasi hasil belajar
- Pengolahan dan analisis data kuantitatif
- Teknik pengolahan data kualitatif
- Pengumpulan dan pengolahan data adalah
- Contoh penyajian data kesehatan
- Prinsip dan tujuan pengolahan daging
- Contoh open coding dalam penelitian kualitatif
- Contoh tabel distribusi baris kolom
- Pengolahan hasil penilaian tes hasil belajar
- Karakteristik hasil perikanan
- Keuntungan bahan setengah jadi