Lecture 5-Lossless Image Comp-other Techniques
Lecture 5-Lossless Image Comp-other Techniques
Sudipta Mahapatra
1
Other Schemes for
Lossless Image Compression
2
Outline
3
Converting a gray-scale image into bit-plane images
4
Example
5
Run-length Coding of bit-plane images
• In 1D RL coding for binary images, runs of
continuous 1s or 0s in every row of an image
are encoded together.
• Results in substantial bit savings.
• Indicate whether the row begins with a run of
1s or 0s, or the encoding of a row compulsorily
begins with 1s, where the count could be zero,
if it begins with 0s.
6
Example
• For the string,
00011010001111100101111111111111110111000
00000010000111111100000001 (67 symbols)
• Assuming that the coding always begins with
count of ones, coded string
0,3,2,1,1,3,5,2,1,1,15,1,3,9,1,4,7,7,1 (20)
7
Run-length Entropy
• The run length entropy is given by,
H 0 H1
HR
L0 L1
•H0/H1– Entropies for runs of 0s and 1s and
L0/L1 are the average values of run-lengths of
0s and 1s.
• Run-length encoding can be applied to gray
scale images by first decomposing them to
bit-plane images.
8
Lossless Predictive Coding
x
pi i
N
10
Example
• Add an offset of intensity value 127 to all the
pixels to display the negative intensity values
as well. Error PDF
0.1
0.08
0.06
0.04
0.02
Error image
0
-180 -130 -80 -30 20 70 120 170
-0.02
Error------>
Error Histogram 11
Inference
12
What you should be able to do at this point:
1. Convert a gray-scale image into bit-plane
images.
2. Apply run-length coding on binary images.
3. State the basic principles of lossless predictive
coding.
4. Obtain predicted image and error image from
a given image and prediction scheme.
5. Reconstruct the original image from the error
image and the predicted image.
6. Compare the entropies of the original image
and the error image. 13
Assignments