Assignment-5 Compression
Assignment-5 Compression
Q(2) Given below is a table of eight symbol and their frequency of occurrence.
Symbol S1 S2 S3 S4 S5 S6 S7 S8
Frequency 0.25 0.15 0.06 0.08 0.21 0.14 0.07 0.04
Q(3) Find the Huffman code for the following stream of data (28 point )
{ 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 7 }
é 10 10 40 40 ù
ê Find DPCM Coded Image.
Q(4) Given F = ê 20 20 20 30 úú
ê 30 30 40 40 ú
ê ú
ë 50 50 60 80 û
é 10 0 30 0 ù
ê 10 úú
(a) Find Huffman Coded Image.
Q(5) Given A = ê - 20 0 0
ê 0 0 10 0 ú (b) Calculate Bits Per Pixel (BPP) and
ê ú percentage of compression.
ë 10 0 10 20 û
0
(Lossy)
é13 54 12 ù
Q(6) Given F = ê13 11 57 ú
ê ú
ê
ë11 10 12 ú
û
(a) Find 3-bit IGS coded image and Calculate BPP & Compression factor.
(b) Find decoded image and Calculate MSE and PSNR.
(b) Runlength coding is lossless coding but may not give data compression
always .
(c) Runlength coding always gives data compression. Justify your answer.