Bit Plane Slicing and Bit Plane Compression
Bit Plane Slicing and Bit Plane Compression
For an 8 bit image “0” is encoded in 00000000 and “255” is encoded in 11111111
Example:
1 0 1 0 0 1 1 1
MSB 7th bit 6th bit 5th bit 4th bit 3rd bit 2nd bit LSB
Step2: Bit plane slicing of above example
1 1 0 0 0 1 1 0 1
1 1 1 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0
0 0 0 0 0 1 1 1 1
1 0 0 0 1 0 0 1 1
1 1 1 1 1 0 1 0 1
1 0 1 1 1 1
0 0 1 0 0 1
1 1 0 1 0 0
2 bit 1 bit
(LSB bit Palne)
Example of Bit plane slicing
Example:
Explain with a simple example how to encoding and decoding is carried out in bit plane
compression.
In this example, the MSB (most significant bit) alone is considered and encoded.
180 1 80 33 201 28
120 224 160 33 67 144
224 160 180 11 133 144
1 0 0 0 1 0
0 1 1 0 0 1
1 1 1 0 1 1
Step3: Rearrange the MSB values such that each row contains 8 columns or 8 bits
1 0 0 0 1 0 0 1
1 0 0 1 1 1 1 0
1 1 0 0 0 0 0 0
{we have 3x6=18 values but we need 8 columns in each row. It achieved by padding the
matrix with zeros in the end in order to form a matrix which has 8 columns in each row.}
1 0 0 0 1 0 0 1
1 0 0 1 1 1 1 0
1 1 0 0 0 0 0 0
1 0 0 0 1 0
0 1 1 0 0 1
1 1 1 0 1 1
Step4: Pre allocate a matrix of same size of original image and replace the MSB of each
value in the matrix with the bit we decompressed in the previous step.
128 0 0 0 128 0
0 128 128 0 0 128
128 128 128 0 128 128