Presentation is loading. Please wait.

Presentation is loading. Please wait.

G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Basic idea Input Image, I(x,y) (spatial domain) Mathematical Transformation.

Similar presentations


Presentation on theme: "G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Basic idea Input Image, I(x,y) (spatial domain) Mathematical Transformation."— Presentation transcript:

1 G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Basic idea Input Image, I(x,y) (spatial domain) Mathematical Transformation F( ) Transformed Image F(u, v) Processing F(u,v) Inverse Transformation F -1 ( ) Output Image, I’(x,y) (spatial domain)

2 G52IIP, School of Computer Science, University of Nottingham 2 Image Transforms Fourier Transform There are many different transformations, Fourier Transform (FT) or its fast implementation (FFT) is the most well-known. For the purpose of this course, we will treat FFT as a black box, and will not go through the detail mathematics (i.e., not required). Instead of formal mathematics, which will be more elegant, we will try to explain the essential idea of FFT informally.

3 G52IIP, School of Computer Science, University of Nottingham 3 Image Transforms Fourier Transform – Essential idea Any given function (an image is a 2D function) can be approximated by a weighted sum of sines and conses.

4 G52IIP, School of Computer Science, University of Nottingham 4 Image Transforms Fourier Transform Basic idea

5 G52IIP, School of Computer Science, University of Nottingham 5 Image Transforms f(t) Cos(  t) Cos(  t/2) Cos(2  t) f(t) f(t) = Cos(  t/2)+Cos(  t)+Cos(2  t)

6 G52IIP, School of Computer Science, University of Nottingham 6 Image Transforms In general, The weight, F i, indicates the importance of cos(u i t) u i represents the frequency of the cosine signal A larger u i, cos(u i t) changes faster -> higher frequency component of f(t) A smaller u i, cos(u i t) changes slower -> lower frequency component of f(t) f(t)

7 G52IIP, School of Computer Science, University of Nottingham 7 Image Transforms f(t) Cos(  t) Cos(  t/2) Cos(2  t) f(t) = Cos(  t/2)+Cos(  t)+Cos(2  t) F 1 = 1u 1 =  /2 F 2 = 1 u 2 =  F 3 = 1 u 3 = 2 

8 G52IIP, School of Computer Science, University of Nottingham 8 Image Transforms f(t) Cos(  t) Cos(  t/2) Cos(2  t) f(t) = 5*Cos(  t/2)+2*Cos(  t)+Cos(2  t) F 1 = 5u 1 =  /2 F 2 = 2 u 2 =  F 3 = 1 u 3 = 2 

9 G52IIP, School of Computer Science, University of Nottingham 9 Image Transforms f(t) Cos(  t) Cos(  t/2) Cos(2  t) f(t) = Cos(  t/2)+2*Cos(  t)+5*Cos(2  t) F 1 = 1u 1 =  /2 F 2 = 2 u 2 =  F 3 = 5 u 3 = 2 

10 G52IIP, School of Computer Science, University of Nottingham 10 Image Transforms f(t) F 1 = 1u 1 =  /2 F 2 = 2 u 2 =  F 3 = 5 u 3 = 2  F 1 = 5u 1 =  /2 F 2 = 2 u 2 =  F 3 = 1 u 3 = 2  F 1 = 1u 1 =  /2 F 2 = 1 u 2 =  F 3 = 1 u 3 = 2  f(t) = F 1 *Cos(  t/2)+F 3 *Cos(  t)+F 3 *Cos(2  t)

11 G52IIP, School of Computer Science, University of Nottingham 11 Image Transforms f(t) F 1 = 1u 1 =  /2 F 2 = 2 u 2 =  F 3 = 5 u 3 = 2  F 1 = 5u 1 =  /2 F 2 = 2 u 2 =  F 3 = 1 u 3 = 2  F 1 = 1u 1 =  /2 F 2 = 1 u 2 =  F 3 = 1 u 3 = 2  f(t) = F 1 *Cos(  t/2)+F 3 *Cos(  t)+F 3 *Cos(2  t)

12 G52IIP, School of Computer Science, University of Nottingham 12 Image Transforms f(t) F 1 = 1u 1 =  /2 F 2 = 2 u 2 =  F 3 = 5 u 3 = 2  F 1 = 5u 1 =  /2 F 2 = 2 u 2 =  F 3 = 1 u 3 = 2  F 1 = 1u 1 =  /2 F 2 = 1 u 2 =  F 3 = 1 u 3 = 2  f(t) = F 1 *Cos(  t/2)+F 3 *Cos(  t)+F 3 *Cos(2  t) Power spectrum or Frequency Distribution

13 G52IIP, School of Computer Science, University of Nottingham 13 Image Transforms f(t) F 1 = 1u 1 =  /2 F 2 = 2 u 2 =  F 3 = 5 u 3 = 2  F 1 = 5u 1 =  /2 F 2 = 2 u 2 =  F 3 = 1 u 3 = 2  F 1 = 1u 1 =  /2 F 2 = 1 u 2 =  F 3 = 1 u 3 = 2  f(t) = F 1 *Cos(  t/2)+F 3 *Cos(  t)+F 3 *Cos(2  t) What can we tell about the function (image) from its frequency distribution?

14 G52IIP, School of Computer Science, University of Nottingham 14 Image Transforms Fourier Transform – so far our informal illustration f(t) FFT F(u) FFT

15 G52IIP, School of Computer Science, University of Nottingham 15 Image Transforms Fourier Transform – Actual f(t) FFT F(u) FFT F(u) u A continuous function rather than discrete

16 G52IIP, School of Computer Science, University of Nottingham 16 Image Transforms Fourier Transform – Actual f(t) F(u) u Similar to the discrete case, from F(u), we can tell something about the signal f(t) F(u) u

17 G52IIP, School of Computer Science, University of Nottingham 17 Image Transforms Fourier Transform – To summaries From F(u), we can tell something about its spatial signal, whether it contains fast/slow changing features f(t) FFT F(u) FFT F(u)

18 G52IIP, School of Computer Science, University of Nottingham 18 Image Transforms Now, come back to the idea of frequency domain processing F’( ) Input Image, I(x,y) (spatial domain) Mathematical Transformation F( ) Transformed Image F(u, v) Processing F(u,v) Inverse Transformation F ’ ( ) Output Image, I’(x,y) (spatial domain) F’F’

19 G52IIP, School of Computer Science, University of Nottingham 19 Image Transforms Now, come back to the idea of frequency domain processing F’( ) Input Image, I(x,y) (spatial domain) Mathematical Transformation F( ) Transformed Image F(u, v) Processing F(u,v) Inverse Transformation F ’ ( ) Output Image, I’(x,y) (spatial domain) F’F’ To achieve smoothing, low-pass filtering, we attenuate the higher frequency part of F(u)

20 G52IIP, School of Computer Science, University of Nottingham 20 Image Transforms Now, come back to the idea of frequency domain processing F’( ) Input Image, I(x,y) (spatial domain) Mathematical Transformation F( ) Transformed Image F(u, v) Processing F(u,v) Inverse Transformation F ’ ( ) Output Image, I’(x,y) (spatial domain) F’F’ To achieve sharpening, low-pass filtering, we attenuate the lower frequency part of F(u)

21 G52IIP, School of Computer Science, University of Nottingham 21 Image Transforms Band limiting signals – A signal’s Fourier transform equal to zero above a certain finite frequency All images (natural signals) are band limiting signals F(u)

22 G52IIP, School of Computer Science, University of Nottingham 22 Frequency Domain Processing In practice Matlab f2=fft2(im); f2=fftshift(f2); fabs2=FH_abs(f2); (calculate magnitude, FFT are complex number) imshow(fabs2) im

23 G52IIP, School of Computer Science, University of Nottingham 23 Frequency Domain Processing Another example

24 G52IIP, School of Computer Science, University of Nottingham 24 Convolution and Spatial Filtering Spatial filtering is the convolution between the input image and the filtering mask f(x,y) w(x,y) f(x,y)*w(x,y)

25 G52IIP, School of Computer Science, University of Nottingham 25 Frequency Domain Processing The foundation of frequency domain techniques is the convolution theorem

26 G52IIP, School of Computer Science, University of Nottingham 26 Frequency Domain Processing H(u, v) is called the transfer function

27 G52IIP, School of Computer Science, University of Nottingham 27 Frequency Domain Processing Typical lowpass filters and their transfer functions

28 G52IIP, School of Computer Science, University of Nottingham 28 Frequency Domain Processing Typical lowpass filters and their transfer functions

29 G52IIP, School of Computer Science, University of Nottingham 29 Frequency Domain Processing Example

30 G52IIP, School of Computer Science, University of Nottingham 30 Frequency Domain Processing Example

31 G52IIP, School of Computer Science, University of Nottingham 31 Frequency Domain Processing Typical lowpass filters and their transfer functions

32 G52IIP, School of Computer Science, University of Nottingham 32 Frequency Domain Processing Example

33 G52IIP, School of Computer Science, University of Nottingham 33 Frequency Domain Processing Typical lowpass filters and their transfer functions

34 G52IIP, School of Computer Science, University of Nottingham 34 Frequency Domain Processing Example

35 G52IIP, School of Computer Science, University of Nottingham 35 Frequency Domain Processing Example

36 G52IIP, School of Computer Science, University of Nottingham 36 Frequency Domain Processing Example

37 G52IIP, School of Computer Science, University of Nottingham 37 Frequency Domain Processing Typical highpass filters and their transfer functions

38 G52IIP, School of Computer Science, University of Nottingham 38 Frequency Domain Processing Typical highpass filters and their transfer functions

39 G52IIP, School of Computer Science, University of Nottingham 39 Frequency Domain Processing Typical highpass filters and their transfer functions

40 G52IIP, School of Computer Science, University of Nottingham 40 Frequency Domain Processing Examples

41 G52IIP, School of Computer Science, University of Nottingham 41 Frequency Domain Processing Examples

42 G52IIP, School of Computer Science, University of Nottingham 42 Frequency Domain Processing Examples

43 G52IIP, School of Computer Science, University of Nottingham 43 Frequency Domain Processing More examples

44 G52IIP, School of Computer Science, University of Nottingham 44 Frequency Domain Processing Examples

45 G52IIP, School of Computer Science, University of Nottingham 45 Frequency Domain Processing Examples

46 G52IIP, School of Computer Science, University of Nottingham 46 Frequency Domain Processing Spatial vs frequency domain

47 G52IIP, School of Computer Science, University of Nottingham 47 Frequency Domain Processing Spatial vs frequency domain

48 G52IIP, School of Computer Science, University of Nottingham 48 Frequency Domain Processing Examples


Download ppt "G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Basic idea Input Image, I(x,y) (spatial domain) Mathematical Transformation."

Similar presentations


Ads by Google