Data Compression.

Slides:



Advertisements
Similar presentations
T.Sharon-A.Frank 1 Multimedia Compression Basics.
Advertisements

15 Data Compression Foundations of Computer Science ã Cengage Learning.
Data Compression CS 147 Minh Nguyen.
Image Compression. Data and information Data is not the same thing as information. Data is the means with which information is expressed. The amount of.
Data Compression Michael J. Watts
Chapter 7 End-to-End Data
Compression & Huffman Codes
Chapter 5 Making Connections Efficient: Multiplexing and Compression
School of Computing Science Simon Fraser University
Spring 2003CS 4611 Multimedia Outline Compression RTP Scheduling.
SWE 423: Multimedia Systems
Spatial and Temporal Data Mining
Compression JPG compression, Source: Original 10:1 Compression 45:1 Compression.
1 Data Compression Engineering Math Physics (EMP) Steve Lyon Electrical Engineering.
Computer Science 335 Data Compression.
Compression & Huffman Codes Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Spring 2015 Mathematics in Management Science Binary Linear Codes Two Examples.
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Software Research Image Compression Mohamed N. Ahmed, Ph.D.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
Lecture 10 Data Compression.
Chapter 2 Source Coding (part 2)
Compression is the reduction in size of data in order to save space or transmission time. And its used just about everywhere. All the images you get on.
DATA COMPRESSION LOSSY COMPRESSION METHODS What it is… A compression of information that is acceptable in pictures or videos, but not texts or programs.
Data Compression.
D ATA C OMMUNICATIONS Compression Techniques. D ATA C OMPRESSION Whether data, fax, video, audio, etc., compression can work wonders Compression can be.
Multimedia Specification Design and Production 2012 / Semester 1 / L3 Lecturer: Dr. Nikos Gazepidis
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
Image Compression (Chapter 8) CSC 446 Lecturer: Nada ALZaben.
Huffman Coding. Huffman codes can be used to compress information –Like WinZip – although WinZip doesn’t use the Huffman algorithm –JPEGs do use Huffman.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
Digital Image Processing Image Compression
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
COMPRESSION. Compression in General: Why Compress? So Many Bits, So Little Time (Space) CD audio rate: 2 * 2 * 8 * = 1,411,200 bps CD audio storage:
An introduction to audio/video compression Dr. Malcolm Wilson.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
CSCI-100 Introduction to Computing Hardware Part II.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Chapter 1 Background 1. In this lecture, you will find answers to these questions Computers store and transmit information using digital data. What exactly.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Multi-media Data compression
An introduction to audio/video compression Prepared by :: Bhatt shivani ( )
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
Data Compression: Huffman Coding in Weiss (p.389)
Data Compression Michael J. Watts
Textbook does not really deal with compression.
JPEG Compression What is JPEG? Motivation
Compression & Huffman Codes
IMAGE COMPRESSION.
Data Compression.
Chapter Five Making Connections Efficient: Multiplexing and Compression Data Communications and Computer Networks: A Business User’s Approach Eighth Edition.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Algorithms in the Real World
Digital Image Processing Lecture 21: Lossy Compression May 18, 2005
Video Compression - MPEG
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
UNIT IV.
Judith Molka-Danielsen, Oct. 02, 2000
Image Coding and Compression
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Govt. Polytechnic Dhangar(Fatehabad)
Chapter 8 – Compression Aims: Outline the objectives of compression.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Data Compression

What is an image?

Why Data Compression? Make optimal use of limited storage space Save time and help to optimize resources If compression and decompression are done in I/O processor, less time is required to move data to or from storage subsystem, freeing I/O bus for other work In sending data over communication line: less time to transmit and less storage to host OR Reduce the memory required for storage Improve the data access rate from storage device and Reduce the bandwidth and/or the time required for transfer across communication channels.

Image Redundancies Redundancy refers to the amount of wasted space consumed by storage media to record picture information in a digital image. Image compression is achieved by exploiting redundancies in the image. These redundancies could be spatial, spectral, or temporal redundancy. Spatial redundancy: elements that are duplicated within a structure, such as neighboring pixels in a still image. Exploiting spatial redundancy is how compression is performed. Spectral redundancy is due to correlation between different color planes. Temporal redundancy: pixels in two video frames that have the same values in the same location. It is due to correlation between different frames in a sequence of images such as in videoconferencing applications in broadcast images. Exploiting temporal redundancy is one of the primary techniques in video compression.

Data Compression Methods Data compression is about storing and sending a smaller number of bits. There’re two major categories for methods to compress data: lossless and lossy methods

Lossless Compression Methods In lossless methods, original data and the data after compression and decompression are exactly the same. Redundant data is removed in compression and added during decompression. Lossless methods are used when we can’t afford to lose any data: legal and medical documents, computer programs.

Run-length encoding Simplest method of compression. How: replace consecutive repeating occurrences of a symbol by 1 occurrence of the symbol itself, then followed by the number of occurrences. The method can be more efficient if the data uses only 2 symbols (0s and 1s) in bit patterns and 1 symbol is more frequent than another.

Huffman Coding Assign fewer bits to symbols that occur more frequently and more bits to symbols appear less often. There’s no unique Huffman code and every Huffman code has the same average code length. Algorithm: Make a leaf node for each code symbol Add the generation probability of each symbol to the leaf node Take the two leaf nodes with the smallest probability and connect them into a new node Add 1 or 0 to each of the two branches The probability of the new node is the sum of the probabilities of the two connecting nodes If there is only one node left, the code construction is completed. If not, go back to (2)

Huffman Coding Example

Huffman Coding Encoding Decoding

Lossy Compression Methods Used for compressing images and video files (our eyes cannot distinguish subtle changes, so lossy data is acceptable). These methods are cheaper, less time and space. Several methods: JPEG: compress pictures and graphics MPEG: compress video MP3: compress audio

JPEG Encoding Used to compress pictures and graphics. In JPEG, a grayscale picture is divided into 8x8 pixel blocks to decrease the number of calculations. Basic idea: Change the picture into a linear (vector) sets of numbers that reveals the redundancies. The redundancies is then removed by one of lossless compression methods.

JPEG Encoding- DCT DCT: Discrete Concise Transform DCT transforms the 64 values in 8x8 pixel block in a way that the relative relationships between pixels are kept but the redundancies are revealed. Example: A gradient grayscale

Quantization & Compression After T table is created, the values are quantized to reduce the number of bits needed for encoding. Quantization divides the number of bits by a constant, then drops the fraction. This is done to optimize the number of bits and the number of 0s for each particular application. Compression Quantized values are read from the table and redundant 0s are removed. To cluster the 0s together, the table is read diagonally in an zigzag fashion. The reason is if the table doesn’t have fine changes, the bottom right corner of the table is all 0s. JPEG usually uses lossless run-length encoding at the compression phase.

JPEG Encoding

MPEG Encoding Used to compress video. Basic idea: Each video is a rapid sequence of a set of frames. Each frame is a spatial combination of pixels, or a picture. Compressing video = spatially compressing each frame + temporally compressing a set of frames.

MPEG Encoding Spatial Compression Temporal Compression Each frame is spatially compressed by JPEG. Temporal Compression Redundant frames are removed. For example, in a static scene in which someone is talking, most frames are the same except for the segment around the speaker’s lips, which changes from one frame to the next.

Audio Compression Used for speech or music Speech: compress a 64 kHz digitized signal Music: compress a 1.411 MHz signal Two categories of techniques: Predictive encoding Perceptual encoding

Audio Encoding Predictive Encoding Perceptual Encoding: MP3 Only the differences between samples are encoded, not the whole sample values. Several standards: GSM (13 kbps), G.729 (8 kbps), and G.723.3 (6.4 or 5.3 kbps) Perceptual Encoding: MP3 CD-quality audio needs at least 1.411 Mbps and cannot be sent over the Internet without compression. MP3 (MPEG audio layer 3) uses perceptual encoding technique to compress audio.