CCITT T.4 2-Dimensional Compression Standard
INTRODUCTION In Group 3, a scanline is encoded as a set of runs, each representing a
number of white or black pixels, with white runs alternating with black runs.
Every run is encoded using a variable number of bits, which can be uniquely
identified upon decoding. This means that frequently occurring lengths of run
may be encoded very efficiently, at the expense of the infrequent ones. For
example, a black run of 2 or 3 pixels is encoded using just 2 bits, whereas one
of 1000 pixels is encoded in 25.
HOW DOES CCITT T.4 WORK? The CCITT Group 3 two-dimensional coding is a line-by-line coding method. The position of each changing picture element on the coding line is coded with respect to the position of a corresponding reference element. The reference element is located on either the coding line or the reference line. After the coding line has been coded, it becomes the reference line for the next coding line. In order to limit the facsimile transmission error, a Modified Huffman coded line (i.e. one-dimensional coded line) is sent periodically. This period is referred to as K factor. For facsmile, at the standard vertical resolution, K is equal to 2; at the higher vertical resolution, K is equal to 4. For digital image, K can be any positive non-zero integer. In summary, for every group of K lines, the CCITT Group two-dimensional scheme encodes 1 line in one-dimensional coding and the other K-1 lines in two-dimensional coding.
At the starting the coding line, the changing element a0 is first set on imaginary white changing element located just before the first element on the coding line. During the encoding of the coding line, the position of a0 is determined by the previous coding mode.
b1 b2
a0 a1 a2 MODES In the CCITT T.4 standard, there are three coding modes: Pass Mode(P) ,Vertical Mode, and Horizontal Mode (H). Depending on the position of a changing element along the coding line, one of three coding modes can be identified.
In the Vertical Mode, depending on the relative distance between a1 and b1, 7 possible cases can be identified: - V (0):a1 just under b1, - Vr (1):a1 one pixel to the right of b1, - Vr (2):a1 two pixels to the right of b1, - Vr (3):a1 three pixels to the right of b1, - Vl (1):a1 one pixel to the left b1, - Vl (2):a1 two pixels to the left b1, - Vl (3):a1 three pixels to the left b1. The code words for three coding modes (pass, horizontal and vertical coding modes) are shown in Table 4. with the optional extension. In Table 4. M(ai,aj) represents the code words of 1-D compression standard for the run ai aj.
|