You are on page 1of 73

2-D FOURIER TRANSFORMS

Vedat Tavşanoğlu

2-D Fourier Transforms
Continuous-Variable Fourier Transform of a 2-D Signal

Fa (Ω x , Ω y ) =

−∞ −∞

∫ ∫

f a ( x, y )e

− j (Ω x x +Ω y y )

dx dy

IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu

2

2-D Fourier Transforms

f a ( x, y )
A

Fourier Transform of Rectangular Fuction

Y
X

y
X Y −0
3

x

Fa ( jΩ x , jΩ y ) = A ∫
0

e

− j (Ω x x+Ω y y )

dx dy

IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu

2-D Fourier Transforms Fa ( jΩ x . jΩ y ) = A e − jΩ x X − jΩ x x − jΩ y y −1 e − jΩ y Y −1 4 − jΩ x − jΩ y IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu . jΩ y ) = A ∫ e 0 X − jΩ x x dx ∫ e −0 Y − jΩ y y dy e X e ]0 [ ]Y Fa ( jΩ x . jΩ y ) = A[ 0 − jΩ x − jΩ y Fa ( jΩ x .

jΩ y ) = A Ωx 2 sin Ω yY 2 Ωy e − jΩ y Y Ω yY Ωx X sin sin 2 | | 2 | | Fa ( jΩ x . jΩ y ) |= 16 AXY | Ωx X Ω yY 2 2 IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 5 .2-D Fourier Transforms Ω x X − jΩ x X e 2 sin 2 Fa ( jΩ x .

jΩ y ) = −∞ −∞ ∫ ∫f a ( x. y ) e − j (Ω x x+Ω y y ) dx dy To this end approximate f a ( x.2-D Fourier Transforms We wish to numerically evaluate ∞ ∞ Fa ( jΩ x . [n∆x . y )e in the interval − j (Ω x x +Ω y y ) {[(n+1)∆x . m∆y )e IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 6 . (m+1)∆y]. m∆y]} by − j ( Ω x ∆x n + Ω y ∆y m ) f a (n∆x.

mYs )e − j ( Ω x X s n + Ω yYs m ) This expression gives the rectangular approximation of the 2-D Fourier integral. jΩ y ) ≅ Now defining yields n = −∞ n = −∞ ∑ ∑ ∞ ∞ ∞ f a (n∆x. jΩ y ) ≅ X s Ys ∑ ∑ ∞ f a (nX s .2-D Fourier Transforms Fa ( jΩ x . m∆y )e − j ( Ω x ∆x n + Ω y ∆y m ) ∆x ∆y ∆x = X s . ∆y = Ys n = −∞ n = −∞ F ( jΩ x . IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 7 .

m) yields F ( jΩ x .2-D Fourier Transforms Now letting Ω x X s = ω x . mX s ) = f (n. jΩ y ) ≅ X s Ys F (e IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu jω x . Ω yYs = ω y f a (nX s .e jω y ) 8 .

y) Fourier Transform. F(exp(jωx). m)e − j (ω x n +ω y m ) . Since exp(jωx) and exp(jωy) are periodic functions with 2π period. which gives a continuous function of the frequencies ωx and ωy. IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 9 ∑ ∑ ej ∞ ∞ f (n. exp(jωy)) is a periodic function with respect to ωx and ωy with period 2π.2-D Fourier Transforms where F (e jω x .e jω y )= n = −∞ m = −∞ This sum is defined as the 2-D Discrete-(x.

•Sampled sinusoidal signals are shown to be periodic with frequency.ω y ≤π are aliases of those within this range and that the corresponding components will be folded around π and –π and will appear to be within this range. IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 10 .m): •All signals are composed of sinusoidal signals.y) signal f(n. •Any sampled signal is periodic with frequency. •Components with frequencies that are outside the range − π ≤ ω x .2-D Fourier Transforms We could reach the same conclusion through a frequency analysis of the discrete-(x.

. ... N = ∑e n =0 N −1 − jω x n M −1 ∑ e − jω y m m=0 ... ... .. ... . M .. ... .... .... .. . n 1− e 1− e = − jω x − jω y 1− e 1− e 11 − jω x N − jω y M IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu . .. ........ . . .. .2-D Fourier Transforms Example: ⇒0 m ⇒1 .....e jω y )=∑ n =0 N −1 M −1 m =0 ∑ e − j (ω x n +ω y m ) .... ..... .... .. ... F (e jω x . .. . ....

e )=e −j ω x ( N −1) 2 ωyM ωxN ω y ( M −1) sin sin 2 e− j 2 2 ωx ωy sin sin 2 2 12 IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu .2-D Fourier Transforms = e ω N −j x 2 −j ωx 2 e ω N j x 2 j ωx 2 −e −e ω N −j x 2 −j ωx 2 e −j ω yM 2 ωy 2 e j ω yM 2 j ωy 2 −e −e −j −j ωyM 2 ωy 2 e e jω y e −j e F (e jω x .

e ) |= ωx sin 2 ω yM 2 ωy 2 | || sin | sin IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 13 .2-D Fourier Transforms ωxN sin jω y jω x 2 | F (e .

2-D Fourier Transforms Rectangular Image IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 14 .

colorbar figure. f(1:20.colorbar. figure.F2=abs(F).mesh(F2).2-D Fourier Transforms shifted Fourier Transform of Rectangular Image close all f=zeros(30. imshow(f.colormap(jet). figure.imshow(F2. title(‘Fourier transform of rectangular image (imshow)’) F=fft2(f). title(‘Fourier transform of rectangular image (mesh)’) F=fftshift(F).imshow(F2. title(‘180 degrees shifted Fourier transform (mesh)’) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu MATLAB Program for the Fourier Transform and 1800 15 .[0 10].mesh(F2).'notruesize').[0 10].'notruesize').colormap(jet).F2=abs(F).1:15)=1.'notruesize'). title(‘180 degrees shifted Fourier transform (imshow)’) figure.30).

2-D Fourier Transforms Fourier Transform of Rectangular Image (imshow) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 16 .

2-D Fourier Transforms Fourier Transform of Rectangular Image (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 17 .

2-D Fourier Transforms 180 degrees shifted Fourier Transform of Rectangular Image (imshow) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 18 .

2-D Fourier Transforms 180 degrees shifted Fourier Transform of Rectangular Image (MESH) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 19 .

2-D Fourier Transforms 1800 shifted Fourier Transform of Rectangular Image (imshow) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 20 .

2-D Fourier Transforms 1800 shifted Fourier Transform of Rectangular Image (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 21 .

colormap(jet).1:15)=1.mesh(F2).imshow(F2. f(1:20. F=fftshift(F). imshow(f.2-D Fourier Transforms MATLAB Program Fourier Transform of Rectangular Image Computed with Zero Padding: close all f=zeros(30. F=fft2(f.30).[0 10]. title(‘180 degrees shifted Fourier transform of rectangular image computed with zero padding(imshow)’) figure. title(‘180 degrees shifted Fourier transform of rectangular image computed with zero padding (mesh)’) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 22 . figure.colorbar.'notruesize').'notruesize'). F2=abs(F).256).256.

2-D Fourier Transforms Fourier Transform of Rectangular Image Computed with Zero Padding (imshow) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 23 .

2-D Fourier Transforms Fourier Transform of Rectangular Image Computed with Zero Padding (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 24 .

2-D Fourier Transforms Take the Fourier transform of the image given below. IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 25 .

2-D Fourier Transforms
F (e
jω x

,e

jω y

)=∑
n =1
128 m =1

128

128

f ( n, m ) e
− j (ω x n + ω y )

− j (ω x n +ω y m )

m =1

F (e

jω x

,e

jω y

) = ∑ f (n,1)e
128

+ ∑ f (n,2)e
m =1

− j (ω x n + 2ω y )

..........
128 m =1

..............
− j (ω x n +128ω y )

+ ∑ f (n,128)e
IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu

26

2-D Fourier Transforms
F (e
jω x

,e

jω y

)=e +e

− jω y


128

128

f (n,1)e

− jω x n

m =1

− j 2ω y

f ( n, 2) e

− jω x n

m =1

........................ +e
− j128ω y

128

f (n,128)e

− jω x n

m =1
27

IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu

2-D Fourier Transforms
where
128 128 128

f (n,1)e

− jω x n

m =1

= ∑ f ( n,2)e
m =1

− jω x n

.......... = ∑ f ( n,128)e
m =1

− jω x n

=∑ e
n =1

64

− j 2ω x n

=e

− j 2ω x n

1− e − j 2ω x 1− e

− j128ω x

IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu

28

2-D Fourier Transforms F ( e jω x . + e − j128ω y )∑ f (n. e jω y ) = (e − jω y +e − j 2ω y + .1)e − jω x n m =1 128 =e − jω y n 1− e − j128ω y − jω y 1− e e − j 2ω x n 1− e − j 2ω x 1− e − j128ω x IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 29 ..

e sin 64ω y ) |= ωy sin 2 | || sin 64ω x sin ω x | 30 IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu .5ω y sin 64ω y − j 65ω x sin 64ω x e ωy sin ω x sin 2 jω y | F (e jω x .2-D Fourier Transforms =e − j 64.

128). s=b. z = a.2-D Fourier Transforms close all. for k = 1:127 z = [z. a = zeros(128. a = [ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0].j]. j=s. b=[1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0]. s=[s b]. imshow(z. s=[s. end l = z.l]. b = zeros(128.128).'notruesize') IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 31 . imshow(s. end figure. for k = 1:7 z = [z a] .'notruesize') figure.

imshow(s. fs=abs(fs).'notruesize') figure.colormap(jet).imshow(fs.mesh(fs).256).colorbar figure.256. fz=abs(fz).'notruesize').[0 5].256. IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 32 . fs=fftshift(fs).2-D Fourier Transforms figure. fs=fft2(s.[0 5].'notruesize').imshow(fz.colorbar figure. imshow(z.colormap(jet).256). figure.mesh(fz). figure. fz=fftshift(fz).'notruesize') fz=fft2(z.

2-D Fourier Transforms Fourier transform of the first image (imshow) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 33 .

2-D Fourier Transforms Fourier transform of the first image (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 34 .

2-D Fourier Transforms Fourier transform of the first image in ‘x’ direction (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 35 .

2-D Fourier Transforms Fourier transform of the first image in ‘y’ direction (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 36 .

IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 37 .2-D Fourier Transforms Take the Fourier transform of the image given below.

..e jω y ) = ∑ f (n.... 128 m =1 .. m)e − j (ω x n +ω y m ) m =1 − j (ω x n +ω y ) F (e .128)e IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 38 .1)e 128 + ∑ f ( n. − j (ω x n +128ω y ) + ∑ f (n..2-D Fourier Transforms F (e jω x .............. 2 ) e m =1 − j (ω x n + 2ω y ) .e jω x jω y )=∑ n =1 128 m =1 128 ∑ 128 f (n...

........2-D Fourier Transforms F (e jω x ..128)e − jω x n m =1 39 IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu ..... 2) e − jω x n m =1 ..e jω y )=e +e − jω y ∑ 128 128 f (n.1)e − jω x n m =1 − j 2ω y ∑ f ( n....... +e − j128ω y ∑ 128 f (n....

... .... ..e jω y ) = ∑ f (n...128)e − jω x n m =1 ∑ n =1 128 f (n.1)e m =1 128 128 − jω x n = ∑ f ( n....... + e − j120ω x F1 (e jω x ) = (∑ e − j 8ω x ) F1 (e jω x ) k =1 IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 40 15 .. 2) e m =1 128 − jω x n ........1)e jω x n = F1 (e jω x ) + e − j 8ω F1 (e jω x ) + ..2-D Fourier Transforms F (e jω x ....... = ∑ f (n......

..1)e n =1 128 jω x n = F1 (e jω x ) + e − j 8ω F1 (e jω x ) + ..1)e − jω x n ) m =1 128 F ( e jω x . e jω y ) = (e − jω y +e − j 2ω y . ....2-D Fourier Transforms F ( e jω x ..1)e− jω x n ∑1 − jω y 1− e m= − j128ω y ∑ f (n........... e where jω y )=e − jω y (1 − e ) 128 f (n............. + e − j120ω x F1 (e jω x ) = (∑ e − j 8ω x ) F1 (e jω x ) k =1 IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 41 15 .. + e − j128ω y )(∑ f (n.....

e jω y sin 64ω y sin 64ω x sin 2ω x )= ω y sin 4ω x ωx sin sin 2 2 || | 42 IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu .2-D Fourier Transforms with F1 (e jω x )=∑e n =1 − j128ω y 4 − jω x n 1− e 1 − e − j128ω x − jω x 1 − e − j 4ω x − jω y jω y jω x e F (e . e ) = e − jω y − j 8ω x 1− e 1 − e − jω x 1− e We obtain | F (e jω x .

2-D Fourier Transforms Fourier transform of the second image (imshow) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 43 .

2-D Fourier Transforms Fourier transform of the second image (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 44 .

2-D Fourier Transforms Fourier transform of the second image in ‘x’ direction (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 45 .

2-D Fourier Transforms Fourier transform of the second image in ‘y’ direction (mesh) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 46 .

30). imshow(f. f(1:20.imshow(F2.2-D Fourier Transforms Fourier Transform of Rectangular Fuction: MATLAB Program close all f=zeros(30.1:15)=1.[0 5]. F2=abs(F). figure.colormap(jet).'notruesize').colorbar IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 47 .'notruesize') F=fft2(f).

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 48 .

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 49 .

30). imshow(f.2-D Fourier Transforms Fourier Transform of Rectangular Fuction: MATLAB Program close all f=zeros(30.colorbar IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 50 .'notruesize'). f(10:20. imshow(F2.colormap(jet). F2=abs(F).'notruesize') F=fft2(f).[0 5].10:20)=1.

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 51 .

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 52 .

30).colormap(jet).colorbar IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 53 . f(10:20.256).'notruesize'). F2=log(abs(F)).2-D Fourier Transforms Fourier Transform of Rectangular Fuction Computed with Zero Padding: MATLAB Program f=zeros(30.10:20)=1.256.[-1 5]. F=fft2(f. imshow(F2.'notruesize'). imshow(f.

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 54 .

[0 10].colorbar IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 55 . imshow(F2. imshow(J. F2=log(abs(F)).256.256).'notruesize').45).2-D Fourier Transforms FOURIER TRANSFORM OF ROTATED IMAGE MATLAB Program for the rotated image I=zeros(30. F=fft2(J. I(10:20.'notruesize').10:20)=1. J=imrotate(I.colormap(jet).30).

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 56 .

J=imrotate(I.mesh(F2) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 57 . imshow(J.256). F=fft2(J.2-D Fourier Transforms I=zeros(30.[0 5].imshow(F2.colormap(jet). figure.256.30).45).10:20)=1. I(10:20.'notruesize').'notruesize'). F=fftshift(F) F2=abs(F). colorbar figure.

end IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 58 .x+cy) = 1. while x < r y1 = (sqrt(r2-x*x)+cx). r2 = r*r. y2 = (-sqrt(r2-x*x)+cx). cy=120.2-D Fourier Transforms Close all I = zeros(256. for i = cy:round(y1) I(i. y3 = (sqrt(r2-x*x)+cy). r = 75.256). cx=120. y4 = (-sqrt(r2-x*x)+cy). x = -r.

x = x+1.title('Original Image') IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 59 .round(y3)) = 1.mesh(I).title('Original Image') figure. end I(x+cx. I(x+cx.2-D Fourier Transforms for i = round(y2):cy I(i.round(y4)) = 1.x+cy) = 1.'notruesize'). end imshow(I.

F=fftshift(F).colorbar.title('FT of Original Image') figure.256.title('Filter Kernel') H=fft2(h.'notruesize').256).title('FT Original Image') figure. H2=abs(H).mesh(F2). H=fftshift(H). . colormap(jet).mesh(h). IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 60 F=fft2(I.256).2-D Fourier Transforms figure.imshow(F2.title('Filter Kernel') figure.'notruesize').[-.imshow(h.[0 5].125 1]. F2=abs(F).256.

colormap(jet).256.'notruesize').[0 5].256).imshow(F.colorbar.imshow(Iout.mesh(F2).title('Output Image') Fout=fft2(Iout. F=fftshift(Fout).'notruesize').title('FT of Output Image') IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 61 . figure.title('Output Image') figure.mesh(Iout).2-D Fourier Transforms figure.title('FT Output Image') figure.

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 62 .

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 63 .

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 64 .

2-D Fourier Transforms IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 65 .

2-D Fourier Transforms Fourier Transforms of 2-D Convolution y( n .l ) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 66 ∞ ∞ k = −∞ l = −∞ . m − l ) ∑ ∑ x( n − k .l )h( n − k . m − l )h( k . m ) = = k = −∞ l = −∞ ∞ ∞ ∑ ∑ x( k .

m )e − j ( ω x m +ω y n ) n = −∞ m = −∞ k = −∞ l = −∞ ∞ ∞ ∞ ∑ ∑ [ ∑ ∑ x( k .e ∞ jω y )= ∞ n = −∞ m = −∞ ∑∑ ∞ ∞ ∞ ∞ y( n .l ) ] e IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu ∞ − j ( ω x m +ω y n ) − j ( ω x m +ω y n ) n = −∞ m = −∞ k = −∞ l = −∞ 67 . m − l )h( k .2-D Fourier Transforms Y( e = = jω x .m − l ) ] e ∑ ∑ [ ∑ ∑ x( n − k .l )h( n − k .

l ) ] e IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu ∞ − j ( ω x ( j + l )+ω y ( i + k )) n = −∞ m = −∞ k = −∞ l = −∞ 68 .e ∞ jω y )= ∞ ∞ − j ( ω x ( j + l )+ω y ( i + k )) n = −∞ m = −∞ k = −∞ l = −∞ ∞ ∞ ∞ ∞ ∑ ∑ [ ∑ ∑ x( k .2-D Fourier Transforms Now let n − k = i and m − l = j Y( e = = jω x .l )h( i . j )h( k . j ) ] e ∑ ∑ [ ∑ ∑ x( i .

n)* x(m.l )e ) ∞ ∞ − j ( ω x l +ω y k ) = H( e . j )e jω x ∑ ∑ x( k .n)}= H(e IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 69 .e jω y )X ( e .e ) F{h(m.e jω y jω jωy jω jωy x .e ∞ jω y )= − j ( ω x i +ω y j ) k = −∞ l = −∞ jω x i = −∞ j = −∞ ∑ ∑ h( i .2-D Fourier Transforms Y( e = ∞ jω x .e )X(e x .

2:9)=1.title('FT of Filter Kernel') figure.title('Filter Kernel') H(256. F2=abs(F).mesh(H2). figure. imshow(I.5].mesh(h).title('Original Image') F(256.[0 1.256. figure. H=fftshift(H). Iout=conv2(I.colormap(jet).h).title('FT Original Image') figure.colorbar. h=ones(3.mesh(F2).256)=0.colorbar.colormap(jet). F=fft2(I. F=fftshift(F).'notruesize').256).mesh(I).title('Original Image').title('FT of Original Image') figure.figure.[0 5].12).imshow(F2. H=fft2(h.imshow(H2. H2=abs(H).3)/9.256.256)=0.'notruesize'). I(2:9.256).title('FT of Filter Kernel') IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 70 .2-D Fourier Transforms Close all I=zeros(12.'notruesize').

I2=abs(I2). I2out=real(I2out).mesh(Iout).colorbar.mesh(I2).imshow(Iout.'notruesize').title('Filtered Image') figure.'notruesize').2-D Fourier Transforms figure. figure.mesh(I2out). title('FT of Output Image obtained by the product of FFTs') I2out(256.256. I2out=ifft2(FIout).title('Output Image obtained by Inv FFT') IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 71 .256)=0.256).imshow(abs(FIout).colormap(jet).*F.colorbar.'notruesize').256)=0. title('FT of Filtered Image') figure.[0 5].imshow(I2out.title('Filtered Image') I2=fft2(Iout.colormap(jet).[0 5].title('FT of Filtered Image') FIout(256. FIout=H. title('Output Image obtained by Inv FFT') figure.imshow(I2. figure. figure.'notruesize'). I2=fftshift(I2).

n ) = x1( m )x2 ( n ) Then x(m.2-D Fourier Transforms Fourier Transform of Separable of Signals Separability of 2-D Signals Let a 2-D signal be given by x(m. If x(m.n).n) is said to separable.n) can be written as: x( m . IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu 72 .

2-D Fourier Transforms X(e = ∞ jω x .e jω y )= m = −∞ n = −∞ ∑ ∑ x( m.n )e n = −∞ ∞ ∞ j ( ω x m +ω y n ) m = −∞ ∑ x ( m )e 1 jω x m ∑ x ( n )e 2 ∞ jω x n X(e jω x .e jω y ) = X 1( e jω x )X 2( e jω y 73 ) IMAGE SAMPLING AND FOURIER TRANSFORMS Vedat Tavşanoğlu .