MULTIMEDIA COMMUNICATION

Similar documents
AUDIOVISUAL COMMUNICATION

CMPT 365 Multimedia Systems. Media Compression - Image

Lecture 8 JPEG Compression (Part 3)

Digital Image Representation Image Compression

Lecture 8 JPEG Compression (Part 3)

Lecture 5: Compression I. This Week s Schedule

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

Wireless Communication

JPEG Modes of Operation. Nimrod Peleg Dec. 2005

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

AUDIOVISUAL COMMUNICATION

Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding.

MPEG-4: Simple Profile (SP)

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

AUDIO AND VIDEO COMMUNICATION MEEC EXERCISES. (with abbreviated solutions) Fernando Pereira

Compression II: Images (JPEG)

7.5 Dictionary-based Coding

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

VIDEO COMPRESSION STANDARDS

Introduction ti to JPEG

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

AUDIOVISUAL COMMUNICATION

DIGITAL IMAGE PROCESSING WRITTEN REPORT ADAPTIVE IMAGE COMPRESSION TECHNIQUES FOR WIRELESS MULTIMEDIA APPLICATIONS

Multimedia Communications. Transform Coding

ROI Based Image Compression in Baseline JPEG

Scalable Video Coding

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

Cross Layer Protocol Design

IMAGE COMPRESSION USING HYBRID QUANTIZATION METHOD IN JPEG

Video Compression An Introduction

MPEG-2. ISO/IEC (or ITU-T H.262)

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

Week 14. Video Compression. Ref: Fundamentals of Multimedia

Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013

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

Digital Image Processing

Module 6 STILL IMAGE COMPRESSION STANDARDS

Advanced Video Coding: The new H.264 video compression standard

TKT-2431 SoC design. Introduction to exercises

JPEG 2000 A versatile image coding system for multimedia applications

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

Image Compression Algorithm and JPEG Standard

Digital Video Processing

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

Video Coding in H.26L

Coding of Still Pictures

JPEG Compression. What is JPEG?

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

Stereo Image Compression

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

Tutorial T5. Video Over IP. Magda El-Zarki (University of California at Irvine) Monday, 23 April, Morning

Digital Image Representation. Image Representation. Color Models

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

Robust MPEG-2 SNR Scalable Coding Using Variable End-of-Block

Video coding. Concepts and notations.

The Best-Performance Digital Video Recorder JPEG2000 DVR V.S M-PEG & MPEG4(H.264)

CISC 7610 Lecture 3 Multimedia data and data formats

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

Quo Vadis JPEG : Future of ISO /T.81

Lossy compression. CSCI 470: Web Science Keith Vertanen

The Scope of Picture and Video Coding Standardization

Fundamentals of Video Compression. Video Compression

Lecture 5: Error Resilience & Scalability

SIGNAL COMPRESSION. 9. Lossy image compression: SPIHT and S+P

ISSN (ONLINE): , VOLUME-3, ISSUE-1,

Introduction to Video Compression

Lecture 3 Image and Video (MPEG) Coding

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Chapter 10 ZHU Yongxin, Winson

In the name of Allah. the compassionate, the merciful

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

VC 12/13 T16 Video Compression

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

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

IST MPEG-4 Video Compliant Framework

Lecture 6: Compression II. This Week s Schedule

Audio-coding standards

Interframe coding A video scene captured as a sequence of frames can be efficiently coded by estimating and compensating for motion between frames pri

JPEG decoding using end of block markers to concurrently partition channels on a GPU. Patrick Chieppe (u ) Supervisor: Dr.

Compression of Stereo Images using a Huffman-Zip Scheme

Multimedia Signals and Systems Still Image Compression - JPEG

JPEG Baseline JPEG Pros and Cons (as compared to JPEG2000) Advantages. Disadvantages

Audio-coding standards

10.2 Video Compression with Motion Compensation 10.4 H H.263

Lecture 4: Video Compression Standards (Part1) Tutorial 2 : Image/video Coding Techniques. Basic Transform coding Tutorial 2

Image and Video Coding I: Fundamentals

Audiovisual Communications, Fernando Pereira

A Comparative Study of DCT, DWT & Hybrid (DCT-DWT) Transform

COMP 249 Advanced Distributed Systems Multimedia Networking. The Video Data Type Coding & Compression Basics

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

Image/video compression: howto? Aline ROUMY INRIA Rennes

Biomedical signal and image processing (Course ) Lect. 5. Principles of signal and image coding. Classification of coding methods.

TKT-2431 SoC design. Introduction to exercises. SoC design / September 10

JPEG Syntax and Data Organization

5.7. Fractal compression Overview

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

CSEP 521 Applied Algorithms Spring Lossy Image Compression

Multimedia Signals and Systems Motion Picture Compression - MPEG

Lecture 5: Video Compression Standards (Part2) Tutorial 3 : Introduction to Histogram

Video Compression Standards (II) A/Prof. Jian Zhang

EE Low Complexity H.264 encoder for mobile applications

Transcription:

MULTIMEDIA COMMUNICATION Laboratory Session: JPEG Standard Fernando Pereira The objective of this lab session about the JPEG (Joint Photographic Experts Group) standard is to get the students familiar with this image coding standard, jointly developed by ISO/IEC and ITU-T. For that purpose, the application Audio and Video Communication Simulation System 1 will be used which includes among others a JPEG baseline (DCT-based) codec. The JPEG standard is a generic standard targeting several types of applications where photographic image coding (multilevel and color) is important. The JPEG standard includes lossy and lossless coding modes: the lossy modes are DCT-based, the lossless mode is based on a simple spatial predictor. While the lossless mode is not mandatory for all JPEG codecs, the sequential lossy mode is always present since it is part of the so-called baseline process which specifies the basic set of functionalities and tools mandatory in all JPEG compliant codecs. This lab guide is organized in three parts corresponding to the three main modules in the image communication/storage system available: JPEG image encoder (see Figure 1) Transmission channel (with corruption of the coded bitstream) JPEG image decoder (see Figure 2) Figure 1 DCT based JPEG encoder. 1 The application Audio and Video Communication Simulation System has been developed by Pedro Fernandes in the context of his M.Sc. Thesis. I would like to express here my appreciation for his work considering the possibilities this application has opened for the lab sessions of the Multimedia Communication course. 1

Figure 2 DCT based JPEG decoder. 1. JPEG ENCODER This first module in the JPEG system simulates a JPEG encoder. 1.1 Select Image This button allows selecting the image to code from the set of available images. The available images include pictures with people, landscapes, buildings, etc. thus with different characteristics, notably in terms of spatial variation/frequency. After selection, the image will be shown on the screen; then, the user may select the size of the visualization window with the mouse. 1.2 Properties This button allows determining the coding mode and parameters to encode the selected image. The image name and its spatial resolution are always indicated in the encoder module window. The following encoding processes and parameters may be controlled by the user: DCT Allows selecting the DCT coefficients used to code each 88 samples block. While reducing the number of DCT coefficients to code allows reducing the number of bits spent, also the decoded image quality will be reduced. The available possibilities in terms of DCT coefficients selection are: 1. No restrictions (all non-null DCT coefficients after quantization are coded); 2. All DCT coefficients with zig-zag order higher than X are not coded (see Figure 3), thus simulating a low-pass filter; 3. The first X non-null DCT coefficients in the zig-zag order are coded. Figure 3 Zig-zag scanning order. 2

Quantization Allows defining the scale factor corresponding to a multiplicative factor to be applied to some default quantization matrices (which still have to be transmitted) to finally define the quantization steps; a luminance quantization matrix example is shown in Figure 4. The higher the scale factor, the higher the quantization steps and thus the lower the quality since the higher the quantization error; for example, QS=200% and QS=50% mean that all quantization steps in Figure 4 are multiplied by 2 and 0.5, respectively. 16 12 14 14 18 24 49 72 11 12 13 17 22 35 64 92 10 16 14 19 16 24 22 29 37 56 55 64 78 87 95 98 24 40 26 58 40 57 51 87 68 109 81 104 103 121 112 100 51 61 60 55 69 56 80 62 103 77 113 92 120 101 103 99 Figure 4 Luminance quantization matrix. Synchronization markers Allows specifying the frequency of usage of the synchronization markers which are inserted in order the decoder may recover the decoding synchronism after transmission errors are detected. The synchronization markers are introduced before one or more so-called Minimum Coded Units (MCU); a MCU corresponds to the smallest image units including the interleaved image (coded) components for a certain image area, e.g., R, G and R. While for a 4:4:4 sub-sampling format all components with the same spatial resolution an MCU corresponds to a 88 block of each component, this means (1R, 1G, 1B), for a 4:2:0 sub-sampling format chrominances with half the luminance resolution in both directions an MCU corresponds to 4 luminance blocks for each block of each chrominance, this means (4Y, 1U, 1V). In terms of the insertion of synchronization markers, the available options are: 1. No synchronization markers at all for the whole image, this means no error recovering capability at all. 2. One synchronization marker for each MCU. 3. One synchronization marker for each row of MCUs. Naturally, the more synchronization markers are inserted, the higher is the error recovering capability and thus the final decoded quality, however at the cost at some additional bits since resynchronization markers cost bits. Encoding mode Allows defining the coding mode to use, notably either the sequential (baseline process) or the (scalable) progressive modes. While the sequential mode codes the image in a single layer/scanning, the progressive mode codes the image in multiple layers/scannings with successively better quality (but the same spatial resolution). Regarding the progressive mod, there are two ways to successively improve the quality: 1. Increasing Precision For each layer, the DCT coefficients for each block are successively coded with higher precision, from the most to the least significant bits. 3

2. Spectral Selection - For each layer, the DCT coefficients for each block correspond to successively higher frequencies, meaning that the first layers code the lowest frequency coefficients and vice-versa. 3. Combining Spectral Selection with Increasing Precision - For each layer, more DCT coefficients are successively sent for each block or previous coefficients are sent with higher precision. 1.3 Code Sequence (button ) The button allows coding the selected image with the defined coding conditions and parameters. The user is asked to define the name of the file to store the JPEG bitstream; it is recommended to always accept the file names suggested by the application which consists on the image name with jpg as extension. When coding an image, the decoded image and some relevant charts will be also shown in the screen, see Figure 5. 1.4 Statistics The application makes available the following metrics: compression factor, and SNR (Signal to Noise Ratio) and PSNR (Peak SNR), for the luminance and chrominances: M N 2 2 SNR 10log 10 x ij / ( xij yij ) ( db) i1 j1 M N i1 j1 where x is the original sample value at position (i,j) and y is the corresponding decoded value. To obtain the PSNR (and not the SNR), the SNR must be computed using the peak value for the signal, this means 255 for samples with 8 bits: 2 1 2 PSNR 10log 10 255 / ( x y ) ( db) MN ij ij M N i1 j1 The PSNR is typically more used than the SNR as subjective experiments have shown the PSNR to be better correlated with human perceptual assessment which is the most important features of an image quality metric. Figure 5 Application interface showing the original and decoded images and the DCT coefficients. 4

2. TRANSMISSION CHANNEL This module simulates the transmission of a coded bitstream through a non-ideal channel by inserting bit error corruption with two different error patterns: uniform and bursty. 2.1 Select Stream This button allows selecting the file with the bitstream to be corrupted. As mentioned above, the application suggested file name indicates the name of the coded image while its extension indicates the coding method used. 2.2 Properties This button allows defining the type of bit errors to be introduced in the selected bitstream. The selected input file/stream is always indicated in the dialogue window of the transmission channel module. Uniform Errors For uniform bit errors, the user must insert the desired bit error probability corresponding to the probability that a bit is corrupted independently of all the others. Burst Errors For bursty bit errors, the user must insert the following parameters to characterize the desired errors: Probability of Occurrence of the Start of an Error Burst Probability that an error burst starts at a certain bit. Minimum Length of an Error Burst Minimum length of the bit sequence affected by a burst of errors. Maximum Length of an Error Burst - Maximum length of the bit sequence affected by a burst of errors. The application computes and shows the bit error probability for the bursts understood as the fraction of bits corrupted (see note below). Type of Errors in the Corrupted Bitstream: Uniform Errors The user must indicate in the corresponding check box if uniform errors must be inserted in the next bitstream transmission. Error Bursts - The user must indicate in the corresponding check box if bursty errors must be inserted in the next bitstream transmission Skip This parameter allows skipping a certain number of initial resynchronization markers in the corruption process; this possibility allows visualizing in the same decoded and concealed image, parts which have been corrupted and not corrupted. 2.3 Transmit Bits This button implements error corruption of the selected bitstream with the selected channel characteristics. For this, the user has to define the name of the file where the corrupted bitstream is to be stored. The application always suggests giving the corrupted (output) bitstream file the same name as the non-corrupted (input) bitstream file with the addition of a letter in the file extension signaling the type of errors introduced: i) b for burst errors; ii) u for uniform errors; and iii) a for both burst and uniform errors. 5

2.4 Statistics After the transmission with error corruption, the Statistics button allows to obtain much statistical data about that process, notably: 1. Number of uniform errors introduced in the bitstream. 2. Bit error probability corresponding to the uniform errors (burst errors are excluded). 3. Number of error bursts introduced in the bitstream. 4. Average length of the error bursts introduced in the bitstream. 5. Number of error bits introduced with the error bursts. 6. Bit error probability corresponding to the error bursts (in relation to the total number of bits) 3. JPEG DECODER This module simulates the decoding process of an image coded with the JPEG standard. The application receives as input a file with the JPEG bitstream and generates the corresponding decoded image. 3.1 Select Stream This button allows selecting the file with the JPEG bitstream to decode, corrupted or not. While the name of the files indicates the name of the image coded, its extension indicates the coding standard used and the type of error corruption inserted. 3.2 Properties This button allows specifying the decoding and post-processing conditions to use. The selected bitstream is always shown in the decoder module window. Smoothing filter Allows controlling the usage of a low-pass filter applied to the full decoded image to reduce the block effect typical of block-based coding. The filter bandwidth is controlled using a slide bar where smoothing less corresponds to a larger band filter and vice-versa. Display mode Allows controlling the visualization sequence for the decoded image: a. The decoded image is visualized along the decoding process; b. The decoded image is visualized all at the same time after the end of the decoding process. 3.3 Decode Stream (button ) This button actions the decoding process for the selected JPEG bitstream. During the decoding process, the decoded image and some error messages may appear in the screen. For better visualization, it is possible to use the button to decode frame by frame and the button to stop decoding. 3.4 Statistics The application indicates the number of errors detected along the decoding process. 6

Multimedia Communication Laboratories Laboratory Session: JPEG Standard Date Day of the week Nº Name Nº Name Try addressing the following questions in a speedy way but while always fully understanding what you are doing; if you don t understand, ask for help. The most important is to learn Whenever configuration details are not provided, use the default parameters available. For each case, analyze the statistics available by pressing the Statistics buttons. 1. Compression Factor for Various Images: Code the images indicated in the table below with the default parameters and register the compression factor (CF) and the PSNR for the luminance (Y) and chrominances (CR and CB). Comment on the compression factors and subjective image quality achieved for the various images considering their content, e.g. do images with the same CF have the same subjective quality? If not, why? Do your personal subjective assessments always coincide with the PSNR indications? Is the PSNR a very reliable image quality metric (e.g. compare the subjective quality of images with similar PSNR)? Why? BALLOON BARBARA1 BARBARA2 BOARD BOATS HILL HOTEL CF PSNR Y PSNR C R PSNR C B 7

2. Compression Factor versus Number of DCT Coefficients: Code the images indicated in the table below using the DCT coefficients in the first X positions in the zig-zag scanning thus simulating a low-pass filter with varying bandwidth. Comment on the variation of the compression factor and the subjective image quality for the various cases and images. What is especial for X=1? BALLOON BARBARA2 BOATS HOTEL DCT COEF WITH X=1 DCT COEF WITH X=5 DCT COEF WITH X=15 DCT COEF WITH X=30 CF PSNR Y CF PSNR Y CF PSNR Y CF PSNR Y 3. Compression Factor versus Quantization Scale Factor: Code the images indicated in the table below varying the Quantization Scale (QS) factor applied to the default quantization matrices. Comment on the variation of the compression factor and the subjective image quality for the various images as a function of QS. BALLOON BARBARA2 BOATS HOTEL QS = 50% QS = 200% QS = 400% CF PSNR Y CF PSNR Y CF PSNR Y 8

4. Compression Factor versus Synchronization Markers: Code the images indicated in the table below varying the periodicity of the insertion of synchronization markers. Comment on the variation of the compression factor depending on this periodicity. Why is the compression factor so similar for the 2 columns under QS=50% and so different for the 2 columns under QS=400% considering that what is changed between the 2 columns is the same? BALLOON BARBARA2 BOATS HOTEL CF (1 MARKER/MCU ROW) QS = 50% QS = 400% CF (1 MARKER/MCU) CF (1 MARKER/MCU ROW) CF (1 MARKER/MCU) 5. Progressive Mode: Code the images indicated in the table above using the possibilities available in terms of progressive (quality scalability) coding, notably spectral selection, and growing precision. Comment on the evolution of the image quality along the full decoding process for the two main progressive modes (spectral selection and increasing precision); visualize the decoding process using the option Show scan lines while decoding in the Display Mode menu at decoder. 9

6. Low Pass Post-Processing Filtering: Code the images BALLOON and BARBARA1 with QS = 500% and decode them varying the bandwidth of the low pass post-processing filter. Comment on the variation of the decoded images subjective image quality depending on the used low pass bandwidth. What is a main limitation of this filter (read its description in the body of this document)? 7. Decoding after Corruption with Uniform Errors: Code the image BALLOON with the default coding parameters, varying the insertion periodicity of the synchronization markers. Simulate the transmission of the bitstreams through a channel with only uniform errors corruption, with different bit error probabilities, e.g., Pb = 0.0001. Decode the corrupted bitstreams and comment on the subjective image quality of the decoded images as a function of the number of resynchronization markers. Repeat the error insertion process if the decoder goes in error. 8. Decoding after Corruption with Burst Errors: Repeat the previous question, now for burst errors, e.g., PB = 0.0001, Lmin = 10 and Lmax = 50. Decode the corrupted bitstreams and comment on the subjective impact of the errors on the decoded images, comparing the uniform and burst error cases; to be fair, try to include the same total number of erred bits for each case (use the Statistics button in the Transmission Channel module). Repeat the error insertion process if the decoder goes in error. Comment on the influence on the subjective quality of the insertion periodicity of the synchronization markers when the transmission channel is not perfect. 10