Title: Image Enhancement in the
1Chapter 4 Image Enhancement in the Frequency
Domain
2Chapter 4 Image Enhancement in the Frequency
Domain
3Chapter 4 Image Enhancement in the Frequency
Domain
4Chapter 4 Image Enhancement in the Frequency
Domain
5Chapter 4 Image Enhancement in the Frequency
Domain
6Chapter 4 Image Enhancement in the Frequency
Domain
7Chapter 4 Image Enhancement in the Frequency
Domain
8Chapter 4 Image Enhancement in the Frequency
Domain
9Chapter 4 Image Enhancement in the Frequency
Domain
10Chapter 4 Image Enhancement in the Frequency
Domain
11Chapter 4 Image Enhancement in the Frequency
Domain
12Chapter 4 Image Enhancement in the Frequency
Domain
13Chapter 4 Image Enhancement in the Frequency
Domain
14Chapter 4 Image Enhancement in the Frequency
Domain
15Chapter 4 Image Enhancement in the Frequency
Domain
16Chapter 4 Image Enhancement in the Frequency
Domain
17Chapter 4 Image Enhancement in the Frequency
Domain
18Chapter 4 Image Enhancement in the Frequency
Domain
19DFT in Matlab
Compute DFT gtgt f imread(center_bump.tif) gtgt
F fft2(f) gtgt S abs(F) gtgtimshow(S,)
20Centering DFT
- gtgt Fcfftshift(F)
- gtgt imshow(abs(Fc),)
21Sharpening by Log Transform
- gtgt S2log(1abs(Fc))
- gtgt imshow(S2,)
22From DFT back to signal
- gtgt Fifftshift(Fc)
- gtgt fifft2(F)
- gtgt freal(ifft2(F))
23Basic Frequency Filtering
- gtgt fimread(square_original.tif)
- gtgt M,Nsize(f)
- gtgt Ffft2(f)
- gtgt sig10
- gtgt Hlpfilter(gaussian,M,N,sig)
- gtgt GH.F
- gtgt greal(ifft2(G))
- gtgt imshow(g,)
24Chapter 4 Frequency Domain (the need for padding)
25Chapter 4 Frequency Domain (the need for padding)
26Chapter 4 Frequency Domain (why padding)
27Chapter 4 Image Enhancement in the Frequency
Domain
28Chapter 4 Image Enhancement in the Frequency
Domain
29Chapter 4 Image Enhancement in the Frequency
Domain
30Chapter 4 Frequency Domain Processing
31Chapter 4 Frequency Domain Processing
32Chapter 4 Frequency Domain Processing
33Chapter 4 Frequency Domain Processing
34Padding in Practice
- Assume images f(x,y) h(x,y) of sizes A B and
C D - Form two padded functions of size P Q by
appending zeros to f and g. You can show that
wraparound error is avoided by - choosing
- P ? A C - 1
- and
- Y ? B D - 1
- For special case of f(x,y) h(x,y) of the same
size, M N, we pad with - P ? 2M - 1 and Q ? 2N - 1
35Padding in Practice
- gtgt PQpaddedsize(size(f))
- Compute the FFT with padding.
- gtgt Fpfft2(f,PQ(1),PQ(2))
- gtgt Hplpfilter(gaussian,PQ(1),PQ(2),2sig)
- gtgt GpHp.Fp
- gtgt gpreal(ifft2(Gp))
- gtgt gpcgp(1size(f,1),1size(f,2))
- gtgt imshow(gp,)
- gtgt imshow(gpc,)
36Chapter 4 Image Enhancement in the Frequency
Domain
37Chapter 4 Image Enhancement in the Frequency
Domain
38Chapter 4 Image Enhancement in the Frequency
Domain
39Chapter 4 Image Enhancement in the Frequency
Domain
40Chapter 4 Image Enhancement in the Frequency
Domain
41Chapter 4 Image Enhancement in the Frequency
Domain
42Chapter 4 Image Enhancement in the Frequency
Domain
43Chapter 4 Image Enhancement in the Frequency
Domain
44Chapter 4 Image Enhancement in the Frequency
Domain
45Chapter 4 Image Enhancement in the Frequency
Domain
46Chapter 4 Image Enhancement in the Frequency
Domain
47Chapter 4 Image Enhancement in the Frequency
Domain
48Chapter 4 Image Enhancement in the Frequency
Domain
49Chapter 4 Image Enhancement in the Frequency
Domain
50Chapter 4 Image Enhancement in the Frequency
Domain
51Chapter 4 Image Enhancement in the Frequency
Domain
52Chapter 4 Image Enhancement in the Frequency
Domain
53Chapter 4 Image Enhancement in the Frequency
Domain
54Chapter 4 Image Enhancement in the Frequency
Domain
55Chapter 4 Image Enhancement in the Frequency
Domain
56Chapter 4 Image Enhancement in the Frequency
Domain
57Chapter 4 Image Enhancement in the Frequency
Domain
58Chapter 4 Image Enhancement in the Frequency
Domain
59Chapter 4 Image Enhancement in the Frequency
Domain
60Chapter 4 Image Enhancement in the Frequency
Domain
61Chapter 4 Image Enhancement in the Frequency
Domain