AUDIOVISUAL COMMUNICATION

Similar documents
MULTIMEDIA COMMUNICATION

Introduction ti to JPEG

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

Video Compression An Introduction

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

Lecture 5: Compression I. This Week s Schedule

CMPT 365 Multimedia Systems. Media Compression - Image

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

7.5 Dictionary-based Coding

Lecture 8 JPEG Compression (Part 3)

Lecture 8 JPEG Compression (Part 3)

Compression II: Images (JPEG)

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

IMAGE COMPRESSION. Chapter - 5 : (Basic)

IMAGE COMPRESSION USING HYBRID QUANTIZATION METHOD IN JPEG

Digital Video Processing

Image Compression Algorithm and JPEG Standard

VIDEO AND IMAGE PROCESSING USING DSP AND PFGA. Chapter 3: Video Processing

VC 12/13 T16 Video Compression

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

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

Multimedia Signals and Systems Still Image Compression - JPEG

CSEP 521 Applied Algorithms Spring Lossy Image Compression

Wireless Communication

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

A NEW ENTROPY ENCODING ALGORITHM FOR IMAGE COMPRESSION USING DCT

Implementation and analysis of Directional DCT in H.264

Digital Image Representation Image Compression

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

MPEG-4: Simple Profile (SP)

Lecture 13 Video Coding H.264 / MPEG4 AVC

EE 5359 MULTIMEDIA PROCESSING SPRING Final Report IMPLEMENTATION AND ANALYSIS OF DIRECTIONAL DISCRETE COSINE TRANSFORM IN H.

AUDIOVISUAL COMMUNICATION

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

International Journal of Emerging Technology and Advanced Engineering Website: (ISSN , Volume 2, Issue 4, April 2012)

LIST OF TABLES. Table 5.1 Specification of mapping of idx to cij for zig-zag scan 46. Table 5.2 Macroblock types 46

HYBRID TRANSFORMATION TECHNIQUE FOR IMAGE COMPRESSION

Image Compression Techniques

JPEG Compression. What is JPEG?

Cross Layer Protocol Design

Compression of Stereo Images using a Huffman-Zip Scheme

CHAPTER 6. 6 Huffman Coding Based Image Compression Using Complex Wavelet Transform. 6.3 Wavelet Transform based compression technique 106

NOVEL ALGORITHMS FOR FINDING AN OPTIMAL SCANNING PATH FOR JPEG IMAGE COMPRESSION

AN ANALYTICAL STUDY OF LOSSY COMPRESSION TECHINIQUES ON CONTINUOUS TONE GRAPHICAL IMAGES

Multimedia Systems Video II (Video Coding) Mahdi Amiri April 2012 Sharif University of Technology

Interactive Progressive Encoding System For Transmission of Complex Images

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

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

Digital Image Representation. Image Representation. Color Models

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

Fernando Pereira. Instituto Superior Técnico

Multimedia Communications. Transform Coding

AUDIOVISUAL COMMUNICATION

DIGITAL IMAGE WATERMARKING BASED ON A RELATION BETWEEN SPATIAL AND FREQUENCY DOMAINS

Multimedia Standards

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

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

Fernando Pereira. Instituto Superior Técnico. Comunicação de Áudio e Vídeo, Fernando Pereira

COLOR IMAGE COMPRESSION USING DISCRETE COSINUS TRANSFORM (DCT)

Lossless Image Compression having Compression Ratio Higher than JPEG

CS 260: Seminar in Computer Science: Multimedia Networking

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

Comparative Study of Partial Closed-loop Versus Open-loop Motion Estimation for Coding of HDTV

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

Mesh Based Interpolative Coding (MBIC)

PERFORMANCE ANALYSIS OF INTEGER DCT OF DIFFERENT BLOCK SIZES USED IN H.264, AVS CHINA AND WMV9.

Forensic analysis of JPEG image compression

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

Color Imaging Seminar. Yair Moshe

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

Comparison of DCT, DWT Haar, DWT Daub and Blocking Algorithm for Image Fusion

CSE237A: Final Project Mid-Report Image Enhancement for portable platforms Rohit Sunkam Ramanujam Soha Dalal

Using Streaming SIMD Extensions in a Fast DCT Algorithm for MPEG Encoding

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

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

Performance analysis of Integer DCT of different block sizes.

Performance Comparison between DWT-based and DCT-based Encoders

Outline Introduction MPEG-2 MPEG-4. Video Compression. Introduction to MPEG. Prof. Pratikgiri Goswami

Introduction to Video Compression

Intra-Mode Indexed Nonuniform Quantization Parameter Matrices in AVC/H.264

H.264 Based Video Compression

Fingerprint Image Compression

Image and Video Coding I: Fundamentals

A HYBRID DPCM-DCT AND RLE CODING FOR SATELLITE IMAGE COMPRESSION

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

Digital Video Compression and H.261 Recommendation

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

Video Compression Method for On-Board Systems of Construction Robots

LECTURE VIII: BASIC VIDEO COMPRESSION TECHNIQUE DR. OUIEM BCHIR

TKT-2431 SoC design. Introduction to exercises

VIDEO COMPRESSION STANDARDS

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

Video coding. Concepts and notations.

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

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

Multimedia Signals and Systems Motion Picture Compression - MPEG

Stereo Image Compression

Redundant Data Elimination for Image Compression and Internet Transmission using MATLAB

Digital Image Processing

Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM

Transcription:

AUDIOVISUAL COMMUNICATION Laboratory Session: Discrete Cosine Transform Fernando Pereira The objective of this lab session about the Discrete Cosine Transform (DCT) is to get the students familiar with the way the DCT works with the target to compress images. For that purpose, the application Audio and Video Communication Simulation System 1 will be used as it includes among others a module demonstrating the various operations involved in the compression of an 8 8 image block using the DCT. 1. THE DCT TRANSFORM With no doubt, the DCT is the most popular transform in the field of image and video compression since it is used by the JPEG, H.61, H.63, MPEG-1 Video, MPEG- Video and MPEG-4 Visual and H.64/AVC coding standards, due to its great compression versus complexity trade-off. The DCT is computed as the product of two matrices, notably the image block (luminance or chrominances) and the DCT basis functions (see Figure 1), according to the following expressions: 7 F (u,v) = 1/4 C(u) C(v) with u = 0, 1,,..., 7 C(u), C(v) = v = 0, 1,,..., 7 1/ 1 7 x0 y0 u, v 0 otherwise Moreover, the inverse DCT is computed as: 7 7 f ( x, y) cos u x 1 / 16 cos v y 1 / 16 f (x,y) = 1/4 C( u) C( v) F( u, v)cos ux 1/16cos v y 1 u0 v0 with x = 0, 1,,..., 7 y = 0, 1,,..., 7 /16 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 1 Visual representation of the DCT basis functions.. THE DCT MODULE The DCT module uses several matrices which are described in the following:.1 Data Matrices There are several data matrices, notably corresponding to the data in pixel and DCT transform domains, before and after quantization: Original Image Matrix with the 88 samples image block over which the DCT is applied, this means a spatial block with 64 PCM samples. Since each sample is represented with 8 bits, each luminance sample has a value between 16 and 35 (reduced range), if the ITU-R 601 recommendation is adopted, and between 0 and 55 (full range), otherwise; the H.61 mode button allows switching between the reduced and full ranges. It is possible to see the luminance values on the matrices by using the Show image values button. The application makes

available a set of example image blocks which may be selected using the Prev and Next buttons. The Invert button allows changing an original image block to its complementary luminance image, this means darks become lights and vice-versa or Yinvert=55-Y). DCT Coefficients Matrix with the 88 DCT coefficients; although the DCT coefficients are theoretically real values, they are in practice represented with a certain limited arithmetic, this means a certain number of bits (in this case with the -048 to 048 range). It is possible to see the DCT coefficient values on the matrices by using the Show DCT values button. Selected DCT Coefficients Matrix with the DCT coefficients which have fulfilled the selection criteria defined by the user defined Selection Filter matrix (see below); the selection criteria are not normative and, thus, each encoder developer may adopt different solutions. This matrix basically defines which coefficients will be submitted to quantization; the others are killed at this stage. Quantized DCT Coefficients Matrix with the quantized DCT coefficients using the quantization steps user defined in the Quantization Step matrix (see below). Clipping may happen when the maximum quantization level is lower than the quantization level determined by the simple division of the DCT coefficient by the corresponding quantization step; in the H.61 standard, this clipping may happen since the maximum quantization level is lower than the maximum quantization level that may be needed when the quantization step is very low. An example is the quantization of a DCT coefficient with value 1660 with a quantization step of : if the maximum quantization level available is 51, as in the H.61 standard, there will be clipping since the correct value should be 830. When clipping happens for a DCT coefficient, the corresponding cell will appear in red in screen. The quantization characteristic used in this application is: Quantization_level = Int (DCT value / Quantization_step) Although the quantization characteristic is not normative, uniform quantization as above is often used. The quantization process implies introducing an error that cannot be recovered, making the overall coding process lossy. Restored DCT Coefficients Matrix with the DCT coefficient values recovered at the decoding based on the quantization levels and quantization steps used. This process is well known as inverse quantization since it uses the received quantization levels and the corresponding quantization steps to recover the decoded DCT coefficient value, e.g. as in recommendation H.61: Dequantized_DCT_value = Quantization_step (Quantization_level + 1/) Naturally, the Dequantized_DCT_value is typically different from the corresponding DCT value due to the quantization process, since the quantization error cannot be removed The inverse quantization process is typically normative which means the dequantized values for each quantization level and quantization step are fixed and well known in advance by the encoder; this fact may be used by the encoder to simulate any type of quantization characteristic. Inverse DCT Transform Matrix with the 88 samples resulting from the inverse DCT applied to the dequantized DCT coefficients which corresponds to the decoded image block. These decoded sample values must be close to the Original image values; naturally, the lower the quantization steps, the lower the error between the original and the decoded image. 3

Differences Matrix with the pixel level luminance differences between the original image block and the decoded image block resulting from the inverse DCT. These differences should be smaller for lower quantization steps. The application shows the values for some objective quality metrics, notably the Root Mean Squared Error (RMS), which is the square root of the Mean Squared Error (MSE), the Signal to Noise Ratio (SNR) and the Peak SNR (PSNR): MSE 1 MN M N i1 j1 ( x ij y ij ) ( db) M N 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 55 for samples with 8 bits: 1 PSNR 10log1055 / ( x y ) ( db) MN ij ij M N i1 j1 The PSNR is typically more used than the SNR since it shows a higher correlation with what would be the subjective assessment of a human user. A goo objective quality metric should be as correlated as possible with the human subjective assessments.. Control Matrices There are also some control data matrices which serve for to define some of the parameters used in the compression process: A. Selection Filter This filter uses two types of information, and thus two matrices, to decide how to filter the DCT coefficients: Selection Matrix establishing the basic selection criteria for the DCT coefficients filtering according to: The corresponding DCT coefficient is always selected for the next processing phase, this means the quantization, independently of its value (green cells). The corresponding DCT coefficient never goes to the quantization phase, independently of its value (red cells). The corresponding DCT coefficient goes to the quantization phase if its amplitude is equal or higher than the corresponding threshold specific in the Filter Values matrix (white cells). Filter Values This matrix defines the selection threshold for the DCT coefficients with in the Selection matrix above; this means that from the DCT coefficients with a, only those which amplitude is equal or higher than this threshold will go to the quantization phase. 4

B. Quantization Step Matrix with the quantization step to be used for each DCT coefficient. The DC coefficient (upper left corner) is usually quantized with a quantization characteristic without dead-zone, contrary to the other coefficients, since it corresponds to the average energy of the image block (see Figure ). Generally, the quantization steps for all coefficients may go from 1 to 55. In the H.61 mode, the DC coefficient is mandatory quantized with step 8 due to its higher subjective impact, while the AC coefficients must use integer and even quantization step values, from to 6. While the JPEG standard uses different quantization steps for the various DCT coefficients, depending on the human visual sensibility to each spatial frequency (e.g. based on the Lohscheller values), recommendation H.61 uses the same quantization step for all AC coefficients since prediction residues (noise) are coded. The DCT coefficients dequantization is made as recommended for the H.61 standard. Figure Examples of quantization characteristics with dead zone. 3. INTERACTION WITH THE APPLICATION 3.1 Changing the Matrices To understand the DCT way of working, the users may change the Original Image, DCT Coefficients, Selection Filter and Quantization Step matrices. To do that, the user must press twice of the mouse left button which opens another working window with the values of the matrix to be changed. The changes may be made in the following way: Change a value in the matrix Just change the value in the corresponding cell in the open working window. Applying value from a certain DCT coefficient A to another coefficient B in zig-zag order The value is set for all positions in the zig-zag scanning order from position A to position B with the position counting starting with 0 (before closing the window, press zigzag fill). Random values The selected matrix is filled with random values having as maximum limit the value value (before closing the window, press random). Lohscheller values The quantization step matrix is filled with half the Lohscheller values for the luminance; the Lohscheller values express the minimum human visual sensitivity to the vertical and horizontal spatial frequency variations associated to each DCT coefficient. 5

3. Image Block Examples The application includes 0 image block examples. The image blocks and associated data can be visualized using the Prev and Next buttons; the image block number is shown on the control box. The image examples include: Example 1) Single black pixel at the upper left corner of a fully white block Example ) Line of black pixels on the top of a fully white block Example 3) Column of black pixels at the left of a fully white block Example 4) Line and column of black pixels on the top and at the left of a fully white block Example 5) Black and white alternating lines Example 6) Black and white alternating columns Example 7) Alternate black with mixed black and white lines and columns Example 8) Black central diagonal, downwards from left to right, in a fully white block Example 9) Black central diagonal, upwards from left to right, in a fully white block Example 10) Black cross made with central diagonals with a fully white block Example 11) Black cross as example 10 but without the black central pixels Example 1) Grey half image block with back diagonal in the other lighter grey half Example 13) Four black central pixels in a fully white block Example 14) Uniform grey block (18) Example 15) Sinusoidal horizontal light-dark transition block Example 16) Sinusoidal horizontal light-dark-light transition block Example 17) Fast sinusoidal horizontal transitions Example 18) Fast sinusoidal vertical transitions Example 19) Vertical and horizontal light-dark-light transitions Example 0) Vertical, horizontal and diagonal light-dark-light transitions 6

Audiovisual Communication Laboratories Laboratory Session: Discrete Cosine Transform 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 1. DCT Coefficients versus Image Blocks: Select image block examples (from the 0 available) for which the obtained set of non-null DCT coefficients may be easily explained looking to some basic image blocks features. For the cases selected, explain the relationship between the image block and the corresponding DCT coefficients (see the image block energy distribution on the first chart on the right). Image : Image : 7

. Subjective Quality versus Quantization Step: For the image block example number 13, analyze and comment the subjective quality variations (measured by visual inspection) when the quantization steps are (keep in mind the real size of an image block on a screen): a) the Lohscheller thresholds b) a constant quantization step equal to 8, 16, 3 and 64, e.g. indicate in the application that you want these quantization steps for all DCT coefficients (from 0 to 63) in the zig-zag scanning order; check the energy associated to the quantization error on the charts on the right. Is a flat quantization choice a good choice? Why? 3. Objective Quality versus Quantization Step: For the image block example number 13, analyze and comment the objective quality variations using the PSNR values when the quantization steps are: a) the Lohscheller thresholds b) a constant quantization step equal to 8, 16, 3 and 64, e.g. indicate in the application that you want these quantization steps for all DCT coefficients (from 0 to 63) in the zig-zag scanning order; check the energy associated to the quantization error on the charts on the right. Is a flat quantization choice a good choice? Why? 8

4. Subjective and Objective Quality versus the Coefficients Bandwidth: For the image block example number 13, analyze and comment the spatial (this means sample domain) and frequency (this means DCT coefficients domain) impact on the subjective and objective qualities of filtering the DCT coefficients with a selection filter which: a) only selects one DCT coefficient (the DC coefficient) meaning that after the first DCT coefficient no coefficients are coded, independently of their value b) only selects the first six DCT coefficients (0 to 5 in the zig-zag scanning) c) only selects the first 15, 30, than 45 and, finally, all DCT coefficients 5. Subjective and Objective Quality versus the Coefficients Selection Threshold: For the image block example number 13, analyze and comment the spatial (this means sample domain) and frequency (this means DCT coefficients domain) impact on the subjective and objective qualities of filtering the DCT coefficients with a selection filter which: a) only selects the DCT coefficients which are above a threshold of 00 or 100 or 50 or 5, with the exception of the DC coefficient which is always selected. Is a flat selection filter a good choice? Why? 9

6. DCT Coefficients at Encoder and Decoder: The coefficients received at the decoder should be as close as possible to the coefficients computed at the encoder. In this context, explain the differences between the DCT coefficients computed at the encoder ( DCT Coefficients ) and the DCT coefficients recovered at the decoder ( Restored DCT Coefficients ). 7. Set of Non-null DCT Coefficients: From all the elements and modules in the DCT processing chain, identify the one which mostly determines the set of non-null DCT coefficients obtained in the Quantized DCT coefficients matrix, when appropriate solutions are applied for the various modules. 10

8. Complementary DCT Block: Analyzing the 0 image block examples and their complementary image blocks, this means the blocks where the luminance is computed as (55- Y), identify and explain the changes observed for the DCT coefficients when the complementary image block is coded and not the original image block (use the Invert button to get the complementary image block). 9. High Frequency Irregular Block: Edit the Original Image block and draw a letter R in black and white. Analyze and comment the DCT transform performance, e.g. in terms of the number of coefficients needed and achieved quality, when coding this specific type of content. 11