
ECE 537 Digital Image Processing
Homework Assignment #6, Image Compression I with some answers
Prof. Hintz
March 28, 2008
Due: April 2, 2008
1. Can variable-length coding procedures be used to compress a histogram equalized image
with 2n intensity levels? Explain your answer.
2. Can a histogram equalized image contain spatial or temporal redundancies that could be
exploited for data compression? Explain your answer.
3. Consider an 8-pixel line of intensity data
( 108, 139, 135, 244, 172, 173, 56, 99 )
If it is uniformly quantized with 4-bit accuracy, compute the rms error and rms signal-to-
noise ratios for the quantized data.
• Remember to compute a reconstructor, ∧
f, such that there is a minimum average error
between the original word and its reconstruction. Do not just truncate the rightmost
nibble.
• RMS error: 1.30
• (S+N)/N: 1664 = 32.2 dB
4. Although quantization results in information loss, it is sometimes invisible to the eye.
For example, when 8-bit pixels are uniformly quantized to fewer bits/pixel false
contouring often occurs. It can be reduced or eliminated using improved gray-scale
(IGS) quantization. A sum, initially set to zero, is formed from the current 8-bit intensity
value and the four least significant bits of the previously generated sum. If the four most
significant bits of the intensity value are 11112, however, 00002 is added instead. The
four most significant bits of the resulting sum are used as the coded pixel value.
Construct the IGS code for the intensity data of problem 3 above.
• In hexadecimal, the GIS code is 6 9 8 F B A 4 6
5. Construct all the unique Huffman codes for a three-symbol source.
• There are two unique codes (independent of the assignment of the variables to the
coding)
o 0 10 11
o 1 01 00