Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

Similar documents
Introduction to Compression. Norm Zeck

15 Data Compression 2014/9/21. Objectives After studying this chapter, the student should be able to: 15-1 LOSSLESS COMPRESSION

CS 335 Graphics and Multimedia. Image Compression

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

Robert Matthew Buckley. Nova Southeastern University. Dr. Laszlo. MCIS625 On Line. Module 2 Graphics File Format Essay

CMPT 365 Multimedia Systems. Media Compression - Image

Image, video and audio coding concepts. Roadmap. Rationale. Stefan Alfredsson. (based on material by Johan Garcia)

Compression II: Images (JPEG)

Introduction ti to JPEG

Index. 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5.

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

Professor Laurence S. Dooley. School of Computing and Communications Milton Keynes, UK

CSCD 443/533 Advanced Networks Fall 2017

What is multimedia? Multimedia. Continuous media. Most common media types. Continuous media processing. Interactivity. What is multimedia?

7.5 Dictionary-based Coding

IMAGE COMPRESSION. October 7, ICSY Lab, University of Kaiserslautern, Germany

Multimedia. What is multimedia? Media types. Interchange formats. + Text +Graphics +Audio +Image +Video. Petri Vuorimaa 1

Fundamentals of Video Compression. Video Compression

So, what is data compression, and why do we need it?

Lecture 5: Compression I. This Week s Schedule

Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

Lecture 8 JPEG Compression (Part 3)

ECE 417 Guest Lecture Video Compression in MPEG-1/2/4. Min-Hsuan Tsai Apr 02, 2013

Compression; Error detection & correction

Mpeg 1 layer 3 (mp3) general overview

CSEP 521 Applied Algorithms Spring Lossy Image Compression

Image Pyramids and Applications

Digital Image Representation Image Compression

An introduction to JPEG compression using MATLAB

Video Compression MPEG-4. Market s requirements for Video compression standard

Principles of Audio Coding

compression and coding ii

VC 12/13 T16 Video Compression

5: Music Compression. Music Coding. Mark Handley

JPEG Modes of Operation. Nimrod Peleg Dec. 2005

Lossy Coding 2 JPEG. Perceptual Image Coding. Discrete Cosine Transform JPEG. CS559 Lecture 9 JPEG, Raster Algorithms

Wireless Communication

Compression; Error detection & correction

ELL 788 Computational Perception & Cognition July November 2015

Image coding and compression

Multimedia Communications. Transform Coding

Computer and Machine Vision

Part 1 of 4. MARCH

Audio Compression. Audio Compression. Absolute Threshold. CD quality audio:

Topic 5 Image Compression

Perceptual coding. A psychoacoustic model is used to identify those signals that are influenced by both these effects.

Lossy compression. CSCI 470: Web Science Keith Vertanen

Lecture 12: Compression

Video Compression An Introduction

CISC 7610 Lecture 3 Multimedia data and data formats

Multimedia Communications. Audio coding

JPEG. Wikipedia: Felis_silvestris_silvestris.jpg, Michael Gäbler CC BY 3.0

Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013

Audio-coding standards

Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal.

Lecture 8 JPEG Compression (Part 3)

Compression of Stereo Images using a Huffman-Zip Scheme

2014 Summer School on MPEG/VCEG Video. Video Coding Concept

Audio Coding and MP3

INF5063: Programming heterogeneous multi-core processors. September 17, 2010

End-to-End Data. Presentation Formatting. Difficulties. Outline Formatting Compression

Audio-coding standards

IT Digital Image ProcessingVII Semester - Question Bank

Chapter 14 MPEG Audio Compression

2.2: Images and Graphics Digital image representation Image formats and color models JPEG, JPEG2000 Image synthesis and graphics systems

CHAPTER 4 REVERSIBLE IMAGE WATERMARKING USING BIT PLANE CODING AND LIFTING WAVELET TRANSFORM

Digital Image Representation. Image Representation. Color Models

Color Imaging Seminar. Yair Moshe

IMAGE COMPRESSION USING HYBRID QUANTIZATION METHOD IN JPEG

Image Compression Algorithm and JPEG Standard

JPEG: An Image Compression System. Nimrod Peleg update: Nov. 2003

ELE 201, Spring 2014 Laboratory No. 4 Compression, Error Correction, and Watermarking

Introduction to Computer Science (I1100) Data Storage

Optical Storage Technology. MPEG Data Compression

Image Coding and Compression

JPEG Compression. What is JPEG?

CS 260: Seminar in Computer Science: Multimedia Networking

IMAGE COMPRESSION USING FOURIER TRANSFORMS

Chapter 1. Digital Data Representation and Communication. Part 2

A New Psychovisual Threshold Technique in Image Processing Applications

Digital Video Processing

Figure 1. Generic Encoder. Window. Spectral Analysis. Psychoacoustic Model. Quantize. Pack Data into Frames. Additional Coding.

IMAGE COMPRESSION. Chapter - 5 : (Basic)

MPEG-1. Overview of MPEG-1 1 Standard. Introduction to perceptual and entropy codings

Source Coding Techniques

A COMPRESSION TECHNIQUES IN DIGITAL IMAGE PROCESSING - REVIEW

BLIND MEASUREMENT OF BLOCKING ARTIFACTS IN IMAGES Zhou Wang, Alan C. Bovik, and Brian L. Evans. (

Compressed Audio Demystified by Hendrik Gideonse and Connor Smith. All Rights Reserved.

Digital Image Processing

Lecture Coding Theory. Source Coding. Image and Video Compression. Images: Wikipedia

( ) ; For N=1: g 1. g n

Multimedia Signals and Systems Still Image Compression - JPEG

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

Lecture 16 Perceptual Audio Coding

Discrete Wavelets and Image Processing

Introduction to Video Compression

Lecture 6: Compression II. This Week s Schedule

JPEG Joint Photographic Experts Group ISO/IEC JTC1/SC29/WG1 Still image compression standard Features

Transcription:

Compression Part 2 Lossy Image Compression (JPEG)

General Compression Design Elements 2 Application Application Model Encoder Model Decoder Compression Decompression Models observe that the sensors (image sensors, video streams, digital audio) generate information that is not perceived in typical applications Application Model Model human visual (for JPEG, MPEG) and auditory (for MP3) systems Use that model to compress images (JPEG, MPEG) selectively losing information that is not seen Not heard (MP3) To capitalize on this fact and control what data is kept and lost, spatial (JPEG, MPEG), or time domains (MP3, MPEG) are transformed into frequency domains MPEG adds prediction based on past and future frames

3 Standards JPEG Joint Photographic Experts Group Pink book is the standard MPEG Motion Picture Experts Group MPEG 1, 2 (DVD), MPEG layer 3 (MP3) (DVD audio) Many other semi-standard and proprietary formats

4 Joint Photographic Experts Group (JPEG) Lossy compression modeled after the human visual system (HVS) ~120 Million Rods, ~5-6 Million Cones in the human eye

5 Human Eye Spatial Frequency Response Some spatial frequencies are less visible to the eye Color is less sensitive to higher frequencies JPEG takes advantage of this in choosing what information to loose

6 Color and Luminance are coded separately RGB color space has redundant information YCrCb: color is mapped to two components that can be further reduced in information content at a lower reduction in perceptual appearance; luminance is separate and can be treated differently; Low Complexity: Color space transform is a simple linear conversion Y = luminance (think monochrome), CrCb are the two color channels

7 Subsampling example

8 JPEG Block Diagram Key is the use of the Discrete Cosine Transform (DCT) to map the spatial image to a frequency domain. Frequencies that are not as visible are removed (quantized), then the remainder is lossless coded via Huffman coding. Color transform is included, then the color channels are down sampled to take advantage of the lower spatial frequency response

9 Discrete Cosine Transform (DCT) Basis functions and sample reconstruction *DC term, rest are called AC terms

10 JPEG Quantization Tables Based on psychovisual threshold experiments Luminance is not subsamples, lighter quantization Chrominance, subsampled 2:1, heavier quantization Luminance Quantization Table Chrominance Quantization Table Larger numbers more heavily quantize the DCT coefficient

11 Problem with high frequency term quantization Loss of high frequency terms results in ringing. The inability to reconstruct the edges. For the math, see Gibbs phenomenon.

12 Lossy compression: Quality? How to compare different algorithms or determine if the loss is ok for your application. Lossless just compare compression ratios. Lossy: Want to loose information that is not important to the application. One method: Mathematical error between the original and the processed image, pixel by pixel Mean squared error (MSE) - sorry wrong answer MSE does not account for the perceptive portion of the human visual system Use a model of the perceptual part of the human visual system (HVS): Tried that we do not understand the HVS enough to make a good model Human psycho-visual experiments Select images, process, print or view original vs processed Rank with as many observers as you can get Expensive labor and controlled lab setup Population bias Researchers are very critical, others not enough Image type bias

13 Test image example Processing and printing/viewing and ranking images have a per image cost Select the image, process, print or view setup, schedule observers, process observations, monitor and check each step Often images contain a lots of content to stress and cover a wide range of possible errors in a single image Need to use customer/market images with customers

14 Test image example Compressed 48:1 Original Compressed

15 Comparison ~48:1 Original Compressed

16 How to drive a high quality, 150ppm digital color press (igen 150) Free Flow Print Server igen150 CMYK Raster images & Job Control igen5 Up to 3.5M prints per month ~$750k-$1M+ price range 2400x2400 spi digital addressability Free Flow Print Server ~1Gbyte/second raster generation and print CMYK color space (600x600x48 bits to print engine) Need to achieve 10:1 guaranteed compression

17

Xerox Multi-Mode Compression (XM2) Adaptive compression technology Compression technology for graphics and text Compression technology for pictures

19 XM2 Technology Format & LZ77 CMYK Image File 8x8 Blocks Block Analysis JPEG High JPEG Low Each Separation is processed independently {C,M,Y,K}, Think 4 luminance files Block Analyzer determines how to compress the block to meet image quality and compression constraints Optimized Q tables, two levels for JPEG selected by Huffman table tag 1bit/Block Selector Map (LZ77)

20

21 Reading Material

22 Another aspect of HVS - Night adaptation What colors do you see in dim light? Why are instruments lit with red lights at night? Ship bridge in night mode Astronomy software Day mode Night mode

23 MPEG Video Compression

24 MPEG Frame Encoding I = DCT encoded reference frame no other frames are used P = Use only previous frames for prediction B = Use both forward and previous frames for prediction

25 Moving Pictures Experts Group Layer III aka MP3 Audio Signal Filter Bank 32 Sub-bands MDCT 512 samples Non-uniform Quantizer Huffman Encoding Side Band Encoding Stream Formatting FFT Psychoacoustic Model Analysis and Modeling for Quantizer MDCT Multiple DCTs on each subband sample FFT Fast Fourier Transform map to frequency domain for analysis Raw CD audio is ~ 10 MB/minute MP3 compression is typically ~10-11:1 reducing to ~1MB/minute

26 DC without lsb(0.088 b/p) Progressive vs sequential modes Image is 512x512 = 262,144 bytes Compressed 5.8:1

27 +1-63 AC w/o 3 lsb(0.283 b/p) Progressive vs sequential modes Image is 512x512

28 +1-63 AC +3rd lsb(0.482 b/p) Progressive vs sequential modes Image is 512x512

29 +1-63 AC +2nd lsb(0.482 b/p) Progressive vs sequential modes Image is 512x512

30 +1-63 AC +lsb(0.482 b/p) Progressive vs sequential modes Image is 512x512