(EIE529) Assignment 2
(EIE529) Assignment 2
Note:
1) This assignment contains two questions and carries 50 marks in total.
2) Your solutions should be submitted via Blackboard Collaborate before the deadline.
where 𝑃𝑓𝑓 (𝑢, 𝑣), 𝑃𝑔𝑔 (𝑢, 𝑣) and 𝑃𝜂𝜂 (𝑢, 𝑣) are the power spectral density of the original image,
degraded image, and addictive noise at frequency (𝑢, 𝑣), respectively. The frequency response
of the point spread function ℎ(𝑥, 𝑦) is denoted by 𝐻(𝑢, 𝑣), ∀𝑢, 𝑣 . (Hint: For a random
variable 𝑥, 𝑃𝑥𝑥 (𝑢, 𝑣) = 𝔼[|𝑋(𝑢, 𝑣)|2 ] = 𝔼[𝑋(𝑢, 𝑣)𝑋 ∗ (𝑢, 𝑣)], 𝑋 is the Fourier transform of 𝑥
and 𝑋 ∗ is the complex conjugate of 𝑋.) (5 marks)
2) Suppose the 𝑓(𝑥, 𝑦) has a size of 𝑀 × 𝑁 (i.e., 𝑥 = 0, ⋯ , 𝑀 − 1, 𝑦 = 0, ⋯ , 𝑁 − 1) where
𝑀, 𝑁 are even numbers, and 𝑔(𝑥, 𝑦) = 𝑓(𝑥, 𝑦) + 2𝑓(𝑥 − 1, 𝑦) + 𝑓(𝑥 − 2, 𝑦) + 𝜂(𝑥, 𝑦):
a) Use the inverse filtering technique to restore the image. Find the expression for both
the inverse filter estimator and the restored image in the frequency domain. (6 marks)
1
b) Find the specific frequency/frequencies for which the restored image cannot be
estimated using the inverse filtering technique. (Hint: It is equivalent to find the
frequency/frequencies where the response of the inverse filter equals infinite.) (4 marks)
c) Consider the regularization approach for image restoration (also known as the
constrained least squares filtering). Suppose the following two-dimensional high-pass
filter 𝑝(𝑥, 𝑦) is applied to the original image to approximate ∇2 𝑓(𝑥, 𝑦) (i.e., the prior
as stated in the lecture notes).
0 0 0
𝑝(𝑥, 𝑦) = [−1 2 −1].
0 0 0
Find the expression of both the image restoration filter and the restored image in the
frequency domain. You may assume the Lagrange multiplier used in the regularization
approach is 𝜆 (𝜆 > 0). (Hint: You need to first obtain the frequency response of 𝑝(𝑥, 𝑦)
in order to apply the related formula(s) in the lecture notes.) (6 marks)
d) Is there any frequency for which the restored image cannot be estimated using the
regularization approach with the 𝑝(𝑥, 𝑦) specified in c)? If yes, find the specific
frequency/frequencies for which the restored image cannot be estimated; If no, please
justify your answers. (4 marks)
where 𝑟𝑘 , 𝑘 = 1, ⋯ , 𝐿 are the quantization levels, 𝑑𝑘 , 𝑘 = 0,1, ⋯ , 𝐿 are the decision thresholds,
and 𝑝(𝑥) is the probability density function of 𝑋.
a) What is the optimal value of 𝑑0 and 𝑑𝐿 for minimizing 𝐷? Please provide necessary
explanations for your answers. (2 marks)
b) Show that the optimal quantization levels and decision thresholds have the following
relationship as shown in the lecture notes (8 marks):
1
𝑑𝑘 = (𝑟𝑘 + 𝑟𝑘+1 ), 𝑘 = 1,2, ⋯ , 𝐿 − 1,
2
𝑑
∫𝑑 𝑘 𝑥𝑝(𝑥)𝑑𝑥
𝑘−1
𝑟𝑘 = 𝑑𝑘 , 𝑘 = 1, ⋯ , 𝐿.
∫𝑑 𝑝(𝑥)𝑑𝑥
𝑘−1
3) Given that a coding system with an information source that generates 5 symbols
{𝑎1 , 𝑎2 , 𝑎3 , 𝑎4 , 𝑎5 }, with the probabilities of {0.1,0.15,0.25,0.20,0.30}, respectively.
2
a) What is the entropy of the information source? (3 marks)
b) Based on the Huffman coding method, determine the codewords the coding system
would generate if the following input sequence is received {𝑎1 , 𝑎2 , 𝑎4 , 𝑎5 , 𝑎3 }. Give also
the average number of bits for coding this input sequence (i.e., the average number of
bits for coding a symbol). (6 marks)
c) If the coding system now changes to use the arithmetic coding, give the range (in
decimal numbers) where the final codeword would locate. (6 marks)