Docsity

Digital Image Processing Assignment 3: Signal Sampling and Image Compression, Assignments of Digital Signal Processing

Toggle sidebar
bg1
Digital Image Processing ECE 533
Assignment 3
Due date: February 26th, in class
Department of Electrical and Computing Engineering,University of New Mexico.
Professor Majeed Hayat, [email protected]
February 18, 2008
1 Questions on sampling
1. The signal y(t) = cos(2πt), −∞ < t < ∞, is to be sampled using a sampling rate of
fs=T−1. An ideal low-pass filter given by
H(ω) =
f−1
s,|ω| ≤ B
0,|ω|> B,
(1)
is used to reconstruct yfrom ys.
(a) What is the minimum fs(the Nyquist rate) that will insure a perfect recon-
struction of yfrom ys? (Support your answer with graphical Fourier analysis.)
(b) For a given sampling frequency fsbeyond the Nyquist rate, what are the mini-
mum and maximum values of Bfor which perfect reconstruction is guaranteed.
Explain what would go wrong if these conditions were not met by the filter.
(Support your answer with graphical Fourier analysis.)
1
pf3
pf4

Partial preview of the text

Download Digital Image Processing Assignment 3: Signal Sampling and Image Compression and more Assignments Digital Signal Processing in PDF only on Docsity!

Digital Image Processing ECE 533

Assignment 3

Due date: February 26th, in class

Department of Electrical and Computing Engineering, University of New Mexico.

Professor Majeed Hayat, [email protected]

February 18, 2008

1 Questions on sampling

  1. The signal y(t) = cos(2πt), −∞ < t < ∞, is to be sampled using a sampling rate of

f s

= T

− 1

. An ideal low-pass filter given by

H(ω) =

f

− 1

s

, |ω| ≤ B

0 , |ω| > B,

is used to reconstruct y from y s

(a) What is the minimum f s

(the Nyquist rate) that will insure a perfect recon-

struction of y from y s

? (Support your answer with graphical Fourier analysis.)

(b) For a given sampling frequency fs beyond the Nyquist rate, what are the mini-

mum and maximum values of B for which perfect reconstruction is guaranteed.

Explain what would go wrong if these conditions were not met by the filter.

(Support your answer with graphical Fourier analysis.)

(c) Study the attached MATLAB code. For a fixed sampling time T satisfying

the Nyquist condition, what are the minimum and maximum values of the

bandwidth parameter p for which perfect reconstruction is possible?

(d) Set T =

2

5

, and run the program for the following values of p: {

1

2

4

5

6

5

3

2

Plot the reconstructed signal in each case and compare it to the original signal.

Discuss your results (in each case) thoroughly addressing the following issues:

  • aliasing,
  • suitability of the bandwidth of the filter,
  • any discrepancy in the amplitude of the reconstructed signal in comparison

to the original signal,

  • any changes in behavior of the reconstructed signal near the ends of the time

interval [− 2 , 2], and

  • the frequency components of the reconstructed signal.

You are encouraged to use graphical Fourier analysis to support you results.

(e) Now fix p at

6

5

, and increase T until the reconstructed signal is reasonably

distorted. What is the corresponding T? Explain.

(f) If we are forced to use a filter with B = 6π rad/s, what is the requirement on

T so that an alias-free reconstruction is achieved? Support your answer using

the MATLAB program.

  1. Consider now the 2D signal z(x, y) = cos(2πx), −∞ < x < ∞, −∞ < y < ∞, which

is to be sampled using uniform sampling with sampling frequencies fs,x and fs,y

in the x and y spatial-directions, respectively. Consider that the ideal rectangular

spatial low-pass filter given by

H(ω x

, ω y

f

− 1

s,x

f

− 1

s,y

, |ω x

| ≤ B

x

and |ω x

| ≤ B

x

0 , otherwise,

is used to reconstruct z from zs. Answer questions 1a to 1d under this new 2D

scenario. You must display any necessary reconstructed images in support of your

answers.

  1. Next, consider the 2D signal z(x, y) = cos(2π(x + y)), −∞ < x < ∞, −∞ < y <

and the λm,n are scalars. Therefore, from equation 3 we see that the original image is

written as a linear combination of M ×N scalars (the λm,n) and M ×N basis images (which

are obtained computing the outer product u m

v

T

n

). Recall that for unitary transformations

the following relations hold: UU

T = I and VV

T = I.

Derive a theoretical expression to calculate the coefficients λ m,n

. Then, calculate those

coefficients for some standard images available in MATLAB. By standard MATLAB im-

ages we mean some images included in most of the MATLAB packages. Try for example

the following commands: imread(’pout.tif’), imread(’trees.tif’), imread(’text.png’), or im-

read(’cameraman.tif’). For further references see MATLAB documentation. Show images

of the matrix of coefficients Λ. Compare such images with the images of a 2D FFT of the

same images.

Finally, you have to implement two simple image compression algorithms. The first

algorithm simply discards N high-frequency components in each spatial-frequency direc-

tion. The second algorithm keeps all the spatial-frequency components but truncates the

FFT coefficients using no more than M decimal places per coefficient. Tune the param-

eters N and M of the algorithms so that the visual quality of the “compressed images”

is still acceptable. Explain why one achieves some compression by using these simple

algorithms. You must display all necessary images in support of your answers.