You are on page 1of 4

Sample Problem- Image

Compression
One variation of Run-length coding
involves (i) coding only the runs of 0’s
or 1’s (not both) and (ii) assigning a
special code (0,0) to the start of each
line to reduce transmission error. One
possible code pair is (xk, rk), where xk
and rk represents the kth run starting
coordinate and run length,
respectively. Using this variation and
stating the assumptions clearly, give
the run-length encoded output for the
data given below.
 
01100111001111101100001
11111110001110000111011
Consider the following predictive image
compression scheme. Let f and f ̂ represent the
original and the predicted values, and the
prediction error, e = f − f ̂. Each new pixel is
predicted by its previous pixel, that is,
• f ̂(n)=f(n-1)
The prediction error is further quantized to “0”,
“B”, or “-B” according to:

Determine the quantized prediction error e ̇(n)


for the input:

{14, 15, 14, 15, 13, 15, 15, 20, 26, 27, 28, 27, 27,
29, 37}
You are given an image containing eight discrete intensity levels, with distribution given as:
• Intensity level r0 r1 r2 r3 r4 r5 r6 r7
• probability 0.12 0.04 0.08 0.05 0.23 0.22 0.10 0.16
Compare the efficiency of variable length binary Huffman code and Shannon fano code for this image.

You might also like