Assistant Lecturer Sama S. Samaan

Similar documents
Chapter 9 Image Compression Standards

Hybrid Coding (JPEG) Image Color Transform Preparation

Byte = More common: 8 bits = 1 byte Abbreviation:

Ch. 3: Image Compression Multimedia Systems

Module 6 STILL IMAGE COMPRESSION STANDARDS

Compression and Image Formats

2.1. General Purpose Run Length Encoding Relative Encoding Tokanization or Pattern Substitution

Chapter 8. Representing Multimedia Digitally

CS 262 Lecture 01: Digital Images and Video. John Magee Some material copyright Jones and Bartlett

15110 Principles of Computing, Carnegie Mellon University

Subjective evaluation of image color damage based on JPEG compression

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

MULTIMEDIA SYSTEMS

Image Perception & 2D Images

Digital Media. Lecture 4: Bitmapped images: Compression & Convolution Georgia Gwinnett College School of Science and Technology Dr.

APPLICATIONS OF DSP OBJECTIVES

15110 Principles of Computing, Carnegie Mellon University

Audio Signal Compression using DCT and LPC Techniques

UNIT 7C Data Representation: Images and Sound

Huffman Coding For Digital Photography

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Practical Content-Adaptive Subsampling for Image and Video Compression

The Strengths and Weaknesses of Different Image Compression Methods. Samuel Teare and Brady Jacobson

Image Processing Computer Graphics I Lecture 20. Display Color Models Filters Dithering Image Compression

Templates and Image Pyramids

Very High Speed JPEG Codec Library

Determination of the MTF of JPEG Compression Using the ISO Spatial Frequency Response Plug-in.

2. REVIEW OF LITERATURE

MULTIMEDIA SYSTEMS

Digitizing Color. Place Value in a Decimal Number. Place Value in a Binary Number. Chapter 11: Light, Sound, Magic: Representing Multimedia Digitally

Artifacts and Antiforensic Noise Removal in JPEG Compression Bismitha N 1 Anup Chandrahasan 2 Prof. Ramayan Pratap Singh 3

5/17/2009. Digitizing Color. Place Value in a Binary Number. Place Value in a Decimal Number. Place Value in a Binary Number

OFFSET AND NOISE COMPENSATION

Chapter 3 LEAST SIGNIFICANT BIT STEGANOGRAPHY TECHNIQUE FOR HIDING COMPRESSED ENCRYPTED DATA USING VARIOUS FILE FORMATS

Introduction to More Advanced Steganography. John Ortiz. Crucial Security Inc. San Antonio

Lossy and Lossless Compression using Various Algorithms

Information Hiding: Steganography & Steganalysis

4/9/2015. Simple Graphics and Image Processing. Simple Graphics. Overview of Turtle Graphics (continued) Overview of Turtle Graphics

CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS

Camera Image Processing Pipeline: Part II

SYLLABUS CHAPTER - 2 : INTENSITY TRANSFORMATIONS. Some Basic Intensity Transformation Functions, Histogram Processing.

21 CP Clarify Photometric Interpretation after decompression of compressed Transfer Syntaxes Page 1

Analysis on Color Filter Array Image Compression Methods

UNIT 7C Data Representation: Images and Sound Principles of Computing, Carnegie Mellon University CORTINA/GUNA

Camera Image Processing Pipeline: Part II

JPEG Encoder Using Digital Image Processing

Color & Compression. Robin Strand Centre for Image analysis Swedish University of Agricultural Sciences Uppsala University

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

Direction-Adaptive Partitioned Block Transform for Color Image Coding

Dr. Shahanawaj Ahamad. Dr. S.Ahamad, SWE-423, Unit-06

Computers and Imaging

Image compression with multipixels

LECTURE 02 IMAGE AND GRAPHICS

CS101 Lecture 19: Digital Images. John Magee 18 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

The next table shows the suitability of each format to particular applications.

image Scanner, digital camera, media, brushes,

What You ll Learn Today

Templates and Image Pyramids

Image Compression and its implementation in real life

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

3. Image Formats. Figure1:Example of bitmap and Vector representation images

A Novel Approach of Compressing Images and Assessment on Quality with Scaling Factor

A Brief Introduction to Information Theory and Lossless Coding

IMAGES AND COLOR. N. C. State University. CSC557 Multimedia Computing and Networking. Fall Lecture # 10

UNIT 7B Data Representa1on: Images and Sound. Pixels. An image is stored in a computer as a sequence of pixels, picture elements.

HTTP transaction with Graphics HTML file + two graphics files

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

Compression. Encryption. Decryption. Decompression. Presentation of Information to client site

The Need for Data Compression. Data Compression (for Images) -Compressing Graphical Data. Lossy vs Lossless compression

Introduction to Multimedia Computing

A SURVEY ON DICOM IMAGE COMPRESSION AND DECOMPRESSION TECHNIQUES

Color, graphics and hardware Monitors and Display

Raster (Bitmap) Graphic File Formats & Standards

CS4495/6495 Introduction to Computer Vision. 2C-L3 Aliasing

Lossless Image Compression Techniques Comparative Study

Anti aliasing and Graphics Formats

Digital Asset Management 2. Introduction to Digital Media Format

Anna University, Chennai B.E./B.TECH DEGREE EXAMINATION, MAY/JUNE 2013 Seventh Semester

INTERNATIONAL TELECOMMUNICATION UNION SERIES T: TERMINALS FOR TELEMATIC SERVICES

Unit 1.1: Information representation

B.Digital graphics. Color Models. Image Data. RGB (the additive color model) CYMK (the subtractive color model)

Improvement in DCT and DWT Image Compression Techniques Using Filters

Image Processing. Adrien Treuille

Images and Colour COSC342. Lecture 2 2 March 2015

Specific structure or arrangement of data code stored as a computer file.

Pooja Rani(M.tech) *, Sonal ** * M.Tech Student, ** Assistant Professor

DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK. Subject Name: Information Coding Techniques UNIT I INFORMATION ENTROPY FUNDAMENTALS

Audio Compression using the MLT and SPIHT

Evaluation of Audio Compression Artifacts M. Herrera Martinez

A COMPARATIVE ANALYSIS OF DCT AND DWT BASED FOR IMAGE COMPRESSION ON FPGA

4 Images and Graphics

Module 8: Video Coding Basics Lecture 40: Need for video coding, Elements of information theory, Lossless coding. The Lecture Contains:

Computer Graphics. Rendering. Rendering 3D. Images & Color. Scena 3D rendering image. Human Visual System: the retina. Human Visual System

Detection of Image Forgery was Created from Bitmap and JPEG Images using Quantization Table

CGT 511. Image. Image. Digital Image. 2D intensity light function z=f(x,y) defined over a square 0 x,y 1. the value of z can be:

An Analytical Study on Comparison of Different Image Compression Formats

Communications Theory and Engineering

Indexed Color. A browser may support only a certain number of specific colors, creating a palette from which to choose

Adding some light to computing. Lawrence Snyder University of Washington, Seattle

35 CP JPEG-LS Planar Configuration constraints conflict with WSI, US, VL, Enhanced Color MR and Page 1 36 compressed RGB images

Transcription:

MP3 Not only does MPEG define how video is compressed, but it also defines a standard for compressing audio. This standard can be used to compress the audio portion of a movie (in which case the MPEG standard defines how the compressed audio is interleaved with the compressed video in a single MPEG stream) or it can be used to compress stand-alone audio (for example, an audio CD). The most common compression technique that is used to create CD-quality audio is based on the perceptual encoding technique. Perceptual encoding is based on the study of how people perceive sound. The idea is based on flaws in our auditory system: Some sounds can mask other sounds. Masking can happen in frequency and time. In frequency masking, a loud sound in a frequency range can partially or totally mask a softer sound in another frequency range. For example, we cannot hear what our dance partner says in a room where a loud heavy metal band is performing. In temporal masking, a loud sound can numb our ears for a short time even after the sound has stopped. MP3 uses these two phenomena, frequency and temporal masking, to compress audio signals. The technique analyzes and divides the spectrum into several groups. Zero bits are allocated to the frequency ranges that are totally masked. A small number of bits are allocated to the frequency ranges that are partially masked. A larger number of bits are allocated to the frequency ranges that are not masked. Video Compression Video is composed of multiple frames. Each frame is one image. We can compress video by first compressing images. Two standards are prevalent in the market. Joint Photographic Experts Group (JPEG) is used to compress images. Moving Picture Experts Group (MPEG) is used to compress video. We briefly discuss JPEG and then MPEG. JPEG Given the increase in the use of digital imagery in recent years this use was spawned by the invention of graphical displays, not high-speed networks the need for standard representation formats and compression algorithms for digital imagery data has grown more and more critical. In response to this need, the ISO defined a digital image format known as JPEG, named after the Joint Photographic Experts Group that designed it. (The Joint in JPEG stands for a joint ISO/ITU effort.) JPEG is the most widely used format for still images in use today. At the heart of the definition of the format is a compression algorithm, which we describe below. Many techniques used in JPEG also appear in MPEG, the set of standards for video compression and transmission created by the Moving Picture Experts Group. 1

We observe that there are quite a few steps to get from a digital image to a compressed representation of that image that can be transmitted, decompressed and displayed correctly by a receiver. You probably know that digital images are made up of pixels (hence, the megapixels quoted in digital camera advertisements). Each pixel represents one location in the two-dimensional grid that makes up the image, and for color images each pixel has some numerical value representing a color. There are lots of ways to represent colors, referred to as color spaces; the one most people are familiar with is RGB (Red, Green, Blue). You can think of color as being a three dimensional quantity you can make any color out of red, green, and blue light in different amounts. In a three-dimensional space, there are lots of different, valid ways to describe a given point. Similarly, there are various ways to describe a color using three quantities, and the most common alternative to RGB is YUV. The Y is luminance, roughly the overall brightness of the pixel, and U and V contain chrominance, or color information. The significance of this discussion is that the encoding and transmission of color images (either still or moving) requires agreement between the two ends on the color space. Otherwise, of course, you d end up with different colors being displayed by the receiver than were captured by the sender. Let s look at the example of the Graphical Interchange Format (GIF). GIF uses the RGB color space and starts out with 8 bits to represent each of the three dimensions of color for a total of 24 bits. Rather than sending those 24 bits per pixel, however, GIF first reduces 24-bit color images to 8-bit color images. This is done by identifying the colors used in the picture, of which there will typically be fewer than 2 24, and then picking the 256 colors that most closely approximate the colors used in the picture. There might be more than 256 colors, however, so the trick is to try not to distort the color too much by picking 256 colors such that no pixel has its color changed too much. The 256 colors are stored in a table, which can be indexed with an 8-bit number, and the value for each pixel is replaced by the appropriate index. Note that this is an example of lossy compression for any picture with more than 256 colors. Using this approach, GIF is sometimes able to achieve compression ratios on the order of 10:1, but only when the image consists of a relatively small number of discrete colors. Graphical logos, for example, are handled well by GIF. Images of natural scenes, which often include a more continuous spectrum of colors, cannot be compressed at this ratio using GIF. It is also not too hard for a human eye to detect the distortion caused by the lossy color reduction of GIF in some cases. 2

The JPEG format is considerably better suited to photographic images, as you would hope given the name of the group that created it. JPEG does not reduce the number of colors like GIF. Instead, JPEG starts off by transforming the RGB colors (which are what you usually get out of a digital camera) to the YUV space. The reason for this has to do with the way the eye perceives images. There are receptors in the eye for brightness, and separate receptors for color. Because we re very good at perceiving variations in brightness, it makes sense to spend more bits on transmitting brightness information. Since the Y component of YUV is, roughly, the brightness of the pixel, we can compress that component separately, and less aggressively, from the other two (chrominance) components. As noted above, YUV and RGB are alternative ways to describe a point in a 3- dimensional space, and it s possible to convert from one color space to another using linear equations. For one YUV space that is commonly used to represent digital images, the equations are: Y = 0.299R +0.587 G+0.114 B U = (B Y) 0.565 V = (R Y) 0.713 The exact values of the constants here are not important, as long as the encoder and decoder agree on what they are. (The decoder will have to apply the inverse transformations to recover the RGB components needed to drive a display.) The constants are, however, carefully chosen based on the human perception of color. You can see that Y, the luminance, is a sum of the red, green, and blue components, while U and V are color difference components. U represents the difference between the luminance and blue, and V the difference between luminance and red. You may notice that setting R, G, and B to their maximum values (which would be 255 for 8-bit representations) will also produce a value of Y = 255 while U and V in this case would be zero. That is, a fully white pixel is (255,255,255) in RGB space and (255, 0, 0) in YUV space. Once the image has been transformed into YUV space, we can now think about compressing each of the three components separately. We want to be more aggressive in compressing the U and V components, to which human eyes are less sensitive. One way to compress the U and V components is to subsample them. The basic idea of subsampling is to take a number of adjacent pixels, calculate the average U or V 3

value for that group of pixels, and transmit that, rather than sending the value for every pixel. Figure (1) illustrates the point. The luminance (Y) component is not subsampled, so the Y value of all the pixels will be transmitted, as indicated by the 16 16 grid of pixels on the left. In the case of U and V, we treat each group of four adjacent pixels as a group, calculate the average of the U or V value for that group, and transmit that. Hence, we end up with an 8 8 grid of U and V values to transmit. Thus, in this example, for every four pixels, we transmit six values (four Y and one each of U and V) rather than the original 12 values (four each for all three components), for a 50% reduction in information. It s worth noting that you could be either more or less aggressive in the subsampling, with corresponding increases in compression and decreases in quality. The subsampling approach shown here, in which chrominance is subsampled by a factor of two in both horizontal and vertical directions (and which goes by the identification 4:2:0), happens to match the most common approach used for both JPEG and MPEG. Fig (1) Subsampling the U and V components of an image. Once subsampling is done, we now have three grids of pixels to deal with, and each one is dealt with separately. JPEG compression of each component takes place in three phases, as illustrated in Figure (2). On the compression side, the image is fed through these three phases one 8 8 block at a time. The first phase applies the Discrete Cosine Transform (DCT) to the block. If you think of the image as a signal in the spatial domain, then DCT transforms this signal into an equivalent signal in the spatial frequency domain. This is a lossless operation but a necessary precursor to the next, lossy step. After the DCT, the second phase applies a quantization to the resulting signal and, in so doing, loses the least significant information contained in that signal. The third phase encodes the final result, but in so doing also adds an element of lossless compression to the lossy compression achieved by the first two phases. Decompression follows these same three phases, but in reverse order. 4

Fig (2) Block diagram of JPEG compression DCT Phase DCT is a transformation closely related to the fast Fourier transform (FFT). It takes an 8 8 matrix of pixel values as input and outputs an 8 8 matrix of frequency coefficients. Quantization Phase The second phase of JPEG is where the compression becomes lossy. DCT does not itself lose information; it just transforms the image into a form that makes it easier to know what information to remove. Quantization is easy to understand it s simply a matter of dropping the insignificant bits of the frequency coefficients. Encoding Phase The final phase of JPEG encodes the quantized frequency coefficients in a compact form. This results in additional compression, but this compression is lossless. JPEG includes a number of variations that control how much compression you achieve versus the fidelity of the image. These variations, plus the fact that different images have different characteristics, make it impossible to say with any precision the compression ratios that can be achieved with JPEG. Ratios of 30:1 are common, and higher ratios are certainly possible, but artifacts (noticeable distortion due to compression) become more severe at higher ratios. References: Computer Networks, a systems approach, 5th edition, by Larry L. Peterson and Bruce S. Davie. 5