CMPT 365 Multimedia Systems

Slides:



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

Chapter 7 End-to-End Data
SWE 423: Multimedia Systems
Department of Computer Engineering University of California at Santa Cruz Data Compression (3) Hai Tao.
JPEG.
Data Compression Basics
Image (and Video) Coding and Processing Lecture: DCT Compression and JPEG Wade Trappe Again: Thanks to Min Wu for allowing me to borrow many of her slides.
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
JPEG Still Image Data Compression Standard
Hao Jiang Computer Science Department Sept. 27, 2007
Case Study ARM Platform-based JPEG Codec HW/SW Co-design
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.
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.
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 Multimedia Systems (Module 4 Lesson 1)
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.
Lossy Compression Based on spatial redundancy Measure of spatial redundancy: 2D covariance Cov X (i,j)=  2 e -  (i*i+j*j) Vertical correlation   
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.
JPEG Motivations: Motivations: 1.Uncompressed video and audio data are huge. In HDTV, the bit rate easily exceeds 1 Gbps. --> big problems for.
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.
Klara Nahrstedt Spring 2011
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007.
Chapter 9 Image Compression Standards 9.1 The JPEG Standard 9.2 The JPEG2000 Standard 9.3 The JPEG-LS Standard 9.4 Bi-level Image Compression Standards.
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Indiana University Purdue University Fort Wayne Hongli Luo
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
JPEG CIS 658 Fall 2005.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
8. 1 MPEG MPEG is Moving Picture Experts Group On 1992 MPEG-1 was the standard, but was replaced only a year after by MPEG-2. Nowadays, MPEG-2 is gradually.
1 Image Formats. 2 Color representation An image = a collection of picture elements (pixels) Each pixel has a “color” Different types of pixels Binary.
Chapter 9 Image Compression Standards 9.1 The JPEG Standard 9.2 The JPEG2000 Standard 9.3 The JPEG-LS Standard 9.5 Further Exploration Li & Drew1.
Compression There is need for compression: bandwidth constraints of multimedia applications exceed the capability of communication channels Ex. QCIF bit.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 10 – Compression Basics and JPEG Compression (Part 4) Klara Nahrstedt Spring 2014.
The JPEG Standard J. D. Huang Graduate Institute of Communication Engineering National Taiwan University, Taipei, Taiwan, ROC.
JPEG (Joint Photographic Expert Group)
JPEG Image Compression Standard Introduction Lossless and Lossy Coding Schemes JPEG Standard Details Summary.
JPEG.
CS654: Digital Image Analysis
Page 11/28/2016 CSE 40373/60373: Multimedia Systems Quantization  F(u, v) represents a DCT coefficient, Q(u, v) is a “quantization matrix” entry, and.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Introduction to JPEG m Akram Ben Ahmed
Image Processing Architecture, © Oleh TretiakPage 1Lecture 7 ECEC 453 Image Processing Architecture Lecture 8, February 5, 2004 JPEG: A Standard.
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 ( )
MP3 and AAC Trac D. Tran ECE Department The Johns Hopkins University Baltimore MD
JPEG Compression What is JPEG? Motivation
Chapter 9 Image Compression Standards
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
JPEG Image Coding Standard
Chapter 9 Image Compression Standards
Discrete Cosine Transform
JPEG.
Image Compression Standards (JPEG)
Ganbat OIP Lab
JPEG Pasi Fränti
JPEG Still Image Data Compression Standard
The JPEG Standard.
Presentation transcript:

CMPT 365 Multimedia Systems Media Compression - Image Summer 2018

Facts about JPEG JPEG - Joint Photographic Experts Group International standard: 1992 Most popular format Other formats (.bmp) use similar techniques Lossy image compression transform coding using the DCT JPEG 2000 New generation of JPEG – well, never succeeds DWT (Discrete Wavelet Transform)

Three Major Observations Useful image contents change relatively 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. - much of the information in an image is repeated, hence “spatial redundancy". Compression Ratio: 7.7 Compression Ratio: 33.9

Observations Observation 2: Psychophysical experiments suggest that humans are much less likely to notice the loss of very high spatial frequency components than the loss of lower frequency components. - the spatial redundancy can be reduced by largely reducing the high spatial frequency contents. Compression Ratio: 7.7 Compression Ratio: 33.9

Observations Observation 3: Visual acuity (accuracy in distinguishing closely spaced lines) is much greater for gray (black and white) than for color. - chroma subsampling (4:2:0) is used in JPEG.

8x8 DCT Example or u Original values of an 8x8 block or v or u DC Component Original values of an 8x8 block (in spatial domain) Corresponding DCT coefficients (in frequency domain)

JPEG Steps Block Preparation Transform Quantization - RGB to YUV (YIQ) planes Transform - 2D Discrete Cosine Transform (DCT) on 8x8 blocks. Quantization - Quantized DCT Coefficients (lossy). Encoding of Quantized Coefficients Zigzag Scan Differential Pulse Code Modulation (DPCM) on DC component Run Length Encoding (RLE) on AC Components Entropy Coding: Huffman or Arithmetic

JPEG Diagram

JPEG: Block Preparation RGB Input Data After Block Preparation Input image: 640 x 480 RGB (24 bits/pixel) transformed to three planes: Y: (640 x 480, 8-bit/pixel) Luminance (brightness) plane. U, V: (320 X 240 8-bits/pixel) Chrominance (color) planes.

Block Effect Using blocks, however, has the effect of isolating each block from its neighboring context. choppy (“blocky") with high compression ratio Compression Ratio: 7.7 Compression Ratio: 33.9 Compression Ratio: 60.1

JPEG: Quantized DCT Coefficients q(u,v) Uniform quantization: Divide by constant N and round result. In JPEG, each DCT F[u,v] is divided by a constant q(u,v). The table of q(u,v) is called quantization table. F[u,v] Rounded F[u,v]/ Q(u,v)

More about Quantization Quantization is the main source for loss Q(u, v) of larger values towards lower right corner More loss at the higher spatial frequencies Supported by Observations 1 and 2. Q(u,v) obtained from psychophysical studies maximizing the compression ratio while minimizing perceptual losses

JPEG: Encoding of Quantized DCT Coefficients DC Components (zero frequency) DC component of a block is large and varied, but often close to the DC value of the previous block. Encode the difference from previous Differential Pulse Code Modulation (DPCM). AC components: Lots of zeros (or close to zero) Run Length Encoding (RLE, or RLC) encode as (skip, value) pairs Skip: number of zeros, value: next non-zero component (0,0) as end-of-block value.

JPEG: Zigzag Scan Maps an 8x8 block into a 1 x 64 vector Zigzag pattern group low frequency coefficients in top of vector.

Recall: 2-D DCT Basis Matrices For 2-point DCT For 4-point DCT

Recall: 2-D DCT Basis Matrices: 8-point DCT

Why ZigZag Scan RLC aims to turn the block values into sets <#-zeros-to-skip , next non-zero value>. ZigZag scan is more effective

Runlength Encoding (RLE) A typical 8x8 block of quantized DCT coefficients. Most of the higher order coefficients have been quantized to 0.      12  34   0   54    0    0    0    0 87   0   0   12    3    0    0    0 16   0   0    0    0    0    0    0 0    0    0    0    0    0    0    0 Zig-zag scan: the sequence of DCT coefficients to be transmitted: 12 34 87 16 0 0 54 0 0 0 0 0 0 12 0 0 3 0 0 0 ..... DC coefficient (12) is sent via a separate Huffman table. Runlength coding remaining coefficients: 34 | 87 | 16 | 0 0 54 | 0 0 0 0 0 0 12 | 0 0 3 | 0 0 0 ..... Further compression: statistical (entropy) coding

Entropy Coding Huffman/arithmetic coding Lossless

JPEG Modes Sequential Mode Progressive Mode. Hierarchical Mode. default JPEG mode, implicitly assumed in the discussions so far. Each graylevel image or color image component is encoded in a single left-to-right, top-to-bottom scan. Progressive Mode. Hierarchical Mode. Lossless Mode

Progressive Mode Progressive Method 1. Spectral selection Delivers low quality versions of the image quickly, followed by higher quality passes. Method 1. Spectral selection - higher AC components provide detail texture information Scan 1: Encode DC and first few AC components, e.g., AC1, AC2. Scan 2: Encode a few more AC components, e.g., AC3, AC4, AC5. ... Scan k: Encode the last few ACs, e.g., AC61, AC62, AC63.

Progressive Mode cont’d Method 2: Successive approximation: - Instead of gradually encoding spectral bands, all DCT coefficients are encoded simultaneously but with their most significant bits (MSBs) first Scan 1: Encode the rst few MSBs, e.g., Bits 7, 6, 5, 4. Scan 2: Encode a few more less signicant bits, e.g., Bit 3. ... Scan m: Encode the least signicant bit (LSB), Bit 0.

Hierarchical Mode Encoding Transmission: First, lowest resolution picture (using low-pass filter) Then, successively higher resolutions additional details (encoding differences) Transmission: transmitted in multiple passes progressively improving quality Similar to Progressive JPEG

Lossless Mode Using prediction and entropy coding Forming a differential prediction: A predictor combines the values of up to three neighboring pixels as the predicted value for the current pixel Seven schemes for combination Encoding: The encoder compares the prediction with the actual pixel value at the position `X' and encodes the difference using entropy coding

7 Predictors

Comparison with Other Lossless

JPEG Bitstream

JPEG 2000 JPEG 1992 JPEG 2000 .jp2 for ISO/IEC 15444-1 .jpx for extended part-2 specifications (ISO/IEC 15444-2) Wavelet transform based 20% gain in compression

JPEG 2000 vs JPEG Original image

JPEG2000 vs JPEG

Further Exploration Textbook Chapter 9 Other sources The JPEG Still Image Compression Standard by Pennebaker and Mitchell JPEG2000: Image Compression Fundamentals, Standards, and Practice by Taubman and Marcellin Image and Video Compression Standards: Algorithms and Architectures, 2nd ed. by Bhaskaren and Konstantinides