Top Banner
Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira By: Eduardo J. Moreira & Onyeka Ezenwoye & Onyeka Ezenwoye CIS-6931 Term Paper
22

Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Jan 03, 2016

Download

Documents

Angelica Lloyd
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Addressing Image Compression Techniques on current Internet

Technologies

Addressing Image Compression Techniques on current Internet

Technologies

By: Eduardo J. Moreira & By: Eduardo J. Moreira & Onyeka EzenwoyeOnyeka Ezenwoye

CIS-6931Term Paper

Page 2: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

IntroductionIntroduction

Data compression focuses on the assumption that Data compression focuses on the assumption that when transmitting data whether it be images, when transmitting data whether it be images, music, video and so on, one can benefit in the size music, video and so on, one can benefit in the size and transmission times associated with such and transmission times associated with such endeavors.endeavors.

Page 3: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Topics of DiscussionTopics 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

Page 4: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Compression TypesCompression Types

Lossless – Recover of the exact original data after Lossless – Recover of the exact original data after compression will be. compression will be.

Lossy – Certain loss of accuracy in exchange for a Lossy – Certain loss of accuracy in exchange for a substantial increase in compression.substantial increase in compression.

Page 5: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Run Length Encoding Run Length Encoding

LosslesLossles A simple technique achieves up to an 8:1 A simple technique achieves up to an 8:1

compression ratio.compression ratio. Replacing multiple occurrences of a symbol with Replacing multiple occurrences of a symbol with

one copy and a count of how many times that one copy and a count of how many times that symbol appears.symbol appears.

ex. AAABBBCCCCCCCCCDDDDD encoded as ex. AAABBBCCCCCCCCCDDDDD encoded as 3A3B9C5D3A3B9C5D

Page 6: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Run Length EncodingRun Length Encoding

Can also be used to compress digital images by Can also be used to compress digital images by comparing pixels that appear adjacent to each comparing pixels that appear adjacent to each other and only store the changes.other and only store the changes.

Pros – effective for encoding images with large Pros – effective for encoding images with large white spaces or large homogeneous areas.white spaces or large homogeneous areas.

Page 7: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Run Length EncodingRun Length Encoding

Cons – Does not work well when encoding files Cons – Does not work well when encoding files that contain even a small degree of variations that contain even a small degree of variations among pixels. Because it uses 2 bytes to represent among pixels. Because it uses 2 bytes to represent each symbol, these cases can actually cause an each symbol, these cases can actually cause an increase in file size.increase in file size.

Page 8: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Huffman CodingHuffman Coding Based on creating a variable length character code Based on creating a variable length character code

from frequent occurring characters.from frequent occurring characters. Avg. compression 25%, Maximum 50% - 60%Avg. compression 25%, Maximum 50% - 60% Code words are composed of variable length Code words are composed of variable length

binary strings.binary strings. Binary string mapped to a different character within the Binary string mapped to a different character within the

file.file. Frequency distribution of characters created.Frequency distribution of characters created. Decide which code words will be used for each symbol.Decide which code words will be used for each symbol.

Page 9: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Huffman CodingHuffman Coding ExampleExample

USING HUFFMAN CODES

CharacterCharacter CodewordCodeword Space required to represent all file charactersSpace required to represent all file characters

(String length) * (frequency of characters in file)

________________________________________________________________________

cc 00 1*(100,000)1*(100,000)

dd 101101 3*(30,000)3*(30,000)

yy 100100 3*(5,000)3*(5,000)

tt 111111 3*(1,000)3*(1,000)

rr 11011101 4*(50)4*(50)

zz 11001100 4*(25)4*(25)

________________________________________________________________________

Total Bits Required 208,300Total Bits Required 208,300

________________________________________________________________________

Page 10: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

Dictionary Based CompressionDictionary Based Compression Encode variable length strings of symbols as single Encode variable length strings of symbols as single

tokens.tokens. Tokens forms an index to a phrase dictionary.Tokens forms an index to a phrase dictionary. If tokens are smaller than the phrases, they replace the If tokens are smaller than the phrases, they replace the

phrases and compression occurs.phrases and compression occurs. LZ77 is a sliding window technique in which the LZ77 is a sliding window technique in which the

dictionary consists of a set of fixed length phrases found dictionary consists of a set of fixed length phrases found in a window into the previously seen text.in a window into the previously seen text.

LZ78 builds phrases up one symbol at a time, adding a LZ78 builds phrases up one symbol at a time, adding a new symbol to an existing phrase when a match occurs.new symbol to an existing phrase when a match occurs.

Page 11: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

JPEG Graphics FormatJPEG Graphics Format LossyLossy Developed to compress gray-scale or color images.Developed to compress gray-scale or color images. Stores 24bit color per pixel.Stores 24bit color per pixel. JPEG can:JPEG can:

Achieve 10:1 up to 20:1 compression without visible loss.Achieve 10:1 up to 20:1 compression without visible loss. Achieve 30:1 up to 50:1 compression with small to Achieve 30:1 up to 50:1 compression with small to

moderate loss of qualitymoderate loss of quality Achieve up to 100:1 for usage such as previews where low Achieve up to 100:1 for usage such as previews where low

quality is not an issue.quality is not an issue.

Page 12: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

JPEG Graphics FormatJPEG Graphics Format

Drawback in time needed to decode and view the Drawback in time needed to decode and view the image.image.

Well suited for real world photographs, scenic Well suited for real world photographs, scenic depictions of nature.depictions of nature.

Not been shown to work well with line drawings, Not been shown to work well with line drawings, cartoon animations, and other similar drawings.cartoon animations, and other similar drawings.

Viewed by the human eye not analyzed by Viewed by the human eye not analyzed by machines.machines.

Page 13: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

JPEG Graphics FormatJPEG Graphics Format

Flexibility, one has to create smaller lower quality Flexibility, one has to create smaller lower quality images or larger higher quality ones by changing images or larger higher quality ones by changing compression parameters.compression parameters.

Extremely useful to a broad scope of real world Extremely useful to a broad scope of real world applications.applications.

Example - “What is the lowest amount of quality Example - “What is the lowest amount of quality we need?”we need?”

We can control the actual decoding speed as it We can control the actual decoding speed as it relates to the image quality by using inaccurate relates to the image quality by using inaccurate approximations instead of exact calculations.approximations instead of exact calculations.

Page 14: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

GIF (Graphical Interchange Format)GIF (Graphical Interchange Format)

LosslessLossless Developed by Compuserve in 1987Developed by Compuserve in 1987 Two version GIF87a and GIF89a.Two version GIF87a and GIF89a. Images have a bit depth of 8 bits per pixels, Images have a bit depth of 8 bits per pixels,

giving us a maximum of 256 colors.giving us a maximum of 256 colors. Image data is compressed using LZW Image data is compressed using LZW

(Lempel-Ziv) algorithm.(Lempel-Ziv) algorithm.

Page 15: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

GIF contd.GIF contd.

Animation is accomplished by having many Animation is accomplished by having many gif images together in one file.gif images together in one file.

Best performance can be reached by using Best performance can be reached by using images with large percentage of solid colors images with large percentage of solid colors throughout a wide portion of the image throughout a wide portion of the image area.area.

Page 16: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

GIF contd.GIF contd.

GIF89a – extends the GIF87a specification GIF89a – extends the GIF87a specification and adds transparency, text comments, and and adds transparency, text comments, and animation of text. animation of text.

Becoming less used.Becoming less used.

Page 17: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

PNG 0 – Portable Network GraphicPNG 0 – Portable Network Graphic

LosslessLossless Uses modified Lempel-Ziv 77 algorithm, similarly Uses modified Lempel-Ziv 77 algorithm, similarly

being used by winzip, and other zip applications.being used by winzip, and other zip applications. Benefits of 15-35 percent higher compression.Benefits of 15-35 percent higher compression. Works well with true color, palette, and grayscale Works well with true color, palette, and grayscale

color areas.color areas.

Page 18: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

PNG 0 – Portable Network GraphicPNG 0 – Portable Network Graphic

When compared to JPEG, this format offers higher When compared to JPEG, this format offers higher image quality but the compression ratios are not as image quality but the compression ratios are not as great as with JPEG.great as with JPEG.

PNG 0 also uses filtering techniques. It is applied PNG 0 also uses filtering techniques. It is applied toward bytes of data before compression. This toward bytes of data before compression. This intern prepares data for optimal compression. This intern prepares data for optimal compression. This works best when applied to true color images.works best when applied to true color images.

Page 19: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

MPEG (Moving Picture Expert Group)MPEG (Moving Picture Expert Group)

LossyLossy Most popular video formats currently being Most popular video formats currently being

used today.used today. Major standards: MPEG-1 and MPEG-2Major standards: MPEG-1 and MPEG-2 Remove spatial redundancy within a video Remove spatial redundancy within a video

frame and temporal redundancy between frame and temporal redundancy between video framesvideo frames

DCT-based compression is used to DCT-based compression is used to reduce spatial redundancyreduce spatial redundancy

Page 20: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

MPEG contd.MPEG contd.

Motion-compensation is used to exploit Motion-compensation is used to exploit temporal redundancytemporal redundancy

The idea of motion-compensation is to The idea of motion-compensation is to encode a video frame based on other video encode a video frame based on other video frames temporally close to it.frames temporally close to it.

Complicated and CPU intensive.Complicated and CPU intensive. Uses several algorithms to achieve as much Uses several algorithms to achieve as much

as 30:1 compression rateas 30:1 compression rate

Page 21: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

MPEG contd.MPEG contd.

Quantized Discrete Cosine Transform Quantized Discrete Cosine Transform (QDCT).(QDCT).

run-length encodingrun-length encoding Huffman encodingHuffman encoding

Page 22: Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.

ConclusionConclusion

With the growing need to transmit more With the growing need to transmit more data in a faster manner, data compression is data in a faster manner, data compression is vital.vital.

Application determines what method is Application determines what method is used.used.