Understanding JPEG MIT-CETI Xi’an ‘99 Lecture 10 Ben Walter, Lan Chen, Wei Hu.

Slides:



Advertisements
Similar presentations
JPEG Compresses real images Standard set by the Joint Photographic Experts Group in 1991.
Advertisements

15 Data Compression Foundations of Computer Science ã Cengage Learning.
Data Compression CS 147 Minh Nguyen.
Digital Color 24-bit Color Indexed Color Image file compression
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.
A Matlab Playground for JPEG Andy Pekarske Nikolay Kolev.
Error detection and concealment for Multimedia Communications Senior Design Fall 06 and Spring 07.
School of Computing Science Simon Fraser University
Chapter 5 Making Connections Efficient: Multiplexing and Compression
School of Computing Science Simon Fraser University
Lecture05 Transform Coding.
Computer Science 335 Data Compression.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
CMPT 365 Multimedia Systems
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.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
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 Compression JPEG. Fact about JPEG Compression JPEG stands for Joint Photographic Experts Group JPEG compression is used with.jpg and can be embedded.
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.
JPEG C OMPRESSION A LGORITHM I N CUDA Group Members: Pranit Patel Manisha Tatikonda Jeff Wong Jarek Marczewski Date: April 14, 2009.
Chapter 2 Source Coding (part 2)
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
Klara Nahrstedt Spring 2011
D ATA C OMMUNICATIONS Compression Techniques. D ATA C OMPRESSION Whether data, fax, video, audio, etc., compression can work wonders Compression can be.
JPEG image compression Group 7 Arvind Babel (y07uc024) Nikhil Agarwal (y08uc086)
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Multimedia Data DCT Image Compression
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
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.
Digital Media Dr. Jim Rowan ITEC 2110 Bitmapped Images.
1 Image Formats. 2 Color representation An image = a collection of picture elements (pixels) Each pixel has a “color” Different types of pixels Binary.
An introduction to audio/video compression Dr. Malcolm Wilson.
Digital Media Lecture 4: Bitmapped images: Compression & Convolution Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 10 – Compression Basics and JPEG Compression (Part 4) Klara Nahrstedt Spring 2014.
JPEG.
CS654: Digital Image Analysis
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Chapter 8 Lossy Compression Algorithms. Fundamentals of Multimedia, Chapter Introduction Lossless compression algorithms do not deliver compression.
By Dr. Hadi AL Saadi Lossy Compression. Source coding is based on changing of the original image content. Also called semantic-based coding High compression.
An introduction to audio/video compression Prepared by :: Bhatt shivani ( )
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.
Chapter 8 Lossy Compression Algorithms
JPEG Compression What is JPEG? Motivation
IMAGE COMPRESSION.
Chapter 9 Image Compression Standards
Data Compression.
Algorithms in the Real World
A Simple Image Compression : JPEG
JPEG Image Coding Standard
Last update on June 15, 2010 Doug Young Suh
Data Compression.
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
Dr. Jim Rowan ITEC 2110 Bitmapped Images
CMPT 365 Multimedia Systems
Representing Images 2.6 – Data Representation.
JPEG Image Compression
Image Coding and Compression
15 Data Compression Foundations of Computer Science ã Cengage Learning.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

Understanding JPEG MIT-CETI Xi’an ‘99 Lecture 10 Ben Walter, Lan Chen, Wei Hu

What is JPEG? JPEG is a method for compressing image data so it takes less space to store or transmit across a network. JPEG is very efficient. A file that was 1Mb in size could be compressed to as little 25Kb (1:40)! JPEG achieves such good compression ratios because it is lossy - but the loss is not visually perceptible.

Overview Images contain different frequencies; low frequencies correspond the slowly varying colors, high frequencies correspond to fine detail. The low frequencies are much more important than the high frequencies; we can throw away some high frequencies to compress our data!

Overview Note that we aren’t talking about the frequencies of light, but of the light and dark areas in the image! We need a way to go from the color of pixels, which is essentially a number, to frequencies… This way is called the Discrete Cosine Transform (DCT).

A JPEG Encoder Entropy Encoder DCT Quantizer

The Discrete Cosine Transform =

= x 1 + x 2 + … + x 15 + x 16

The Discrete Cosine Transform

The 2D DCT So far we’ve been talking about one- dimensional images, just one line of the picture… but an image has two dimensions. We can talk about frequencies in two dimensions, although it’s much harder to visualize.

Basis Remember we saw that every 16-pixel line can be written as the sum of 16 different waves? Those 16 waves formed a basis for the set of 16-pixel lines.

Basis When we are compressing a JPEG, we work in blocks of 8x8 pixels. That’s 64 numbers, so there are 64 different basis images. This means we can describe any 8x8 image as a combination (a sum) of those 64 images.

Basis

The 2D DCT

Summary The Discrete Cosine Transform (DCT) allows us to determine what frequencies make up an image. Into this stage we have 8x8 numbers that are the values of each pixel. Out of this stage we have 8x8 numbers that represent how much of each frequency (or how much of each basis) is in the image.

A JPEG Encoder Entropy Encoder DCT Quantizer

Quantization So we still have 64 numbers to work with - we haven’t reduced the size at all! The reason we wanted the numbers as frequencies was because some frequencies are more important than others. The low frequencies are the most important, the high frequencies are not very important (think back to building up the image).

Quantization Before quantization, each frequency can be between 0 and 255. To quantize, we divide frequencies by a number so that the range is reduced. For example, it becomes 0 to 31. For high frequencies we divide by a higher number.

Quantization Before we had, say: 134,113,145,117,32,11, 17,5… 4. After quantization, we might have: 116, 55, 55, 30, 1, 0, 0, … 0.

Quantization

Quantization 300 kB75 kB Original Medium Quality JPEG

Quantization 300 kB35 kB OriginalLow Quality JPEG

Summary The degree of quantization, dictates the amount of information “thrown away”. If you throw away more information, you will get better compression, but the picture will start to look bad. When you adjust the quality of a JPEG save from Photoshop, you are changing the quantization!

A JPEG Encoder Entropy Encoder DCT Quantizer

Entropy Encoding Entropy encoding is another stage of compression, that relies on statistical properties of the data, e.g. most frequently occuring numbers, lots of the same number in a row. So the take the 64 numbers, do Run Length Encoding, then follow that with Huffman Coding! (Remember yesterday?)

Entropy Encoding These compression schemes now work very well, because quantization turns numbers like 132, 117, 78 into numbers more like 31, 31, 15. After quantization, the range of numbers is smaller, and there are often large runs of numbers - so it can be highly compressed! This is where all of the compression happens!

Summary Entropy Encoder DCT Quantizer

Summary We break up the image into 8x8 blocks. We calculate the frequencies in each block, this allows us to identify the important and less important data. We throw away some less important data. We compress the resulting data. The result: ~ 1:40 compression!