3. Lecture Fourier Transformation Sampling Some slides taken from - - PowerPoint PPT Presentation

3 lecture fourier transformation sampling
SMART_READER_LITE
LIVE PREVIEW

3. Lecture Fourier Transformation Sampling Some slides taken from - - PowerPoint PPT Presentation

3. Lecture Fourier Transformation Sampling Some slides taken from Digital Image Processing: An Algorithmic Introduction using Java, Wilhelm Burger and Mark James Burge Separability The 2D DFT can be separated in two 1D DFT's: M 1 N


slide-1
SLIDE 1
  • 3. Lecture

Fourier Transformation Sampling

Some slides taken from “Digital Image Processing: An Algorithmic Introduction using Java”, Wilhelm Burger and Mark James Burge

slide-2
SLIDE 2

Separability

2

² The 2D DFT can be separated in two 1D DFT's: F(u; v) = 1 MN

M¡1 X x=0 N¡1 X y=0

f(x; y)e¡j2¼(ux=M+vy=N) = 1 M

M¡1 X x=0 2 4e¡j2¼ux=M 1

N

N¡1 X y=0

f(x; y)e¡j2¼vy=N

3 5

² The DFT can be obtained in two successive ap- plications of 1D transforms

slide-3
SLIDE 3

Separability

3

² First compute the 1D DFT's for all the rows ² Second compute the 1D DFT's for all the columns ² And each of the 1D DFT's can be carried out as FFT of course

slide-4
SLIDE 4

Separability

4

² Also the inverse transform can be separated: f(x; y) =

M¡1 X u=0 N¡1 X v=0

F(u; v)ej2¼(ux=M+vy=N) =

M¡1 X u=0 2 4ej2¼ux=M N¡1 X v=0

F(u; v)ej2¼vy=N

3 5

slide-5
SLIDE 5

Example: Separability

5

² Matlab example using the 2D FFT function: ² Matlab example using two 1D FFT function calls:

fft2(magic(3)) ans = 45.0000 0 0 0 + 0.0000i 13.5000 + 7.7942i 0.0000 - 5.1962i 0 - 0.0000i 0.0000 + 5.1962i 13.5000 - 7.7942i fft(fft(magic(3)).').' ans = 45.0000 0 0 0 + 0.0000i 13.5000 + 7.7942i 0.0000 - 5.1962i 0 - 0.0000i 0.0000 + 5.1962i 13.5000 - 7.7942i

slide-6
SLIDE 6

Symmetry and periodicity

6

² If f(x; y) is real (e.g. an image), its Fourier transform is conjugate symmetric ² Additionally the DFT is in¯nitely periodic

slide-7
SLIDE 7

Symmetry and periodicity

7

² The same property holds for the 2D case

slide-8
SLIDE 8

Translation in the Fourier domain

8

² A translation (u0; v0) in the Fourier domain re- sult in F(u ¡ u0; v ¡ v0) ( ) f(x; y)ej2¼(u0x+v0y)=N ² The origin of the Fourier domain is shifted to the point (u0; v0) ² A special case is u0 = v0 = N=2, here the ex- ponential term ej¼(x+y) ¡ 1x+y f(x; y)(¡1)x+y ( ) F(u ¡ N=2; v ¡ N=2) ² The origin will be moved from (0; 0) to the cen- tre of the image

slide-9
SLIDE 9

Example: Translation

9

slide-10
SLIDE 10

Rotation

10

² A rotation in the spatial domain rotates the Fourier domain by the same angle and vice versa.

slide-11
SLIDE 11

Examples:

11 DFT image scaling. The rectangular pulse in the image function (a–c) creates a strongly

  • scillating power spectrum

(d–f), as in the one- dimensional case. Stretching the image causes the spectrum to contract and vice versa.

slide-12
SLIDE 12

Examples:

12 DFT—oriented, repetitive

  • patterns. The image

function (a–c) contains patterns with three dominant orientations, which appear as pairs of corresponding frequency spots in the spectrum (c–f). Enlarging the image causes the spectrum to contract.

slide-13
SLIDE 13

Examples:

13 DFT —image rotation. The original image (a) is rotated by 15deg (b) and 30deg (c). The corresponding (squared) spectrum turns in the same direction and by exactly the same amount (d–f).

slide-14
SLIDE 14

Examples:

14 DFT—superposition of image patterns. Strong,

  • riented subpatterns

(a–c) are easy to identify in the corresponding spectrum (d–f). Notice the broadband effects caused by straight structures, such as the dark beam on the wall in (b, e).

slide-15
SLIDE 15

Examples:

15 DFT—natural image

  • patterns. Examples of

repetitive structures in natural images (a–c) that are also visible in the corresponding spectrum (d–f).

slide-16
SLIDE 16

Examples:

16 DFT—natural image patterns with no dominant

  • rientation. The repetitive

patterns contained in these images (a–c) have no common orientation or sufficiently regular spacing to stand out locally in the orresponding Fourier spectra (d–f).

slide-17
SLIDE 17

Examples:

17 DFT of a print pattern. The regular diagonally oriented raster pattern (a, b) is clearly visible in the corresponding power spectrum (c). It is possible (at least in principle) to remove such patterns by erasing these peaks in the Fourier spectrum and reconstructing the smoothed image from the modified spectrum using the inverse DFT.

slide-18
SLIDE 18

Correcting the geometry

18 Correcting the geometry of the 2D spectrum. Original image (a) with dominant oriented patterns that show up as clear peaks in the corresponding spectrum (b). Because the image and the spectrum are not square (M = N), orientations in the image are not the same as in the actual spectrum (b). After the spectrum is scaled to square size (c), we can clearly observe that the cylinders of this (Harley-Davidson V-Rod) engine are really spaced at a 60◦ angle.

slide-19
SLIDE 19

Windowing

19 Effects of periodicity in the 2D

  • spectrum. The discrete Fourier

transform is computed under the implicit assumption that the image signal is periodic along both dimensions (top). Large differences in intensity at

  • pposite image borders—here

most notably in the vertical direction— lead to broad-band signal components that in this case appear as a bright line along the spectrum’s vertical axis (bottom).

slide-20
SLIDE 20

Windowing

20

slide-21
SLIDE 21

Fourier basis functions

² Fourier transform represents signal in terms of sine and cosine (basis functions) ² Magnitude gives frequency, direction gives orientation ² Fourier basis element e¡j2¼(ux+vy) = cos(2¼(ux + vy)) ¡ j sin(2¼(ux + vy))

21

slide-22
SLIDE 22

Fourier basis functions

22

² Here u and v are larger than in the previous slide

slide-23
SLIDE 23

Fourier basis functions

23

² And larger still

slide-24
SLIDE 24

Fourier basis functions

24

² Fourier basis elements e¡j2¼(ux+vy) = cos(2¼(ux + vy)) ¡ j sin(2¼(ux + vy))

slide-25
SLIDE 25

Convolution and Correlation

25

² Convolution: Operator on two sequences that represents a ¯ltering operation ² Correlation: Correlation is a measure of simi- larity between two signals

slide-26
SLIDE 26

Discrete Convolution

26

² f(x) ¤ g(x) = 1 M

M¡1 X m=0

f(m)g(x ¡ m) ² M ¸ A + B ¡ 1 where A is the length of f and B is the length of g ² f(x; y)¤g(x; y) = 1 MN

M¡1 X m=0 N¡1 X n=0

f(m; n)g(x¡m; y¡n) ² A£B and C £D are the arrays for f(x; y) and g(x; y) M ¸ A + C ¡ 1 N ¸ B + D ¡ 1

slide-27
SLIDE 27

Example: Convolution

27

slide-28
SLIDE 28

Example: 2D convolution

28

slide-29
SLIDE 29

Discrete Correlation

29

² The correlation of two functions f(x) and g(x) is: 1D : f(x) ± g(x) = 1 M

M¡1 X m=0

f ¤(m)g(x + m) 2D : f(x; y)±g(x; y) = 1 MN

M¡1 X m=0 N¡1 X n=0

f ¤(m; n)g(x+m; y+n) ² ¤ is the complex conjugate

slide-30
SLIDE 30

Correlation theorem

30

A correlation in the spatial domain is a multipli- cation with the complex conjugate in the Fourier domain and vice versa. f(x) ± g(x) , F ¤(u)G(u) f(x; y) ± g(x; y) , F ¤(u; v)G(u; v) and f ¤(x)g(x) , F(u) ± G(u) f ¤(x; y)g(x; y) , F(u; v) ± G(u; v)

slide-31
SLIDE 31

Example: Correlation

31

slide-32
SLIDE 32

Example: 2D correlation

32

slide-33
SLIDE 33

Sampling

33

² Sampling can be described as the multiplication

  • f a signal with a sequence of impulse functions
slide-34
SLIDE 34

Sampling with the impulse function

34

slide-35
SLIDE 35

The comb function

35

slide-36
SLIDE 36

The comb function

36

slide-37
SLIDE 37

Sampling in Fourier domain

37

² Multiplication of signal with comb function in time domain, is convolution of them in Fourier domain g(x)III(x) , G(u) ¤ III(u)

slide-38
SLIDE 38

Sampling: Fourier domain

38

A X x f(x)

slide-39
SLIDE 39

Reconstruction filters

50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250

Square pixels

spatial Fourier spatial Fourier spatial Fourier spatial Fourier

Bilinear interpolation Gaussian reconstruction filter Perfect reconstruction filter

39

slide-40
SLIDE 40

Harmon & Julesz 1973

Image reconstruction: pixelization

square pixels Gaussian reconstruction

40

slide-41
SLIDE 41

Sampling: Aliasing effect

41

slide-42
SLIDE 42

Nyquist theorem

42

² Nyquist theorem: The sampling frequency must be at least twice the highest frequency !s ¸ 2! ² If this is not the case the signal needs to be bandlimited before sampling, e.g. with a low- pass ¯lter

slide-43
SLIDE 43

Aliasing effect

43

² Sampling without smoothing: Top row shows the images, sampled at every second pixel to get the next; bottom row shows the magnitude spectrum of these images. ² Nyquist criterium not ful¯lled (aliasing artifacts)

slide-44
SLIDE 44

Aliasing effect

44

² Sampling with smoothing: We get the next im- age by smoothing the image with a Gaussian with sigma 1 pixel, then sampling at every sec-

  • nd pixel.