

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Digital Image Processing; Subject: Electrical & Computer Engr; University: Georgia Institute of Technology-Main Campus; Term: Fall 2003;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


School of Electrical and Computer Engineering
ECE 6258 Digital Image Processing Fall 2003
Problem Set #
Issued: Wednesday, October 1, 2003 Due (live): Friday, October 10, 2003 Due (video): Friday, October 24, 2003
Problem 4.1 (Huffman Codes): Find a Huffman code for the source shown below. The resulting codes are not unique, but you should try to find a code whose longest code- word is as short as possible.
Si: p(Si) S 1 : 0. S 2 : 0. S 3 : 0. S 4 : 0. S 5 : 0. S 6 : 0. S 7 : 0. S 8 : 0. S 9 : 0. S 10 : 0.
Problem 4.2 (Tunstall Codes): A Huffman code accepts strings of symbols of equal length and maps them to codewords of variable length. A run-length code, by way of contrast, accepts input strings of variable length and outputs symbols of equal length. The optimal code of the latter type is known as a Tunstall code. Tunstall codes are duals of Huffman codes. A Q-ary Tunstall code operating on strings of binary input symbols can be found by the following procedure:
(a) Design a Tunstall code for encoding the output of a zero-memory source S = { 0 , 1 } with p(0) = 0.75, p(1) = 0.25. The number of symbols to be encoded in Q = 8. Each symbol will be represented by a three-bit number. (b) Compute the entropy of the source H(S). (c) Compute the ratio of the average number of output bits per input bit. (d) As an alternative, suppose a run-length code is used to encode the input strings
and the results are then Huffman coded. What is the average number of output bits per input bit? (e) Can you improve on the performance of the Tunstall code by following it with a Huffman code as you did in part (d)?
Problem 4.3 (Arithmetic Coding): This problem is concerned with using an arithmetic coder to encode a Markov source. Consider the simple first-order Markov source defined by the following conditional probabilities:
p(0|0) = 0. 8 p(1|0) = 0. p(0|1) = 0. 4 p(1|1) = 0.
(a) What are the stationary probabilities, p(0) and p(1)? (b) Assuming that this information source is initially modeled as a zero-memory source with the stationary probabilities given in (a), determine the entropy of the source. (c) Encode the source sequence 0100101111000 using an arithmetic coder using the zero-memory source model. (d) What is the entropy of the source using the Markox model? (e) Assuming that the first bit of the sequence is sent unencoded, encode the remain- der of the sequence in part (c) using the Markov model. (f) Decode your sequence from part (e).
Problem 4.4 (Optimal Quantization): A sequence of independent Gaussian random variables has a mean of zero and a standard deviation of one. These random variables are to be quantized to five levels.
((a)) Design an optimal quantizer (that minimizes the mean-squared quantization error). Specify the thresholds and reproduction values of your quantizer. Your solution may be analytical or numerical, although the latter is recommended. (b) Compute the entropy of a sequence of quantized samples. (c) Compute the mean-squared error associated with your quantizer. (d) Now design an optimal vector quantizer, with a codebook of length 25 that quantizes a pair or consecutive samples. Recommended approach: Start with a separable version of your quantizer from part (a). Using a test sequence of say 1000 samples, improve your quantizer if possible using several Lloyd iterations. (e) What is the entropy per sample of your codebook? (f) What is the mean-squared error per sample?