80 likes | 461 Views
FAX and TIFF. Modified Huffman coding is used in fax machines. TIFF also uses this technique. It combines the variable length codes of Huffman coding with the coding of repetitive data in run length encoding. FAXes. Faxes have only white bits and black bits.
E N D
FAX and TIFF • Modified Huffman coding is used in fax machines. • TIFF also uses this technique. • It combines the variable length codes of Huffman coding with the coding of repetitive data in run length encoding. 4. 1
FAXes • Faxes have only white bits and black bits. • Each line is coded as a series of alternating runs of white and black bits. • Runs of 63 or less are coded with a terminating code. • Runs of 64 or greater require that a makeup code prefix the terminating code. • The makeup codes are used to describe runs in multiples of 64 from 64 to 2560. 4. 2
Makeup Codewords 4. 4
White and Black pixels • Studies have shown that most facsimiles are 85 percent white. • Faxes assume that any line begins with a run of white bits. • If it does not, a run of white bits of 0 length must begin the encoded line. 4. 5
Error Recovering • Each scan line ends with a special EOL (end of line) character consisting of eleven zeros and a 1 (000000000001). • There is no code that has more than seven leading zeroes. • There is no code that has more than three ending zeros. 4. 6
Error Recovering (Cont.) • If the decoder sees eleven zeros, it will recognize the end of line and continue scanning for a 1. • Upon receiving the 1, it will then start a new line. • If a bit in a scanned line gets corrupted, the most that will be lost is the rest of the line. • If the EOL code gets corrupted, the most that will get lost is the next line. 4. 7
Example 0 white 00110101 1 black 010 4 white 1011 2 black 11 1 white 0111 1 black 010 1266 white 011011000 + 01010011 EOL 000000000001 4. 8