Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.

Slides:



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

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.
Prof. Harriet Fell Fall 2012 Lecture 7 – September 19, 2012
Chapter 7 End-to-End Data
School of Computing Science Simon Fraser University
CHEN Guowang FANG Wei HUANG Baihan
1 Data Compression Engineering Math Physics (EMP) Steve Lyon Electrical Engineering.
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.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
Color spaces and JPEG. Colors physically, color is electro-magnetic radiation (i.e. light with various wave length, between 390nm- 750nm) percieved by.
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 and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
{ Lossy Compression William Dayton Nick Trojanowski.
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.
Compression Algorithms Robert Buckley MCIS681 Online Dr. Smith Nova Southeastern University.
JPEG C OMPRESSION A LGORITHM I N CUDA Group Members: Pranit Patel Manisha Tatikonda Jeff Wong Jarek Marczewski Date: April 14, 2009.
CSE & CSE Multimedia Processing Lecture 7
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.
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.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
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
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
Indiana University Purdue University Fort Wayne Hongli Luo
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
JPEG CIS 658 Fall 2005.
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.
Compression video overview 演講者:林崇元. Outline Introduction Fundamentals of video compression Picture type Signal quality measure Video encoder and decoder.
An introduction to audio/video compression Dr. Malcolm Wilson.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 10 – Compression Basics and JPEG Compression (Part 4) Klara Nahrstedt Spring 2014.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
JPEG (Joint Photographic Expert Group)
JPEG.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Introduction to JPEG m Akram Ben Ahmed
JPEG. Introduction JPEG (Joint Photographic Experts Group) Basic Concept Data compression is performed in the frequency domain. Low frequency components.
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.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
JPEG Compression What is JPEG? Motivation
IMAGE COMPRESSION.
Chapter 9 Image Compression Standards
Data Compression.
JPEG Image Coding Standard
JPEG.
Digital 2D Image Basic Masaki Hayashi
Data Compression.
Data Compression CS 147 Minh Nguyen.
Software Equipment Survey
CMPT 365 Multimedia Systems
Standards Presentation ECE 8873 – Data Compression and Modeling
The JPEG Standard.
Image Coding and Compression
Presentation transcript:

Trevor McCasland Arch Kelley

 Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an encoded copy of the original data with a (much) smaller size Compression Ratio = Uncompressed Size/Compressed Size Typical Compression Ratios GIF JPEG(low) JPEG(mid) JPEG(high) PNG 4:1- 10:1- 30:1- 60: % 10:1 20:1 50:1 100:1 smaller than GIF

 The following JPEGs are compressed with different ratios 1:1(low) 1:10(low) 1:30(mid) 1:30 with 5Xzoom

 Lossy: Original data->Lossy Compressor ->Compressed Data ◦ Reverse: Compressed Data->Decompressor ->Altered Data (not the same as original!)  Lossless: Original data->Lossy Compressor ->Compressed Data ◦ Reverse: Compressed Data->Decompressor ->Original Data (exactly the same!)  Lossy is best used for data that we can afford to irreversibly alter (images, audio, video)

 Common techniques used in lossy compression methods include: ◦ Color spacing/chroma downsampling (images) ◦ Quantization ◦ Discrete cosine transform (DCT) ◦ Zigzag ordering and run-length encoding ◦ Entropy coding (Huffman coding)

 1) Image contents change slowly across the image, i.e., it is unusual for intensity values to vary widely several times in a small area, for example, within an 8x8 image block  2) Humans are much less likely to notice the loss of very high spatial frequency components than the loss of lower frequency components ◦ High frequencies can be thrown out without noticeable change to the image

 3) Visual accuracy in distinguishing closely spaced lines is much greater for black and white than for color  Taken together, these three observations can be used to compress images in a way that reduces loss of visual quality while significantly downsizing the filesize

 A way of defining the boundaries in which an image can be represented using color ◦ Examples: RGB, YCbCr, YPbPr, YUV  RGB is most basic color space

 A pixel’s color is determined by its RGB (red blue green) value ◦ Eg. R=30, G=100, B=50  Image formats using lossy compression often convert this data into a format that separates luminance (brightness) and chrominance (hue) ◦ Eg. Y = (R + G + B) / 3, Cb = B - Y Cr = R - Y Data of original image (top) is Separated into luminance data (left) and chrominance data (right) *Operation takes O(1) time for each 8x8 block and is done on n blocks => Running time O(n)

 Used to reduce the possible values that can be used to represent the chrominance of a pixel  Specific color spacing allows for chroma downsampling ◦ Throw out portions of the chrominance (color) data in a group of pixels to reduce the total space used ◦ Use the chroma from one part of the group to display the other part of the group ◦ Source of data loss (‘lossy’ method)

 Different patterns exist for disposing of chrominance (UV values in figures) for portions or pixel groups ◦ Most common is 4:2:2 ◦ 4:4:4 is pointless because no data is being disposed (no downsampling occurs) 4:2:2 sampling 4:1:1 sampling 4:2:1 sampling 4:4:4 sampling

 DCT main purpose is to remove redundancy of neighboring pixels to provide compression  The transform maps the correlated data to transformed uncorrelated coefficients High compaction of information

1D DCT-II x[n] = original value X[k]= transformed value N= number of columns k= transform coefficient 1D-DCT-II 1D-IDCT-II

2D DCT XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX 1D-DCT Create an intermediate Sequence by computing 1D-DCT on rows Compute 1D-DCT on the columns

The DCT coefficient matrix is U The input coefficient matrix is A Where

High information compaction at (0,0)

Each basis function is multiplied by its coefficient and then added to the transformed image

 complexity O(n ), running it 2n times to build a 2D DCT with complexity O(n ).  We can do better again by replacing the O(n ) DCT algorithm with one factored similarly to a Fast Fourier Transform which would have O(nlogn)complexity.  O(2n*nlogn) = O(n logn)

 Reduce the range of values used to represent image/audio data ◦ Similar to chroma downsampling, but applied to a full array of values  Achieved by multiplying a constant ‘quantization matrix’ with the DCT coefficient matrix ◦ Quantization matrix can be user-defined ◦ Can adjust quantization level (throw out more or less data) by altering matrix

X Q =round(X n,m /Q n,m ) X=Q= XQ=XQ= Ex: Time complexity: O(n 2 ) where n=#columns and rows (n 2 O(1) operations)

 Main source of data loss in lossy compression algorithms  Only works on data represented using frequencies ◦ Encoder uses different quantization levels for different frequencies based on human vision preferences  Usually results in a much smaller filesize (typical JPEG compression ratio is 30:1)

 Reorder quantized matrix to put non-zero elements in a sortable sequence   [-26, -3 0, -3, …, -1, 0, 0] --Do not store zeroes after final element in zigzag row with a non-zero element

 Simple method of storing similar data using a single value and a run length ◦ Ex: WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWW WWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW becomes 12W1B12W3B24W1B14W Time complexity: O(n) where n=# of characters in string

 RLE string is entropy coded to add an extra layer of compression/further reduce filesize  Entropy coding is a lossless method ◦ Common algorithm used is Huffman Coding ◦ Makes trees that look like: *Not important to understand lossy compression

 JPEG ◦ Lossy image filetype that follows the process exactly  MPEG-2 ◦ Uses chroma downsampling and different quantization values to adjust level of compression ◦ Streaming video lets users adjust quality  MP3 ◦ Quantization removes frequencies that humans can’t hear by rounding them to zero  Many, many more

 Questions? ◦ -Where does the loss of data actually occur? ◦ -Why do highly compressed images look ‘blocky’? ◦ -What flaws appear in highly compressed audio? ◦ -How long does it take to learn all of this?  O(n n ) time