PENGOLAHAN CITRA DIGITAL
Transformasi
Citra
Dua Domain Manipulasi Image
Spatial Domain : (image plane)
Adalah teknik yang didasarkan pada manipulasi
l a n g s u n g p i x e l s u a t u i m a g e .
Frequency Domain :
Adalah teknik yang didasarkan pada modifikasi
t r a n s f o r m a s i F o u r i e r d a r i s u a t u i m a g e .
Dimungkinkan pula teknik manipulasi
image dengan cara menggabungkan dua
Transformasi Fourier adalah konversi data image spasial I(x,y) menjadi r e p r e s e n t a s i f r e k u e n s i F ( u , v ) . Baik representasi spasial maupun
frekuensi memuat informasi
kelebihan yang dan ekuivalen dengan
Konstruksi
Sebuah
Image
Basis vectors Combination Linear + + +Analisa
Sebuah
Image
All basis images
... ...
I
Maka
…
= a1 I1 + a2 I2 + … + an In Im
Real Basis
Im dapat di recovered dari a bila I invertible
Fundamentals
Fourier Series : suatu fungsi periodik sebagai
dapat direpresentasikan
penjumlahan sinus/cosinus dari f r e k u e n s i
perkalian koefisien yang berbeda. y a n g b e r b e d a l e w a t Fourier
periodic sebagai
Transform : Fungsi non
dapat juga direpresentasikan integral dari sinus/cosinus
Fourier
suatu Transform adalah representasi
image sebagai jumlah dari ekponensial yang kompleks yang m e l i p u t i b e s a r a n m a g n i t u d e s , f r e q u e n c i e s , d a n p h a s e s . Fourier Transform memegang peranan penting dalam berbagai aplikasi image
procressing termasuk enhancement, analysis, restoration, dan compression.
Dapat
k e a dipandang sebagai array spasial dari nilai b u a n ( g r a y v a l u e ) .
Dapat juga dipandang sebagai sebuah fungsi
s p a s i a l d i s k r e t .
Teknik
Fourier
Image
Selanjutnya image di dekomposisi kedalam
sebuah himpunan fungsi orthogonal yang
d i s e b u t d e n g a n b a s i s f u n c t i o n s .
The Fourier basis functions : sinusoids.
Konsep umum adalah pemetaan fungsi i m a g e s p a s i a l k e d a l a m transformasi d o m a i n Fourier. frekuensi lewat adalah
Hasilnya sebuah himpunan fungsi
b a s i s Setiap
s i n u s o i d a l d a n c o e f f i c i e n t s . weighted basis adalah menjelaskan
kontribusi dari setiap bagian frekuensi
i m a g e .
Fourier Transform
Direct:
i 2 uxdx { f ( x)} F (u) f ( x)e
f ( x)(cos2 ux i sin 2 ux)dx
f ( x) cos2 uxdx
even
i f ( x) sin 2 uxdx
Inverse Fourier Transform
Setelah
frekuensi processing pada domain
maka dikonversi ulang ke domain spasial lewat persamaan :
Bila f(x) adalah fungsi kontinyu dari variabel real x
Maka Transformasi Fourier dari
adalah : f(x)
f (x) F (u) f (x) exp[ j2 ux]dx
j 1
Sebaliknya bila diberikan F(u), maka f(x) dapat dicari lewat inverse transformasi
Fourier transform:
1{F (u)} f (x)
Transformasi Fourier adalah
dari fungsi 2 variable : pasangan
{ f (x, y)} F (u, v) f (x, y) exp[ j2 (ux vy)]dxdy
dan
1{F (u, v)} f (x, y) F (u, v) exp[ j2 (ux vy)]dudv
Bila fungsi f(m,n) bernilai 1 sehingga b e r b e n t u k k o t a k untuk dan nilai 0 i y a n g l a n n y a .
Maka Magnitude dari Fourier Transform dalam bentuk Mesh
|F(u)| (magnitude function) adalah
Fourier spectrum
sudut phasenya. dari f(x) dan (u)
The square P(u) of the 2 F (u) spectrum R2 (u) I 2 (u)
1/ 2
R
2(u,v)
2(u,v)
Fourier spectrum:F(u,v)
I
I (u, v) 1 (u, v) tan • Phase: R(u, v) • Power spectrum: 2 Input dan output dari DFT keduanya dalam
bentuk discrete yang akan memudahkan dalam p r o s e s m a n i p u l a s i .
Diskret Fourier Transform
P erh itu n ga n Fo u rie r t ra n s for m pad a
k o m p u t e r a k a n m e l i b a t k a n b e n t u k Fourier transform lain yaitu Discrete
t r a n s f o r m ( D F T ) .
Ada dua alasan mengapa digunakan bentuk
t r a n s f o r m D F T :
T e r d a p a t a l g o r i t m a y a n g c e p a t u n t u k
menghitung DFT yang disebut dengan Fast F o u r i e r t r a n s f o r m ( F F T ) .
Discrete Fourier Transform
Suatu fungsi kontinyu f(x) dapat didiskritkan
k e d a l a m b e n t u k u r u t a n t e r t e n t u d e n g a n m e n g a m b i l N s a m p l e s x u n i t s
Fungsi Discrete
Fungsi Kontinyu : f(x) Discretized at t = 0, 1, f1, 2, f2, 3,… f3, …) (f0, Discrete Fourier Transform
Bila x diasumsikan sebagai nilai diskrit (0,1,2,3,…,N-1), maka
f (x) f (x
0
x x)
• Urut a n { f( 0) , f(1 ) ,f (2 ),… f ( N- 1 )} a da la h uniform dengan menunjukkan bahwa setiap bentuk NDiscrete Fourier Transform
Pasangan Discrete Fourier Transform
yang diaplikasikan terhadap fungsi s a m p l e d i n y a t a k a n d e n g a n :
N 1
1
F (u) f (x) exp[ j2 ux / N ] For u=0,1,2,…,N-1 N x 0
and
N 1
f (x) f (u) exp[ j2 ux / N ] For x=0,1,2,…,N-1
Discrete Fourier Transform
Nilai u = 0, 1, 2, …, N-1
berkorespondensi dengan sample dari
transformasi kontinyu pada nilai 0, u, 2 u, …, (N-1) u.
Contoh : F(u) adalah representasi 1
F(u u), dimana :
u
j e cos ) 1 j sin cos( ) cos( M 1
F (u) f ( x )[cos2 ux / M j sin 2 ux / M ] M x 0
Seiap bentuk dari Fourier Transform FT
(F(u) untuk setiap u) adalah tersusun dari semua nilai f(x).
Discrete Fourier Transform
Dalam adalah
F (u, v)
kasus 2 variable, pasangan DFT
: M 1 N 1
1
f (x, y) exp[ j2 (ux / M vy / N )] MN x 0 y 0
For u=0,1,2,…,M-1 and v=0,1,2,…,N-1 Dan:
M 1 N 1
f (x, y) F (u, v) exp[ j2 (ux / M vy / N )]
u n t u k x = 0 , 1 , 2 , … , M - 1 a n d
y = 0 , 1 , 2 , … , N - 1 .
Discrete Fourier Transform
Sampling dari fungsi sekarang dalam
bentuk 2-D grid ( x, y divisions). Fungsi
samples discrete f(x,y) menunjukkan
dari fungsi f(x0+x x,y0+y y)
1 1
u , v
Discrete Fourier Transform
Bila images dikenakan sampling dalam bentuk
square array, M = N dan pasangan Fourier T r a n s f o r m m e n j a d i :
N 1 N 1
1
F (u, v) f (x, y) exp[ j2 (ux vy) / N ] N x 0 y 0
For u,v=0,1,2,…,N-1 Dan:
N 1 N 1
1
f (x, y) F (u, v) exp[ j2 (ux vy) / N ] N u 0 v 0
Discrete Fourier Transform
Untuk menghitung F(u) maka dilakukan
substitusi u = 0 dalam bentuk exponential d a n s u m d a r i s e m u a n i l a i u Berakibat
M*M pada total jumlah dan perkalian
M 1
1
F(u) f (x)exp[ j2 ux / M] For u=0,1,2,…,M-1 M x 0
Dari persamaan diatas, jumlah perkalian
c o m p l e x d a n p e n j u m l a h a n u n t u k
Fast
Fourier Transform
N 1
1
F (u)
f (x) exp[ j2 ux / N ]
N
x 0mengimplementasikan Transformasi Fourier
N2
adalah (N complex multiplications and
Kalikan hasil dengan sebuah filter fungsi
t r a n s f e r
Filtering Pada Domain Frekuensi
Hitung Transformasi Fourier dari Image
L a k u k a n i n v e r s m e n g h a s i l k a n Summary: t r a n s f o r m u n t u k p e r b a i k a n i m a g e
G(u,v) = H(u,v) F(u,v)
1
Tipe dari enhancement :
L owpass filtering : mengurangi high - atau
f requenc y c ontent blurring
s m o o t h i n g
Highpass filtering: menambah magnitude
dari high-frequency components relatif terhadap low-frequency components
Lowpass Filtering
Edges, noise contribute significantly to FT .
the high-frequency content of the
o f a n i m a g e
Blurring/smoothing is achieved by
reducing a specified range of high- f r e q u e n c y c o m p o n e n t s :