Chapter 7 – End-to-End Data Two main topics Presentation formatting Compression We will go over the main issues in presentation formatting, but not much.

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.
Chapter 7 End-to-End Data Ohanes Dadian, Danny Luong, Yu Lu.
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.
Chapter 7 End-to-End Data
Spring 2003CS 4611 Multimedia Outline Compression RTP Scheduling.
Department of Computer Engineering University of California at Santa Cruz Data Compression (3) Hai Tao.
Spatial and Temporal Data Mining
JPEG.
T.Sharon-A.Frank 1 Multimedia Size of Data Frame.
End-to-End Data Outline Presentation Formatting Data Compression.
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Multimedia Data The DCT and JPEG Image Compression Dr Mike Spann Electronic, Electrical and Computer.
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.
1 JPEG Compression CSC361/661 Burg/Wong. 2 Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg.
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
Lecture 10 Data Compression.
CS 1308 Computer Literacy and the Internet. Creating Digital Pictures  A traditional photograph is an analog representation of an image.  Digitizing.
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.
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 7 End-to-End Data Copyright © 2010, Elsevier Inc. All rights Reserved.
MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 7 End-to-End Data Copyright © 2010, Elsevier Inc. All rights Reserved.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
D ATA C OMMUNICATIONS Compression Techniques. D ATA C OMPRESSION Whether data, fax, video, audio, etc., compression can work wonders Compression can be.
Multimedia Data DCT Image Compression
22-Oct-15CPSC558: Advanced Computer Networks Chapter 7 End-to-End Data –Data Manipulating Functions (Affecting Throughputs) How to encode the message into.
1 Classification of Compression Methods. 2 Data Compression  A means of reducing the size of blocks of data by removing  Unused material: e.g.) silence.
Addressing Image Compression Techniques on current Internet Technologies By: Eduardo J. Moreira & Onyeka Ezenwoye CIS-6931 Term Paper.
Understanding JPEG MIT-CETI Xi’an ‘99 Lecture 10 Ben Walter, Lan Chen, Wei Hu.
1 Image Formats. 2 Color representation An image = a collection of picture elements (pixels) Each pixel has a “color” Different types of pixels Binary.
Spring 2001CS Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality.
Spring 2000CS 4611 Multimedia Outline Compression RTP Scheduling.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data.
Chapter 1 Background 1. In this lecture, you will find answers to these questions Computers store and transmit information using digital data. What exactly.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 22 – April 1, 2010.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
JPEG.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Page 1KUT Graduate Course Data Compression Jun-Ki Min.
1 Part A Multimedia Production Chapter 2 Multimedia Basics Digitization, Coding-decoding and Compression Information and Communication Technology.
1 COM Chapter 7 End-To-End Data 3 What Do We Do With The Data? From the network’s perspective, applications send messages to one another and these.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
1 Chapter 3 Text and image compression Compression principles u Source encoders and destination decoders u Lossless and lossy compression u Entropy.
JPEG Compression What is JPEG? Motivation
IMAGE COMPRESSION.
Data Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
JPG vs GIF vs PNG What is the difference?
Data Compression.
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
7. End-to-end data Rocky K. C. Chang Department of Computing
Judith Molka-Danielsen, Oct. 02, 2000
Image Coding and Compression
The University of Adelaide, School of Computer Science
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Chapter 8 – Compression Aims: Outline the objectives of compression.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Chapter 7 – End-to-End Data Two main topics Presentation formatting Compression We will go over the main issues in presentation formatting, but not much detail More detail will be covered in compression, especially JPEG and MPEG

Presentation Formatting/Encoding The receiver must be able to extract the same message from the signal as the transmitter sent Encoding is sometimes called argument marshalling Marshalling is actually not trivial – because compilers and application programs have a lot of latitude in how they lay out structures (records) Look over the next high-level graphic

Application data Presentation encoding Application data Presentation decoding Message …

Taxonomy Base types – lowest level Integers, floating point, characters, etc. Flat types Structures Arrays Complex types – highest level Types requiring pointers

Examples Case 1 – sending an ordered string of integers (say financial market data) over the internet – no problem breaking this up into a string of bytes and no problem reassembling the data at the end

Examples continued Case 2 – sending a database of student records over a network. Students would have different numbers of courses that took, so the records would be of different length but the fields would probably be fixed length Packing and unpacking the data would have some difficulties involved

Examples continued Case 3 – a hierarchical database stored in a format with pointers needs to be transmitted over the Internet Packing and unpacking is a large problem Pointers are implemented by memory addresses and will change from one machine (sender) to another (receiver) Marshalling must serialize a complex, pointer implementation of a database – quite difficult!

Two Conversion Strategies Sender converts to common format, common format is transmitted, receiver decodes from common format Seems natural, but … Receiver-makes-right – transmit and let the receiver figure it all out Surprisingly this is often the better approach See the reasons on page 533

Call P Client stub RPC Arguments Marshalled arguments Interface descriptor for Procedure P Stub compiler Message Specification P Server stub RPC Arguments Marshalled arguments Code

Data Compression Blue.bmp = 293 KB Blue.jpeg = 4 KB Not much information Length, width of each area Color of each area

Data Compression - Why Bandwidth is a scarce resource, someone still has to pay for it Often important to compress the data at the sender then transmit the compressed form then decompress it at the receiver.bmp is a good format for application programs like “Paint” but it is much better to transmit with the.jpeg file format

Two classes of Compression Lossless Data recovered from the compression/decompression process is the same as the original Lossy Some information might be removed by the compression/decompression process

Why not always Lossless? Lossy algorithms typically achieve an order of magnitude (10x) better compression than a lossless algorithm 10x makes a big difference in the amount of data that must be transmitted Still images, video and audio are all intended for human eyes or ears – which can tolerate errors and imperfections – because the brain can compensate

Lossless Algorithms Run length encoding (RLE) Replaces consecutive occurrences of a symbol with a single symbol and the number of times it occurs (example: AAACCCC is 3A4C) Differential Pulse Code Modulation Records differences from the base symbol Dictionary-Based Each string is replace with its index in a dictionary

Lossless Example – Differential Encoding Basic idea is to encode changes. Concept is also used in some lossy algorithms No need to store all the information in each of the following pictures – for the last two just the changes which are much smaller Frame 1 A B C Frame 2 A B C D E F then just store “D E F” for Frame 2 and “add” it to Frame 1 to restore Frame 2

Image Compression (JPEG) JPEG = Joint Photographic Experts Group More than a compression algorithm, also defines the format for image or video data JPEG compression takes place in stages Aside first: Fourier transforms and filtering

Fourier Transform Consider the following graph It is a weighted sum of 5 sine waves But the coefficients of the higher frequency terms are very small So the entire figure can be approximated well by the low order terms

1 st Order Approximation Only the first term – not a good approximation

2 nd Order Approximation The first two terms give a better approximation

4 th Order Approximation Skipping ahead to 4 terms the approximation is excellent – almost exact

5 th Order Approximation would be Exact Since the original function is a weighted sum of the first 5 sin terms - sin(kt) - the information that uniquely represents the function is the set of coefficients [10;5;2;1;.5] As we saw we could drop the.5 coefficient and retain most of the shape of the curve – hence our information loss would be very slight. A simple example of lossy.

Fourier vs. DCT The Discrete Cosine Transform (DCT) is very similar to the Fourier Transform (see pages and note that we are using a 2- dimensional transform)

Source image JPEG compression DCTQuantizationEncoding Compressed image

MPEG A very difficult algorithm! Like JPEG for a single frame, but it has three basic kinds of frames Encoding is very difficult and computationally intensive, hence slow, often done offline Decoding is the only part usually done real time

Three Phases Study over the three phases of JPEG DCT Quantization similar to our example of dropping the 5 th coefficient and retaining a graph that was very similar to the original Encoding phase

Frame 1Frame 2Frame 3Frame 4Frame 5Frame 6Frame 7 I frameB frame P frameB frame I frame MPEG compression Forward prediction Bidirectional prediction Compressed stream Input stream

16  16 macroblock with Y component 8  8 macroblock with U component 8  8 macroblock with V component 16  pixel region Color frame

SeqHdrGroup of picturesSeqHdrGroup of picturesSeqEndCode GOPHdrPicture SlicePictureHdrSlice Macroblock SliceHdrMacroblock MBHdrBlock(0)Block(1)Block(2)Block(3)Block(4)Block(5) … … … …