TOPIC’S PRESENTATION:


               IMAGE COMPRESSION




Prepared by:

       SBAIH Nizar


                               2012/2013
PLAN:
                          2


 Why compression ?
 About digital images.
 Lossless data compression.
 Lossy data compression.
 Conclusion.
Why compression ?
                            3


 Image with 10 Megapixel

 Three color component (R,G,B).

 One byte by component.

 Memory occupation : 30 Mbyte by image.

 Stocking on disk ? Transmission over the network ?



         Reduce its size on disk.
         Speed transmission over a network.
About images
                           4


It is acquired, created, processed and stored in binary
form. It is composed of a set of points called pixels.


Example: Image 1024 × 768 coded on 3 bytes
Number of pixels : 1024 × 768 = 786432 pixels
Image size : 1024 × 768 × 3 = 2359296 octets = 2,25 Mo
Performance criteria
                                   5




 Compression ratio is an important factor to differ between images :




 The Mean Square Error is the cumulative squared error
between the compressed and the original image :
Algorithm compression
                              6



There are two types of compression:

Lossless compression :
 Perfect reconstruction.
 Statistical redundancy.
 Small compression ratio.
Lossy compression :
 Reconstructed image ≠ original image.
 Quantization.
 Visually lossless.
 High compression ratio.
Lossless compression
                                    7




There are three types of lossless
compression:

•Methods based redundancy (RLE).
•Statistical methods (Huffman).
•Methods based on dictionaries (LZW).
Run-length encoding
                                8



 Definition :

       Run-length encoding is a data compression algorithm that is
       supported by most bitmap file formats, such as TIFF, BMP,
       and PCX.


 Principle:

       RLE works by reducing the physical size of a repeating string
       of characters.
Run-length encoding
                                     9


 Example:
               After RLE                          After RLE
    AAAABBBC           4A3B1C             ENSAS            1E1N1S1A1S
             Gain = 25%                         Loss = 50%

 Rules for using RLE:

   Rule 1 : The character must be repeated at least three times.

   Rule 2 : If the sequence is not encoded, we above 00 followed by the
   number of characters .

   Rule 3 : If the sequence is odd, we copy 00 at the end of the
   sequences .
Run-length encoding
                                      10

 Different methods to encode images:
 There are a number of variants of run-length encoding. Image data is normally
 run-length encoded by uniform paving points, along lines, or even zigzag.
LZW (LEMPEL-ZIV-WEICH)
                                11



 Definition :

       It is a method of compression dictionary based on reasons
       that are more often than others.


 Principle:

        Repeated sequences are stored in a dictionary and
         replaced by their address in the dictionary.

        The index is replaced by the sequence which is stored on a
         bit number smaller than the sequence.
LZW (LEMPEL-ZIV-WEICH)
                                     12



 Example :

   Size of image : 256*153*24 bits = 114 ko

                       Compression
                          LZW




   The size of the image : 51,9 ko


                     Le taux de
                  compression est de
                        2,21
13




THANK’S FOR  YOUR
    ATTENTION

Data compression

  • 1.
    TOPIC’S PRESENTATION: IMAGE COMPRESSION Prepared by: SBAIH Nizar 2012/2013
  • 2.
    PLAN: 2  Why compression ?  About digital images.  Lossless data compression.  Lossy data compression.  Conclusion.
  • 3.
    Why compression ? 3  Image with 10 Megapixel  Three color component (R,G,B).  One byte by component.  Memory occupation : 30 Mbyte by image.  Stocking on disk ? Transmission over the network ? Reduce its size on disk. Speed transmission over a network.
  • 4.
    About images 4 It is acquired, created, processed and stored in binary form. It is composed of a set of points called pixels. Example: Image 1024 × 768 coded on 3 bytes Number of pixels : 1024 × 768 = 786432 pixels Image size : 1024 × 768 × 3 = 2359296 octets = 2,25 Mo
  • 5.
    Performance criteria 5  Compression ratio is an important factor to differ between images :  The Mean Square Error is the cumulative squared error between the compressed and the original image :
  • 6.
    Algorithm compression 6 There are two types of compression: Lossless compression :  Perfect reconstruction.  Statistical redundancy.  Small compression ratio. Lossy compression :  Reconstructed image ≠ original image.  Quantization.  Visually lossless.  High compression ratio.
  • 7.
    Lossless compression 7 There are three types of lossless compression: •Methods based redundancy (RLE). •Statistical methods (Huffman). •Methods based on dictionaries (LZW).
  • 8.
    Run-length encoding 8  Definition : Run-length encoding is a data compression algorithm that is supported by most bitmap file formats, such as TIFF, BMP, and PCX.  Principle: RLE works by reducing the physical size of a repeating string of characters.
  • 9.
    Run-length encoding 9  Example: After RLE After RLE AAAABBBC 4A3B1C ENSAS 1E1N1S1A1S Gain = 25% Loss = 50%  Rules for using RLE: Rule 1 : The character must be repeated at least three times. Rule 2 : If the sequence is not encoded, we above 00 followed by the number of characters . Rule 3 : If the sequence is odd, we copy 00 at the end of the sequences .
  • 10.
    Run-length encoding 10  Different methods to encode images: There are a number of variants of run-length encoding. Image data is normally run-length encoded by uniform paving points, along lines, or even zigzag.
  • 11.
    LZW (LEMPEL-ZIV-WEICH) 11  Definition : It is a method of compression dictionary based on reasons that are more often than others.  Principle:  Repeated sequences are stored in a dictionary and replaced by their address in the dictionary.  The index is replaced by the sequence which is stored on a bit number smaller than the sequence.
  • 12.
    LZW (LEMPEL-ZIV-WEICH) 12  Example : Size of image : 256*153*24 bits = 114 ko Compression LZW The size of the image : 51,9 ko Le taux de compression est de 2,21
  • 13.
    13 THANK’S FOR YOUR ATTENTION