Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Data compression


Published on

Published in: Education
  • Be the first to comment

Data compression

  2. 2. PLAN: 2 Why compression ? About digital images. Lossless data compression. Lossy data compression. Conclusion.
  3. 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. 4. About images 4It is acquired, created, processed and stored in binaryform. It is composed of a set of points called pixels.Example: Image 1024 × 768 coded on 3 bytesNumber of pixels : 1024 × 768 = 786432 pixelsImage size : 1024 × 768 × 3 = 2359296 octets = 2,25 Mo
  5. 5. Performance criteria 5 Compression ratio is an important factor to differ between images : The Mean Square Error is the cumulative squared errorbetween the compressed and the original image :
  6. 6. Algorithm compression 6There 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. 7. Lossless compression 7There are three types of losslesscompression:•Methods based redundancy (RLE).•Statistical methods (Huffman).•Methods based on dictionaries (LZW).
  8. 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. 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. 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. 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. 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