Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) =...

15
C. A. Bouman: Digital Image Processing - January 7, 2020 1 Continuous Space Fourier Transform (CSFT) Forward CSFT: F (u, v )= −∞ −∞ f (x, y )e j 2π(ux+vy ) dxdy Inverse CSFT: f (x, y )= −∞ −∞ F (u, v )e j 2π(ux+vy ) dudv Space coordinates: 1. Usually, x is horizontal and y is vertical coordinate 2. Usually, y points down 3. Raster order - Television scans rapidly from left to right and more slowly from top to bottom. Frequency coordinates: 1. u corresponds to horizontal frequency components (ver- tical strips). 2. v corresponds to vertical frequency components (hori- zontal strips).

Transcript of Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) =...

Page 1: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 1

Continuous Space Fourier Transform (CSFT)

Forward CSFT:

F (u, v) =

∫ ∞

−∞

∫ ∞

−∞f (x, y)e−j2π(ux+vy)dxdy

Inverse CSFT:

f (x, y) =

∫ ∞

−∞

∫ ∞

−∞F (u, v)ej2π(ux+vy)dudv

• Space coordinates:

1. Usually, x is horizontal and y is vertical coordinate

2. Usually, y points down

3. Raster order - Television scans rapidly from left to

right and more slowly from top to bottom.

• Frequency coordinates:

1. u corresponds to horizontal frequency components (ver-

tical strips).

2. v corresponds to vertical frequency components (hori-

zontal strips).

Page 2: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 2

Useful Continuous Space Signal Definitions

δ(x, y)△= δ(x) δ(y)

rect(x, y)△= rect(x) rect(y)

sinc(x, y)△= sinc(x) sinc(y)

circ(x, y)△= rect(

x2 + y2)

• A 2-D function f (x, y) is said to be separable if it is

formed by the product of two 1-D functions.

f (x, y) = g(x)h(y)

rect(x, y), sinc(x, y), and δ(x, y) are separable functions.

• Is circ(x, y) a separable function?

Page 3: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 3

CSFT Properties Inherited from CTFT

• Some properties of the CSFT are very similar to corre-

sponding CTFT properties.

Property Space Domain Function CSFT

Linearity af (x, y) + bg(x, y) aF (u, v) + bG(u, v)Conjugation f ∗(x, y) F ∗(−u,−v)Scaling f (ax, by) 1

|ab|F (u/a, v/b)

Shifting f (x− x0, y − y0) e−j2π(ux0+vy0)F (u, v)Modulation ej2π(u0x+v0y)f (x, y) F (u− u0, v − v0)Convolution f (x, y) ∗ g(x, y) F (u, v)G(u, v)Multiplication f (x, y)g(x, y) F (u, v) ∗G(u, v)Duality F (x, y) f (−u,−v)

• Inner product property∫ ∞

−∞

∫ ∞

−∞f (x, y)g∗(x, y)dx dy

=

∫ ∞

−∞

∫ ∞

−∞F (u, v)G∗(u, v)du dv

Page 4: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 4

Properties Specific to CSFT

• But some properties of the CSFT are quite unique to the

2-dimensional problem.

Property Space Domain Function CSFT

Separability f (x)g(y) F (u)G(v)

Rotation f

(

A

[

xy

])

|A|−1F(

[u, v]A−1)

Page 5: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 5

Separability of CSFT

F (u, v) =

∫ ∞

−∞

∫ ∞

−∞f (x, y)e−j2π(ux+vy)dxdy

=

∫ ∞

−∞

[∫ ∞

−∞f (x, y)e−j2πuxdx

]

e−j2πvydy

Define the CTFT of f (x, y) in the variable x

F̃ (u, y) =

∫ ∞

−∞f (x, y)e−j2πuxdx

Then the CSFT may be computed as the CTFT of F̃ (u, y) in

y

F (u, v) =

∫ ∞

−∞F̃ (u, y)e−j2πvydy

• Comment: 2-D CSFT can be computed as two 1-D CTFT’s.

Page 6: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 6

CSFT of Separable Functions

Let

g(t)CTFT⇔ G(f )

h(t)CTFT⇔ H(f )

Then

g(x)h(y)CSFT⇔ G(u)H(v)

Proof:

F (u, v) = CSFT {g(x)h(y)}=

∫ ∞

−∞

∫ ∞

−∞g(x)h(y) e−j2π(ux+vy)dxdy

=

∫ ∞

−∞

∫ ∞

−∞g(x)h(y) e−j2πuxe−j2πvydxdy

=

[∫ ∞

−∞g(x)e−j2πuxdx

] [∫ ∞

−∞h(y)e−j2πvydy

]

= G(u)H(v)

Page 7: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 7

Useful CSFT Transform Pairs

• 2-D delta function:

CSFT {δ(x, y)} = CSFT {δ(x)δ(y)}= CTFT {δ(x)} · CTFT {δ(y)}= 1 · 1 = 1

−4

−2

0

2

4

−4

−2

0

2

40

0.2

0.4

0.6

0.8

1

X Axis

delta(x,y)

Y Axis

⇒ 1

• 2-D rect function:

CSFT {rect(x, y)} = CSFT {rect(x)rect(y)}= CTFT {rect(x)} · CTFT {rect(y)}= sinc(u) sinc(v)

= sinc(u, v)

−4

−2

0

2

4

−4

−2

0

2

40

0.2

0.4

0.6

0.8

1

X Axis

rect(x,y)

Y Axis

−4

−2

0

2

4

−4

−2

0

2

4−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

X Axis

sinc(fx,fy)

Y Axis

Page 8: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 8

Rotated Functions

• Let the matrix A be an orthonormal rotation of angle θ

A =

[

cos(θ) sin(θ)− sin(θ) cos(θ)

]

• Because A is an orthonormal transform

|A| = 1

A−1 = A

t

• Then the CSFT of the function g

(

A

[

xy

])

is given by

CSFT

{

g

(

A

[

xy

])}

= |A|−1G(

[u, v]A−1)

= |A|−1G(

[u, v]At)

= G

(

A

[

uv

])

• So we have

g

(

A

[

xy

])

CSFT⇔ G

(

A

[

uv

])

Page 9: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 9

Rotated Rect Function

• Rotated 2-D rect function:

rect

(

y + x√2,y − x√

2

)

= rect

(

A

[

xy

])

where

A =

[

1√2

1√2

−1√2

1√2

]

• A is a 45◦ rotation, so it is and orthonormal transform

CSFT

{

rect

(

y + x√2,y − x√

2

)}

= CSFT

{

rect

(

A

[

xy

])}

= sinc

(

A

[

uv

])

= sinc

(

v + u√2,v − u√

2

)

Page 10: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 10

Rotated 2-D Rect and Sinc Transform Pairs

• Mesh plot

−4

−2

0

2

4

−4

−2

0

2

40

0.2

0.4

0.6

0.8

1

X Axis

rect((y+x)/sqrt(2),(y−x)/sqrt(2))

Y Axis

−4

−2

0

2

4

−4

−2

0

2

4−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

X Axis

sinc(fx,fy)

Y Axis

• Contour plot

−4 −3 −2 −1 0 1 2 3 4−4

−3

−2

−1

0

1

2

3

4rect((y+x)/sqrt(2),(y−x)/sqrt(2))

X Axis

Y A

xis ⇒

−4 −3 −2 −1 0 1 2 3 4−4

−3

−2

−1

0

1

2

3

4sinc(fx,fy)

X Axis

Y A

xis

Page 11: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 11

More Useful CSFT Transform Pairs

• Circ function:

CSFT {circ(x, y)} = jinc(u, v)

where

jinc(u, v) =J1

(

π√u2 + v2

)

2√u2 + v2

and J1(r) is the Bessel function of the first kind order 1.

−4

−2

0

2

4

−4

−2

0

2

40

0.2

0.4

0.6

0.8

1

X Axis

circ(x,y)

Y Axis

−4

−2

0

2

4

−4

−2

0

2

4−0.2

0

0.2

0.4

0.6

0.8

fx Axis

jinc(fx,fy)

fy Axis

• Notice that both functions are circularly symmetric

Page 12: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 12

CSFT of a Plane Wave

• Consider an impulse in the 2-D frequency domain.

F (u, v) = δ(u− uo, v − vo)

• Its inverse transform is a 2-D plane wave.

f (x, y) =

∫ ∞

−∞

∫ ∞

−∞δ(u− uo, v − vo)e

j2π(ux+vy)dudv

= ej2π(uox+voy)

• We know that

cos(2π(uox + voy)) =1

2

[

ej2π(uox+voy) + e−j2π(uox+voy)]

• So we have that

cos(2π(uox + voy))CSFT⇔ 1

2[δ(u− uo, v − vo) + δ(u + uo, v + vo)]

Page 13: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 13

2-D Plane Wave Example

• Example transform pair computed with Matlab 1

x axis

y ax

is

Cosine: U0=2 and V

0=−4

−1 0 1

−1.5

−1

−0.5

0

0.5

1

1.5

u axis

v ax

is

Frequency Response

−10 −5 0 5

−10

−8

−6

−4

−2

0

2

4

6

8

• Graphical representation of space-frequency domain

1/Vo

1/Uo

Po

Plane Wave in Space Domain Impulse in Frequency Domain

φ

φ

Vo

Uo

1/Po

– 1/P0 =√

V 20 + U 2

0

– Rotations in space and frequency

domains are the same.

1f(x, y) = cos (u0 x+ v0 y) + 0.5

Page 14: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 14

More Examples 2-D Plane Waves

x axis

y ax

is

Cosine: U0=3 and V

0=1

−1 0 1

−1.5

−1

−0.5

0

0.5

1

1.5

u axis

v ax

is

Frequency Response

−10 −5 0 5

−10

−8

−6

−4

−2

0

2

4

6

8

x axis

y ax

is

Cosine: U0=1 and V

0=2

−1 0 1

−1.5

−1

−0.5

0

0.5

1

1.5

u axis

v ax

is

Frequency Response

−10 −5 0 5

−10

−8

−6

−4

−2

0

2

4

6

8

Page 15: Continuous Space Fourier Transform (CSFT)bouman/ece637/notes/pdf/CSFT.pdf · rect(x,y) = rect(x)rect(y) sinc(x,y) = sinc(x)sinc(y) circ(x,y) = rect(p x2+y2) • A 2-D function f(x,y)

C. A. Bouman: Digital Image Processing - January 7, 2020 15

More Examples 2-D Plane Waves

x axis

y ax

is

Cosine: U0=0.5 and V

0=1

−1 0 1

−1.5

−1

−0.5

0

0.5

1

1.5

u axis

v ax

is

Frequency Response

−10 −5 0 5

−10

−8

−6

−4

−2

0

2

4

6

8

x axis

y ax

is

Cosine: U0=2 and V

0=4

−1 0 1

−1.5

−1

−0.5

0

0.5

1

1.5

u axis

v ax

is

Frequency Response

−10 −5 0 5

−10

−8

−6

−4

−2

0

2

4

6

8