Top Banner
DREAM PLAN IDEA IMPLEMENTATION 1
52

DREAM

Jan 07, 2016

Download

Documents

spiro

DREAM. IDEA. PLAN. IMPLEMENTATION. Introduction to Image Processing. Present to: Amirkabir University of Technology (Tehran Polytechnic) & Semnan University. Dr. Kourosh Kiani Email: [email protected] Email: [email protected] Email : [email protected] - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DREAM

DREAMDREAM

PLANPLANIDEAIDEA

IMPLEMENTATIONIMPLEMENTATION1

Page 3: DREAM

3

Introduction to Image ProcessingIntroduction to Image Processing

Dr. Kourosh KianiEmail: [email protected]: [email protected]: [email protected]: www.kouroshkiani.com

Present to:Amirkabir University of Technology (Tehran

Polytechnic) & Semnan University

Page 4: DREAM

4

Lecture 07FOURIER SERIES

Lecture 07FOURIER SERIES

Page 5: DREAM

5

Periodic functions play a very important role in the study of dynamical systems Definition: A function f (t) is said to be periodic of period T, if for all t D(f) , we have f (t + T) = f (t)

Periodic Functions

otherwise

Ttfortftf

0

0)()(

Page 6: DREAM

6

otherwise

TtTfortfTtuTtf

0

2)()()(

)3()3()2()2()()()()( TtuTtfTtuTtfTtuTtftftf

0

)()()(n

nTtunTtftf

Page 7: DREAM

7

Periodic Signals

A periodic signal f(t)Unchanged when time-shifted by one periodTwo-sided: extent is t (-, )May be generated by periodically extending one periodArea under f(t) over any interval of duration equal to the period is

the same; e.g., integrating from 0 to T0 would give the same value as integrating from –T0/2 to T0 /2

n

nTtunTtftf )()()(

Page 8: DREAM

8

Samples of periodic signalsA

mpl

itude

(v

olts

)A

mpl

itude

(v

olts

)

0

A

A

-A

0

-A

T=1/f

T=1/f

Sine Wave

Square Wave

Am

plitu

de

(vol

ts)

A

0

-A

T=1/f

Triangular Wave

Page 9: DREAM

9

3602360

)sin()(

incyclesnnn

amplitudeA

ntAtf

2

1

2

1

360

1

)sin()(

amplitude

ttf

2

2

2

360

5

)2sin(5)(

amplitude

ttf

Page 10: DREAM

10

Examples

)sin()( ttf )3sin(3

1)( ttf

Page 11: DREAM

11

Function Amplitude Period

3

2

1

5

)5sin(3)( ttf 5

2

)3cos(2)( ttf 3

2

)2

sin()(t

tf 4

)4cos(5)( ttf 2

Examples

Page 12: DREAM

12

Common PeriodConsider two periodic function f1(t) and f2(t) with respectively periods T1 and T2. If the ratio T1/T2 is a rational number, then

T=n1T1=n2T2

is a common period of f1(t) and f2(t)

2

1

2

1

2222

1111

2)cos()(

2)cos()(

w

w

T

T

wTtwtf

wTtwtf

If T1/T2 is a rational number, the cos(w1t) and cos(w2t) have a common period. If T1/T2 is irrational, they do not have a common period.

Page 13: DREAM

13

ExampleWhat is period of the function

)22cos()20cos()( tttf

20

2220)20cos()(

1111

wTwttf

22

2222)22cos()(

2222

wTwttf

1122

210

20

21110

10

11

222202

212

1 TTTT

T

Page 14: DREAM

14

ExampleWhat is period of the function

)2cos()cos()( tttf

2

1

221)cos()(

1111

wTwttf

2

222)2cos()(

2222

wTwttf

2

2

22

2

1

T

TThe f(t) is not periodic.

Page 15: DREAM

15

ExampleWhat is period of the function

)cos(4

3)3cos(

4

1)( tttf

3

223)3cos(

4

1)(

1111

wTwttf

2

1

221)cos(

4

3)(

2222 w

Twttf

21.233

21.3.

3

1

123

2

212

1 TTTT

T

Page 16: DREAM

16

ExampleWhat is period of the function

8

3)2cos(

2

1)4cos(

8

1)( tttf

24

224)4cos(

8

1)(

1111

wTwttf

2

222)2cos(

2

1)(

2222 wTwttf

1.22

1.2.2

1

1

221

2

1 TTTT

T

8

3)(3 tf

Page 17: DREAM

17

Analytic description of a periodic function

Page 18: DREAM

18

Analytic description of a periodic function

Page 19: DREAM

19

Analytic description of a periodic function

Page 20: DREAM

20

Analytic description of a periodic function

Page 21: DREAM

21

Analytic description of a periodic function

Page 22: DREAM

22

Orthogonal functionsIf two different functions f(x) and g(x) are defined on the interval a ≤x≤ b and

Then we say that the two functions are orthogonal to each other on the interval a ≤x≤ b. The trigonometric functions sin(nx) and cos(nx) where n=0, 1, 2,…. Form an infinite collection of periodic functions that are mutually orthogonal on the interval , indeed on any interval of width That is

b

a

dxxgxf 0)()(

x 2

nmfordxnxmx

0)cos()cos( nmfordxnxmx

0)sin()sin(

0)sin()cos( dxnxmx

Page 23: DREAM

23

Fourier seriesWe turn now to our main objective: the study of properties of linear combinations of the functions

These functions are periodic with common period .

Therefore, any linear combination is also periodic with period T.

The most general function that can be so formed is an infinite sum:

This is the Fourier series expansion of f(x) where the an and bn are constants called the Fourier coefficients. But how do we find the values of these constants?

)sin()cos( 00 tnandtn

0

2

T

1

0 )sin()cos(2

)(n

nn nxbnxaa

tf

Page 24: DREAM

24

Fourier coefficients

dxmxxfa

so

abaa

dxmxnxbdxmxnxadxmxa

mxnxbnxaa

dxmxtf

m

nmn

nmnn

nn

nn

nnn

)cos()(1

002

)cos()sin()cos()cos()cos(2

)cos()sin()cos(2

)cos()(

11

0

11

0

1

0

1

0 )sin()cos(2

)(n

nn nxbnxaa

tf

Page 25: DREAM

25

Fourier coefficients

dxmxxfb

so

bbaa

dxmxnxbdxmxnxadxmxa

mxnxbnxaa

dxmxtf

m

nmmnn

nn

nn

nn

nnn

)sin()(1

002

)sin()sin()sin()cos()sin(2

)sin()sin()cos(2

)sin()(

1,

1

0

11

0

1

0

1

0 )sin()cos(2

)(n

nn nxbnxaa

tf

Page 26: DREAM

26

Summary Fourier series

1

0 )sin()cos(2

)(n

nn nxbnxaa

tf

0)2

cos()(2 2

2

ndxT

xnxf

Ta

T

Tn

0)2

sin()(2 2

2

ndxT

xnxf

Tb

T

Tn

2

2

0 )(1

T

T

dxxfT

a

Page 27: DREAM

27

Dirichlet ConditionsIf a function f(t) is such that:(a) f(t) is defined, single-valued and periodic(b) f(t) and f ’(t) have at most a finite number of finite discontinuities

over a single period – that is they are piecewise continuous.Then the series

Where

Converges to f(t)

1

0 )sin()cos(2 n

nn nxbnxaa

2

2

)cos()(2

T

Tn dxnxxfT

a

2

2

)sin()(2

T

Tn dxnxxfT

b

Page 28: DREAM

28

Example

Page 29: DREAM

29

Page 30: DREAM

30

Page 31: DREAM

31

Fourier components of square wave

)}3{2sin(

3

1)2sin(

4)( tftfts

1,0

0.0

-1.0

0.0 0.50T 1.00T 1.50T 1.75T0.25T 0.75T 1.25T 2.00T

0.0 0.50T

1.00T

1.50T

1.75T

0.25T

0.75T

1.25T

2.00T

1,0

0.0

-1.0

)(ts

)(ts

Page 32: DREAM

32

The spectrum of a signal is a graphical representation of the relative amounts of signal as a function of frequency.

Fourier components and spectra of square wave

Modified from Stallings (2000) fig. 3.5

)ff()ff()f(S

)t}f{sin()tfsin()t(s

00 3314

3231

24

0 f 2f 3f 4f

0.0 0.50T 1.00T 1.50T 1.75T0.25T 0.75T 1.25T 2.00T

..1,0

0.0

-1.0

1.5

1.0

0.5

0.0

)(ts

)( fS

Page 33: DREAM

33

Fourier components of a square wave

)}7{2sin(

7

1)}5{2sin(

5

1)}3{2sin(

3

1)2sin(

4)( tftftftfts

0.0 0.50T 1.00T 1.50T 1.75T0.25T 0.75T 1.25T 2.00T

0.0 0.50T 1.00T 1.50T 1.75T0.25T 0.75T 1.25T 2.00T

1,0

0.0

-1.0

1,0

0.0

-1.0

)(ts

)(ts

Page 34: DREAM

34

)7(7

1)5(

5

1)3(

3

1)(

4)(

)}7{2sin(7

1)}5{2sin(

5

1)}3{2sin(

3

1)2sin(

4)(

0000 fffffffffS

tftftftfts

)( fS

0.0 0.50T 1.00T 1.50T 1.75T0.25T 0.75T 1.25T 2.00T

1.5

1.0

0.5

0.0

0 1f 2f 3f 4f 5f 6f 7f 8f 9f

1,0

0.0

-1.0

)(ts

Fourier components and spectra of square wave

Page 35: DREAM

35

Spectrum

f 3f 5f

f 3f 5f 9f7f

7f 9f

Fourier components and spectra of wave

Page 36: DREAM

36

The absolute bandwidth of a signal is the width of the spectrum, that is the width of the frequency range containing any signalThe effective bandwidth of a signal is the width of the portion of the spectrum containing ‘significant’ energy

)( fS

0.0 0.50T 1.00T 1.50T 1.75T0.25T 0.75T 1.25T 2.00T

1,0

0.0

-1.0

)(ts

Bandwidth = 7f –f = 6f

1.5

1.0

0.5

0.00 1f 2f 3f 4f 5f 6f 7f 8f 9f

)7(7

1)5(

5

1)3(

3

1)(

4)(

)}7{2sin(7

1)}5{2sin(

5

1)}3{2sin(

3

1)2sin(

4)(

0000 fffffffffS

tftftftfts

Page 37: DREAM

37

Page 38: DREAM

38

Page 39: DREAM

39

Page 40: DREAM

40

Page 41: DREAM

41

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

Ideally need infinite terms.

Page 42: DREAM

42

Fourier series with n = 20 Fourier series with n = 100

Page 43: DREAM

43

Page 44: DREAM

44

Example. Find the Fourier series of the function

xxxf )(

Answer. Since f(x) is odd, then an = 0, for n≥0. We turn our attention to the coefficients bn. For any n≥0 , we have

12

)1(2

)cos(2)sin()cos(1

)sin(1

n

n nnx

nn

nx

n

nxxdxnxxb

3

)3sin(

2

)2sin()sin(2)(

xxxxf

Page 45: DREAM

45

Example. Find the Fourier series of the function

x

xxf

0

00)(

10)cos(1

20

1

0

0

00

ndxnxadxdxa n

nn nnx

ndxnxb )1(1

1)cos(1

1)sin(

1

0

12

20 122

nbb nn

5

)5sin(

3

)3sin()sin(2

2)(

xxxxf

Page 46: DREAM

46

Example. Find the Fourier series of the function

x

xxf

02

02)( 0

22

1 0

00

dxdxa

Since this function is the function of the example above minus the constant    . So Therefore, the Fourier series of f(x) is 2

5

)5sin(

3

)3sin()sin(2)(

xxxxf

Page 47: DREAM

47

Example. Find the Fourier series of the function

20

020)(

xx

xxf

1)1(2)cos(2

)2

sin(4

2

1)1)1(()2

(2

1)1)(cos()

2(

2

1)

2cos(

4

2

2

10

4

1

4

1

1

0

22

0

0

2

2

0

2

20

nfornn

ndx

xnxb

nforn

nn

dxx

nxa

xdxdxxdxa

nn

nn

1

122

)2

sin()1(2

)2

cos()1)1((2

2

1)(

n

nn xn

n

xn

nxf

Page 48: DREAM

48

Example

. as amplitudein decrease and

161

8 504.0 2sin

2

161

2 504.0 2cos

2

504.0121

2sin2cos

20

2

20

2

2

0

20

10

nba

n

ndtnteb

ndtntea

edtea

ntbntaatf

nn

t

n

t

n

t

nnn

Fundamental period

T0 = p Fundamental frequency

f0 = 1/T0 = 1/ p Hz

w0 = 2 p /T0 = 2 rad/s

0 p-p

1e-t/2

f(t)

12

2sin42cos161

21504.0

n

ntnntn

tf

Page 49: DREAM

49

Example

Fundamental period

T0 = 2 Fundamental frequency

f0 = 1/T0 = 1/2 Hz

w0 = 2p/T0 = p rad/s

0 1-1

A

f(t)

-A

,15,11,7,38

,13,9,5,18

even is 0

22

22

nn

A

nn

An

bn

2/3

2/1

2/1

2/1

0

10

) sin( ) 22(2

2

) sin( 22

2

symmetric) odd isit (because 0

plot) theof inspection(by 0

sin) cos(

dttnπtAA

dttnπtAb

a

a

tnπbtnπaatf

n

n

nnn

Page 50: DREAM

50

Gibbs phenomenonGibbs phenomenon

-1.5

-1

-0.5

0

0.5

1

1.5

0 2 4 6 8 10t

sq

ua

re s

ign

al,

sw

(t)

79

1kk79 sin(kt)b-(t)sw

Overshoot exist @ each discontinuity

• Max overshoot pk-to-pk = 8.95% of discontinuity magnitude.Just a minor annoyance.

• FS converges to (-1+1)/2 = 0 @ discontinuities, in this case.

• First observed by Michelson, 1898. Explained by Gibbs.

Page 51: DREAM

Questions? Discussion? Suggestions?

Page 52: DREAM

52