10.13 Problems

10.13 Problems

1. 

Figure 10.39 shows a part of a binary alpha plane, where shaded pixels are represented by 1 and blank pixels by 0:

  1. calculate the context number for pixels A, B and C

  2. use the intra table of Appendix D to calculate the probability for coding of alpha pixels A, B and C.


Figure 10.39

for a: c0 = c2 = c3 = 1, index = 1 + 4 + 8 = 13, the given frequency table in appendix d is for prob(0), hence prob(0) = 29789, but since a is a 1 pixel, then its probability prob(1) = 65535 - 29789 = 35746 out of 65535. for b: c0 = c1 = c2 = c3 = c4 = 1, and index = 1 + 2 + 4 + 8 + 16 = 31, prob(0) = 6554. as we see this odd pixel of 0 among the 1s has a lower probability. for c: c1 = c2 = c3 = c4 = c5 = c7 = 1, and the index becomes 190. like pixel a the prob(0) = 91, but its prob(1) = 65535 - 91 = 65444 out of 65535, which is as expected.

2. 

Draw a part of the contour of the shape of Figure 10.39 starting from point X, and ending at point Y. Use the Huffman Table 10.1 to calculate the number of bits required to differentially chain code the part of the contour from X to Y.

the chain code is 0, 1, 0, 1, 7, 7. the differential chain code will be: 0, 1, -1, 1, -2, 0 with bits 1+2 + 3 + 2 + 5 + 1 = 14 bits

3. 

Figure 10.40 shows a part of a quad tree binary alpha block (BAB). Assume shaded pixels at level three are binary 1 and blank ones binary 0:

  1. calculate the index of each pixel at level 2

  2. calculate the index of the pixel at level 1.


Figure 10.40

at level 2 the indices (without swapping) will be 0 for the two blank blocks and index = 27 2 + 9 2 + 0 + 2 = 74 and index =0 + 0 + 3x2 + 2 = 8 for the two blocks. at the upper level the index is: index = 0 + 0 + 3 x 1 + 1 =4

4. 

A part of a foreground texture within an 8 × 8 pixel block is shown in Figure 10.41. The background pixels are shown blank. The block is DCT coded and the quantised coeffiicients with a step size of th = q = 8 are zigzag scanned. Compare the efficeincy of the following two coding methods:

  1. use a shape adaptive DCT to code the block; assume the shape of this object is available to the decoder

  2. use normal DCT, but assume the background pixels are zero.


Figure 10.41

the coefficients of the shape adaptive dct will be 127 -40 1 10 -15 23 -7 -6 confined to the top left corner, while for those of the normal dct with padded zeros, the significant coefficients are scattered all over the 8 8 area.

Answers

1. 

For A: c0 = c2 = c3 = 1, index = 1 + 4 + 8 = 13, the given frequency table in Appendix D is for prob(0), hence prob(0) = 29789, but since A is a 1 pixel, then its probability prob(1) = 65535 - 29789 = 35746 out of 65535.

For B: c0 = c1 = c2 = c3 = c4 = 1, and index = 1 + 2 + 4 + 8 + 16 = 31, prob(0) = 6554. As we see this odd pixel of 0 among the 1s has a lower probability.

For C: c1 = c2 = c3 = c4 = c5 = c7 = 1, and the index becomes 190. Like pixel A the prob(0) = 91, but its prob(1) = 65535 - 91 = 65444 out of 65535, which is as expected.

2. 

The chain code is 0, 1, 0, 1, 7, 7. The differential chain code will be: 0, 1, -1, 1, -2, 0 with bits 1+2 + 3 + 2 + 5 + 1 = 14 bits

3. 

At level 2 the indices (without swapping) will be 0 for the two blank blocks and index = 27 × 2 + 9 × 2 + 0 + 2 = 74 and index =0 + 0 + 3x2 + 2 = 8 for the two blocks. At the upper level the index is: index = 0 + 0 + 3 x 1 + 1 =4

4. 

The coefficients of the shape adaptive DCT will be

127

-40

1

10

-15

 

23

-7

 

-6

  

confined to the top left corner, while for those of the normal DCT with padded zeros, the significant coefficients are scattered all over the 8 × 8 area.



Standard Codecs(c) Image Compression to Advanced Video Coding
Standard Codecs: Image Compression to Advanced Video Coding (IET Telecommunications Series)
ISBN: 0852967101
EAN: 2147483647
Year: 2005
Pages: 148
Authors: M. Ghanbari

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net