Advanced Information Engineering

Post on 15-Feb-2022

6 views 0 download

Transcript of Advanced Information Engineering

Advanced Information Engineering

#8 November 30 (Mon), 2020Kenjiro T. Miura

Assignment #2 Ex.1 AnswerConsider 2-dimensional sinusoidal wave signal ga(x,y)=3 cos (2 ฯ€ x - 4 ฯ€ y + ฯ€/4)

Draw spectrum.ga(x,y)=3

2(๐‘’๐‘’๐‘—๐‘—(2๐œ‹๐œ‹(๐‘ฅ๐‘ฅโˆ’2๐‘ฆ๐‘ฆ)+๐œ‹๐œ‹4) + ๐‘’๐‘’๐‘—๐‘—(โˆ’2๐œ‹๐œ‹ ๐‘ฅ๐‘ฅโˆ’2๐‘ฆ๐‘ฆ โˆ’๐œ‹๐œ‹4))

Assignment #2 Ex.1 AnswerConsider 2-dimensional sinusoidal wave signal ga(x,y)=3 cos (2 ฯ€ x - 4 ฯ€ y + ฯ€/4)

Illustrate this wave assuming that its variables are x, y๏ผŽ

Assignment #2 Ex.2 AnswerCalculate a continuous signal which has spectrums given by Fig. 1.

(a) ga(x,y)= 2cos (2 ฯ€ y)+cos(4ฯ€y)

(b) ga(x,y)= cos (4 ฯ€ x+2ฯ€y-๐œ‹๐œ‹4

)

Assignment #2 Ex.3 AnswerPerform discrete spatial Fourier transform of each of the signals shown in Fig. 2.

(a) ๐บ๐บ(๐œ›๐œ›1,๐œ›๐œ›2)=1+๐‘’๐‘’โˆ’๐‘—๐‘—๐œ›๐œ›1 + ๐‘’๐‘’โˆ’๐‘—๐‘—๐œ›๐œ›2+๐‘’๐‘’โˆ’๐‘—๐‘—(๐œ›๐œ›1+๐œ›๐œ›2)

=4 cos(๐œ›๐œ›12

) cos(๐œ›๐œ›22

)๐‘’๐‘’โˆ’๐‘—๐‘—(๐œ›๐œ›1+๐œ›๐œ›2)

2

(b) ๐บ๐บ(๐œ›๐œ›1,๐œ›๐œ›2)=1+๐‘’๐‘’โˆ’๐‘—๐‘—๐œ›๐œ›2 + ๐‘’๐‘’โˆ’2๐‘—๐‘—๐œ›๐œ›2+๐‘’๐‘’โˆ’3๐‘—๐‘—๐œ›๐œ›2

=2 (cos(๐œ›๐œ›22

) cos(3๐œ›๐œ›22

))๐‘’๐‘’โˆ’๐‘—๐‘—3๐œ›๐œ›22

(c ) ๐บ๐บ(๐œ›๐œ›1,๐œ›๐œ›2)=๐‘’๐‘’๐‘—๐‘—๐œ›๐œ›1 + 1 + ๐‘’๐‘’โˆ’๐‘—๐‘—๐œ›๐œ›1 = 1 + 2cos(๐œ›๐œ›1)

Assignment #2 Ex.4 AnswerWhen a real-valued 2-dimensional discrete signal g(n1,n2) satisfies that g(n1,n2)=g(-n1,-n2), show that its discrete spatial Fourier transform (DSFT) G(w1,w2) is real-valued.

๐บ๐บ ๐œ›๐œ›1,๐œ›๐œ›2

= ๏ฟฝ๐‘›๐‘›1=โˆ’โˆž

โˆž

๏ฟฝ๐‘›๐‘›2=โˆ’โˆž

โˆž

๐‘”๐‘”(๐œ›๐œ›1,๐œ›๐œ›2)๐‘’๐‘’โˆ’๐‘—๐‘—๐œ›๐œ›1๐‘›๐‘›1 ๐‘’๐‘’โˆ’๐‘—๐‘—๐œ›๐œ›2๐‘›๐‘›2

Assignment #2 Ex.4 Answer

+

Assignment #2 Ex.5 AnswerConsider a 2-dimensional sinusoidal wave ga(x,y)=cos(2ฯ€ x + 4 ฯ€ y)๏ผŽIn order to satisfy the sampling theorem, we would like to sample as follows:g(n1,n2)=ga(x,y)|x=n1TS1,y=n2 TS2.Indicate the conditions for sampling intervals TS1 and TS2 to be satisfied๏ผŽ

๐น๐น๐‘ ๐‘ 1 = 1๐‘‡๐‘‡๐‘ ๐‘ 1

> 2 and ๐น๐น๐‘ ๐‘ 2 = 1๐‘‡๐‘‡๐‘ ๐‘ 2

> 4

Fast Fourier Transform๏ผˆFFT๏ผ‰

โ€ข FFT is a fast calculation version of discrete Fourier transform๏ผˆDFT๏ผ‰๏ผŽ

Discrete Fourier Transform๏ผˆDFT๏ผ‰โ€ข DSFT with frequency discretizationโ€ข In case where g(๐‘›๐‘›1,๐‘›๐‘›2)ใŒ is defined in N1ร—N2, a finite

domain, i.d. 2-dimensional image.

Where

Thus the values of DFT are sampled ones of DSFT obtained by the intervals uniform intervals of spectrum period/N1

and N2.

Periodicity of DFT

โ€ข The number of independent points in both of the spatial and frequency domains is N1ร—N2 and we assume their periodicity and perform calculations.

Exercise Exampleโ€ข 1 dimensional discrete signal of N points

You can use a calculator to calculate amplitude.Since (b) takes long time , please do (a).

Answer

โ€ข The larger N, the more sufficient sampling densityโ€ข For Fourier image analysis, how to make sure to get

sufficient sampling density?

Fast Fourier Transform๏ผˆFFT๏ผ‰

โ€ข FFT is to make DFT๏ผˆa lot of computational cost๏ผ‰faster.

โ€ข Without approximation error, it can perform DFT strictly.

โ€ข The method which takes advantage of Matrix decomposition method๏ผˆdecomposability of DFT๏ผ‰.

Matrix Decomposition๏ผˆdecomposability of DFT๏ผ‰

โ€ข Direct 2D DFT repeats N1ร—N2 DFT by N1ร—N2 times.โ€ข In case of matrix decomposition, for horizontal row

data perform N1 1D DFT by N2 times, then for column data perform N2 1D DFT by N1 times.

Exampleโ€ข (a): 2D image signalโ€ข (b): for (a), perform DFT horizontally

โ€ข (c): for (b), perform DFT vertically.

โ€ข (d): By using the periodicity of DFT,put DC component at the center.

Comparison of Operation Number

Sampling Effect

โ€ข Sampling generally gives signals distortions๏ผˆaliasing).

Sampling Theorem

โ€ข Theorem that give some condition to avoid the effects of sampling

Sampling Theoremโ€ข Fig.(a): 2D continuous signalโ€™s bandwidth is limited

by angular frequency ฮฉm1 and ฮฉm2.๏ผˆNo signal exists outside of the limited bandwidth.๏ผ‰

โ€ข Fig.(b): Assume rectangular sampling, 2D discrete signal has rectangular periodic spectrum.

Sampling Theorem

No overlap exists for spectrum.โ€ข Theoretically it is possible to reconstruct perfectly the original signal from sample values by filtering.

ๆŠ˜ใ‚Š่ฟ”ใ—ๆญชใฟ๏ผˆAliasing๏ผ‰โ€ข By sampling without keeping sampling theorem,the spectrums overlap and distort thecontinuous signal. This distortion (overlap of spectrums) is called aliasing๏ผŽ

Example๐‘”๐‘”๐‘Ž๐‘Ž (๐‘ฅ๐‘ฅ,๐‘ฆ๐‘ฆ) = cos(2๐œ‹๐œ‹๐‘ฅ๐‘ฅ + 4๐œ‹๐œ‹๐‘ฆ๐‘ฆ)

Calculate the maximum sapling intervals Ts1

and Ts2 to keep the sampling theorem.

Answer

โ€ข Since the spatial frequency is 1, 2 respectively in the x and y directions, the minimum sampling frequencies are 2, and 4 and their corresponding sampling intervals Ts1

and Ts2 are ยฝ and ยผ, respectively.

Basics of Multi-dimensional Filter

โ€ข Most of image processing perform filtering to remove or enhance specific frequency components.

โ€ข Today we will study about filtering in the spatial domain and frequency domain.

Typical Signalsโ€ข ๏ผ’D sinusoidal wave signal

โ€ข ๏ผ’D complex sinusoidal wave signal

โ€ข ๏ผ’D unit sample signal๏ผˆ2D unit impulse)

โ€ข ๏ผ’D unit step signal

Typical Signalsโ€ข 2D unit sample signal๏ผˆ2D impulse signal๏ผ‰

โ€ข ๏ผ’D unit step signal

Continuous Delta Function ฮด(t)

Example

Represent impulse ฮด(n1,n2) by 2D unit step signal u(n1,n2).

Answer

Example๏ผšImpulse Signalโ€ข 2D image is a set of 2D impulse signals.โ€ข Represent the following 2D images by using impulse ฮด(n1,n2).

Answers

Representation of 2D Image by Impulse

โ€ข By generalization,

Example Exercise

Answer

Exercise Example

What is the signal given by g(n1,n2) = โˆ‘๐‘˜๐‘˜1=0

โˆž โˆ‘๐‘˜๐‘˜2โˆž ๐›ฟ๐›ฟ(๐‘›๐‘›1 โˆ’ ๐‘˜๐‘˜1,๐‘›๐‘›2 โˆ’ ๐‘˜๐‘˜2)?

Answer

2D unit step signal u(n1,n2)

Separability of Signal

โ€ข If a 2D signal is represented by a product of two 1D signals, it is called a separable signal.

โ€ข If not, it is called a non-separable signal.

Example๏ผšSeparability of Signal

โ€ข Most general signal is non-separable.โ€ข Are 2D unit impulse signal and 2D unit steps signal separable?

Answer

See the left figure๏ผŽHence๏ผŒ

2D unit step signal is also separable.

Example

โ€ข Is the signal in Fig. 3.5 separable or non-separable?

Answer