Databases Reference
In-Depth Information
T A B L E 4 . 9
Probability model for Problems
5and6.
Letter
Probability
a
1
0.2
a
2
0.3
a
3
0.5
3.
Bit plane encoding is more effective when the pixels are encoded using a
Gray code
.The
Gray code assigns numerically adjacent values binary codes that differ by only 1 bit. To
convert from the standard binary code
b
0
b
1
b
2
...
b
7
to the Gray code
g
0
g
1
g
2
...
g
7
,we
can use the equations
g
0
=
b
0
g
k
=
b
k
⊕
b
k
−
1
Convert the test images
sena.img
and
omaha.img
to a Gray code representation and
bit plane encode. Compare with the results for the non-Gray-coded representation.
4.
In Example
4.4.4
, repeat the encoding using
m
6. Comment on your results.
5.
Given the probability model in Table
4.9
, find the real valued tag for the sequence
a
1
a
1
a
3
a
2
a
3
a
1
.
6.
For the probability model in Table
4.9
, decode a sequence of length 10 with the tag
0.63215699.
7.
Consider the frequency counts shown in Table
4.10
:
=
(a)
What is the word length required for unambiguous encoding?
(b)
Find the binary code for the sequence
abacabb
.
(c)
Decode the code you obtained to verify that your encoding was correct.
8.
Generate a binary sequence of length
L
with
P
8, and use the arithmetic coding
algorithm to encode it. Plot the difference of the rate in bits/symbol and the entropy as a
function of
L
. Comment on the effect of
L
on the rate.
9.
Decode the bitstream generated in Example
4.6.1
. Do not forget to append the bits in the
lower limit to terminate the bitstream.
10.
Generate a random binary sequence of length 100,000 with
P
(
0
)
=
0
.
(
0
)
=
0
.
75.
T A B L E 4 . 10
Frequency counts for Problem
7.
Letter
Count
a
37
b
38
c
25