Docsity

Homework 6, Image Compression I - Introduction to Digital Image Processing | ECE 537, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
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
pf2

Partial preview of the text

Download Homework 6, Image Compression I - Introduction to Digital Image Processing | ECE 537 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

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 2 n^ 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.
  • (S+N)/N: 1664 = 32.2 dB
  1. 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 1111 2 , however, 0000 2 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
  1. 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
  1. Consider the simple 4 x 8, 8-bit image:

a. Compute the entropy of the image.

  • Entropy is meaningless if you do not include the units.
  • What are the units of the Matlab result of 1.83?
  • Why are there different units.
  • Other results are 0.55 decits, 1.26 nits, and 1.83 ______

b. Compress the image using Huffman coding.

  • A coding: o 21 Æ 0 o 243 Æ 10 o 95 Æ 110 o 169 Æ 111

c. Compute the compression ratio.

  • The original number of bits is 848=32.
  • The encoded number of bits can be summed up or computed from the P{symbol occurring} * # of occurrences * # of bits.
  • Compression ration = 4.
  1. Using the Huffman code data in the table below, decode the encoded string

0101000001010111110100

Leftmost column = a2 a6 a1 a4 a3 a

Decoded string == a3 a6 a6 a2 a5 a2 a2 a2 a