r ‘hip 7» Ont compression
‘These are combined to 4 final binary tree with the wot node ADCEB. The edge
from ADCEB to B is assigned a 1, and the edge from ADCEB to ADCE is assigned
a0.
6. Figure 7-2 shows the resulting Huffman code as a binary wee, The result is the
following code words, which are stored in a table:
w(AD=O01, w(B)=1, w(C)=O11, w(D)=000, w(E)=010
Go-o09
von”)
Gerad) usa)
Fgro7-2 Exar ofa Human cod reprorotd a tina toe
Such a table could be generated for a single image or for multiple images together.
In the case of motion pictures, a Huffman table can be generated for each sequence or
for a set of sequences. The same table must be available for both encoding and decod-
ing. Ifthe information of an image can be transformed into bit stream, then a Huffman
lable ean be used to compress the data without any loss, The simplest way to generate
such a bit stream isto code the pixels individually and read them line by lin. Note that
usually more sophisticated methods are applied, as described in the remainder of this
chapter
If one considers runclength coding and all the other methods described so far,
\which produce the same consecutive symbols (bytes) quite often, itis certainly a major
objective to transform images and videos into a bit stream, However, these techniques
also have disadvantages in that they do not perform efficiently, as will be explained in
the next step.
7.4.8 Arithmetic Coding
Like Huffman coding, arithmetic coding is optimal from an information theoreti
cal point of view (see [Lan84, PMJAS8)). Therefore, the length of the encoded data is