Download presentation
Presentation is loading. Please wait.
Published byAngelica Lloyd Modified over 9 years ago
1
Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper
2
Introduction n Data compression focuses on the assumption that when transmitting data whether it be images, music, video and so on, one can benefit in the size and transmission times associated with such endeavors.
3
Topics of Discussion Compression TypesCompression Types Run Length EncodingRun Length Encoding Huffman CodingHuffman Coding PNG 0 (Portable Network Graphics)PNG 0 (Portable Network Graphics) JPEG Graphics FormatJPEG Graphics Format GIF Graphics FormatGIF Graphics Format MPEG Moving Picture Expert GroupMPEG Moving Picture Expert Group ConclusionConclusion
4
Compression Types n Lossless – Recover of the exact original data after compression will be. n Lossy – Certain loss of accuracy in exchange for a substantial increase in compression.
5
Run Length Encoding n Lossles n A simple technique achieves up to an 8:1 compression ratio. n Replacing multiple occurrences of a symbol with one copy and a count of how many times that symbol appears. n ex. AAABBBCCCCCCCCCDDDDD encoded as 3A3B9C5D
6
Run Length Encoding n Can also be used to compress digital images by comparing pixels that appear adjacent to each other and only store the changes. n Pros – effective for encoding images with large white spaces or large homogeneous areas.
7
Run Length Encoding n Cons – Does not work well when encoding files that contain even a small degree of variations among pixels. Because it uses 2 bytes to represent each symbol, these cases can actually cause an increase in file size.
8
Huffman Coding n Based on creating a variable length character code from frequent occurring characters. n Avg. compression 25%, Maximum 50% - 60% n Code words are composed of variable length binary strings. u Binary string mapped to a different character within the file. u Frequency distribution of characters created. u Decide which code words will be used for each symbol.
9
Huffman Coding n Example USING HUFFMAN CODES CharacterCodewordSpace required to represent all file characters (String length) * (frequency of characters in file) ________________________________________________________________________ c01*(100,000) d1013*(30,000) y1003*(5,000) t1113*(1,000) r11014*(50) z11004*(25) ________________________________________________________________________ Total Bits Required 208,300 ________________________________________________________________________
10
Dictionary Based Compression n Encode variable length strings of symbols as single tokens. n Tokens forms an index to a phrase dictionary. n If tokens are smaller than the phrases, they replace the phrases and compression occurs. n LZ77 is a sliding window technique in which the dictionary consists of a set of fixed length phrases found in a window into the previously seen text. n LZ78 builds phrases up one symbol at a time, adding a new symbol to an existing phrase when a match occurs.
11
JPEG Graphics Format n Lossy n Developed to compress gray-scale or color images. n Stores 24bit color per pixel. n JPEG can: u Achieve 10:1 up to 20:1 compression without visible loss. u Achieve 30:1 up to 50:1 compression with small to moderate loss of quality u Achieve up to 100:1 for usage such as previews where low quality is not an issue.
12
JPEG Graphics Format n Drawback in time needed to decode and view the image. n Well suited for real world photographs, scenic depictions of nature. n Not been shown to work well with line drawings, cartoon animations, and other similar drawings. n Viewed by the human eye not analyzed by machines.
13
JPEG Graphics Format n Flexibility, one has to create smaller lower quality images or larger higher quality ones by changing compression parameters. n Extremely useful to a broad scope of real world applications. n Example - “What is the lowest amount of quality we need?” n We can control the actual decoding speed as it relates to the image quality by using inaccurate approximations instead of exact calculations.
14
GIF (Graphical Interchange Format) n Lossless n Developed by Compuserve in 1987 n Two version GIF87a and GIF89a. n Images have a bit depth of 8 bits per pixels, giving us a maximum of 256 colors. n Image data is compressed using LZW (Lempel-Ziv) algorithm.
15
GIF contd. n Animation is accomplished by having many gif images together in one file. n Best performance can be reached by using images with large percentage of solid colors throughout a wide portion of the image area.
16
GIF contd. n GIF89a – extends the GIF87a specification and adds transparency, text comments, and animation of text. n Becoming less used.
17
PNG 0 – Portable Network Graphic n Lossless n Uses modified Lempel-Ziv 77 algorithm, similarly being used by winzip, and other zip applications. n Benefits of 15-35 percent higher compression. n Works well with true color, palette, and grayscale color areas.
18
PNG 0 – Portable Network Graphic n When compared to JPEG, this format offers higher image quality but the compression ratios are not as great as with JPEG. n PNG 0 also uses filtering techniques. It is applied toward bytes of data before compression. This intern prepares data for optimal compression. This works best when applied to true color images.
19
MPEG (Moving Picture Expert Group) n Lossy n Most popular video formats currently being used today. n Major standards: MPEG-1 and MPEG-2 n Remove spatial redundancy within a video frame and temporal redundancy between video frames n DCT-based compression is used to reduce spatial redundancy
20
MPEG contd. n Motion-compensation is used to exploit temporal redundancy n The idea of motion-compensation is to encode a video frame based on other video frames temporally close to it. n Complicated and CPU intensive. n Uses several algorithms to achieve as much as 30:1 compression rate
21
MPEG contd. n Quantized Discrete Cosine Transform (QDCT). n run-length encoding n Huffman encoding
22
Conclusion n With the growing need to transmit more data in a faster manner, data compression is vital. n Application determines what method is used.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.