Académique Documents
Professionnel Documents
Culture Documents
06/18/15
Topic Outline
Binary Images
Packbits Encoding
CCITT Group 3 1-D compression
CCITT Group 3 2-D compression
06/18/15
Binary Images
A binary image containing black and white
pixels is generated when a document is
scanned in a binary mode.
Binary 1 represents a black pixel and
binary 0 a white pixel.
06/18/15
06/18/15
Packbits Encoding
(Run-length Encoding)
06/18/15
Example-Run-Length Encoding
000000000000001111111000000000001111
is represented as:
Byte1
Byte2
Byte3
Byte3
Byte3
Byte3
Byte3
Byte3
...
0x14
0x00
0x07
0x01
0x11
0x00
0x04
0x01
...
06/18/15
Byte3
Byte3
06/18/15
Based on Run-Length
Assumes that a typical scan line has long runs of
pixels of the same color (black or white)
For black and white images, not for gray scale or
color
Huffman encoding a modified version of runlength
Shorter codes were developed for frequently
occurring run length, and longer codes were
developed for less frequent run length.
06/18/15
06/18/15
06/18/15
10
Code word
Black
run length
Code word
00110101
0000110111
000111
010
0111
11
1000
10
1011
011
1100
0011
1110
0010
1111
00011
10011
000101
10100
000100
64
11011
64
0000001111
128
10010
128
000011001001
06/18/15
11
EOL
Data
Line 1
EOL
Data
Line 2
EOL
Data
EOL
EOL
EOL
EOL
Line n
-The file is terminated by a number of EOL if there is no change in the line from the
previous line.
06/18/15
12
06/18/15
13
06/18/15
14
2D Encoding
06/18/15
15
06/18/15
16
Example
06/18/15
17
06/18/15
18
06/18/15
19