Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.

Similar presentations


Presentation on theme: "Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter."— Presentation transcript:

1 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

2 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

3 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

4 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

5 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

6 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

7 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

8 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

9 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

10 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

11 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

12 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

13 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

14 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

15 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

16 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

17 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

18 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

19 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods DFT in Matlab Compute DFT: >> f = imread(’center_bump.tif’); >> F = fft2(f); >> S = abs(F); >>imshow(S,[])

20 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Centering DFT >> Fc=fftshift(F); >> imshow(abs(Fc),[])

21 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Sharpening by Log Transform >> S2=log(1+abs(Fc)); >> imshow(S2,[])

22 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods From DFT back to signal >> F=ifftshift(Fc); >> f=ifft2(F); >> f=real(ifft2(F));

23 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Basic Frequency Filtering >> f=imread(’square_original.tif’); >> [M,N]=size(f); >> F=fft2(f); >> sig=10; >> H=lpfilter(’gaussian’,M,N,sig); >> G=H.*F; >> g=real(ifft2(G)); >> imshow(g,[])

24 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Frequency Domain (the need for padding) Chapter 4 Frequency Domain (the need for padding)

25 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Frequency Domain (the need for padding) Chapter 4 Frequency Domain (the need for padding)

26 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Frequency Domain (why padding) Chapter 4 Frequency Domain (why padding)

27 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

28 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

29 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

30 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Frequency Domain Processing Chapter 4 Frequency Domain Processing

31 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Frequency Domain Processing Chapter 4 Frequency Domain Processing

32 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Frequency Domain Processing Chapter 4 Frequency Domain Processing

33 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Frequency Domain Processing Chapter 4 Frequency Domain Processing

34 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Padding 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

35 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Padding in Practice >> PQ=paddedsize(size(f)); %Compute the FFT with padding. >> Fp=fft2(f,PQ(1),PQ(2)); >> Hp=lpfilter(’gaussian’,PQ(1),PQ( 2),2*sig); >> Gp=Hp.*Fp; >> gp=real(ifft2(Gp)); >> gpc=gp(1:size(f,1),1:size(f,2)); >> imshow(gp,[]) >> imshow(gpc,[])

36 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

37 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

38 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

39 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

40 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

41 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

42 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

43 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

44 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

45 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

46 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

47 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

48 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

49 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

50 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

51 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

52 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

53 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

54 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

55 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

56 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

57 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

58 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

59 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

60 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain

61 Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter 4 Image Enhancement in the Frequency Domain


Download ppt "Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter."

Similar presentations


Ads by Google