mod3
mod3
Compression principles
4. Source encoding
Entropy encoding
000000011111111110000011……
Alternately, since only the two binary digits 0 and 1 are involved
If we ensure the first substring always comprises binary 0’s, then the
string could be represented as 7, 10, 5, 2 …..
Statistical encoding
Differential encoding
Huffman coding
Some formats are extensively used with the internet for the
representation and compression of graphical images – Graphics
Interchange Format (GIF)
Digitized documents
Digitized pictures
Image Compression – GIF interlaced mode
Further ¼ and
remaining ½ of the
image
• Since FAX machines are used with public carrier networks, the
ITU-T has produced standards relating to them
•
Image Compression – GIF interlaced mode
• A single EOL precedes the end of each scanned line and six
consecutive EOLs indicate the end of each page
• E.g. if a line contains a black-run then the next line will normally
contain the same run pels plus or minus 3 pels
• The run lengths associated with a coding line are classified into
three groups relative to the reference line
Image Compression – run-length possibilities: pass mode (a), vertical mode
Pass mode
Vertical mode
• This is the case when the run-length in the reference line (b1b2)
overlaps the next run-length in the coding line(a1a2) by a maximum
of plus or minus 3 pels
Image Compression – run-length possibilities: Horizontal mode
• This is the case when the run-length in the reference line (b1b2)
overlaps the run-length (a1a2) by more than plus or minus 3 pels
Image Compression – JPEG encoder schematic
• 2-D matrix is required to store the required set of 8-bit grey-level values
that represent the image
• For the colour image if a CLUT is used then a single matrix of values is
required
• If the Y, Cr, Cb format is used then the matrix size for the chrominance
components is smaller than the Y matrix ( Reduced representation)
• Once the image format is selected then the values in each matrix are
compressed separately using the DCT
• Once the source image format has been selected and prepared (four
alternative forms of representation), the set values in each matrix are
compressed separately using the DCT)
Image Compression – Example computation of a set of quantized
DCT coefficients
Image Compression – JPEG encoder
Image Compression – Image Preparation
• The values are first centred around zero by subtracting 128 from
each intensity/luminance value
Image Compression – Image Preparation