Docsity

Multimedia Networks - Assignment 1 Questions | ECE 599, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 599 Multimedia Networking
Winter 05
Dr. Thinh Nguyen
Homework 1
Due 1/21/05 at the beginning of the class
In this assignment, you are asked to implement the huffman encoding and decoding
programs using your preferred computer language. You will use the image lena.raw from
the class website to test your algorithms. Lena.raw is a 512x512 image with each pixel is
1 byte, representing 256 gray levels.
1) What is the compression ratio of Lena image using Huffman coding?
2) Create a differential lena image by subtracting the right pixel value from the left
pixel value as follows:
1 2 3
5 6 5
9 10 11
Original image
1 1 1
5 1 -1
9 1 1
Diffferential image
What is the compression ratio of the new image?
What to turn in:
1) Source codes for decoding/encoding
2) The huffman table consisting of 256 gray levels and the corresponding code of the
lena.raw.
Note: To represent the code 001, you can represent it as a string “001” so you don’t have
to worry about manipulating bits. In reality, one has to represent the codes in raw bits. If
you have time, I suggest you to actually do the bit maniplation and write the compressed
bits to the file, read the file back, and decode the file to reconstruct the original image.
pf2

Partial preview of the text

Download Multimedia Networks - Assignment 1 Questions | ECE 599 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

ECE 599 Multimedia Networking Winter 05 Dr. Thinh Nguyen

Homework 1 Due 1/21/05 at the beginning of the class

In this assignment, you are asked to implement the huffman encoding and decoding programs using your preferred computer language. You will use the image lena.raw from the class website to test your algorithms. Lena.raw is a 512x512 image with each pixel is 1 byte, representing 256 gray levels.

  1. What is the compression ratio of Lena image using Huffman coding?
  2. Create a differential lena image by subtracting the right pixel value from the left pixel value as follows:

1 2 3 5 6 5 9 10 11 Original image

Diffferential image What is the compression ratio of the new image?

What to turn in:

  1. Source codes for decoding/encoding
  2. The huffman table consisting of 256 gray levels and the corresponding code of the lena.raw.

Note: To represent the code 001, you can represent it as a string “001” so you don’t have to worry about manipulating bits. In reality, one has to represent the codes in raw bits. If you have time, I suggest you to actually do the bit maniplation and write the compressed bits to the file, read the file back, and decode the file to reconstruct the original image.