Image Compression Techniques

Similar documents
ROI Based Image Compression in Baseline JPEG

Digital Image Representation Image Compression

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

Introduction ti to JPEG

Video Compression An Introduction

APPM 2360 Project 2 Due Nov. 3 at 5:00 PM in D2L

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

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

Lecture 8 JPEG Compression (Part 3)

An introduction to JPEG compression using MATLAB

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

Redundant Data Elimination for Image Compression and Internet Transmission using MATLAB

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

CMPT 365 Multimedia Systems. Media Compression - Image

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

IMAGE COMPRESSION USING FOURIER TRANSFORMS

CS 335 Graphics and Multimedia. Image Compression

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

Ian Snyder. December 14, 2009

Compression II: Images (JPEG)

Chapter 1. Digital Data Representation and Communication. Part 2

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

Lecture 8 JPEG Compression (Part 3)

Wireless Communication

Image Compression Algorithm and JPEG Standard

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

Multimedia Communications. Transform Coding

Haar Wavelet Image Compression

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

JPEG Compression. What is JPEG?

IMAGE COMPRESSION USING HYBRID QUANTIZATION METHOD IN JPEG

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

JPEG Compression Using MATLAB

7.5 Dictionary-based Coding

AUDIOVISUAL COMMUNICATION

Priyanka Dixit CSE Department, TRUBA Institute of Engineering & Information Technology, Bhopal, India

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

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

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

Digital Image Processing

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

Discrete Wavelets and Image Processing

A Parallel Reconfigurable Architecture for DCT of Lengths N=32/16/8

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

4. Image Retrieval using Transformed Image Content

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

3. (a) Prove any four properties of 2D Fourier Transform. (b) Determine the kernel coefficients of 2D Hadamard transforms for N=8.

Lossless Image Compression having Compression Ratio Higher than JPEG

Steganography: Hiding Data In Plain Sight. Ryan Gibson

Image Compression using Discrete Wavelet Transform Preston Dye ME 535 6/2/18

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

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

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

The PackBits program on the Macintosh used a generalized RLE scheme for data compression.

Spatial Enhancement Definition

Fundamentals of Video Compression. Video Compression

Multimedia Signals and Systems Still Image Compression - JPEG

ISSN Vol.06,Issue.10, November-2014, Pages:

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Hybrid Image Compression Using DWT, DCT and Huffman Coding. Techniques

Face identification system using MATLAB

Digital Image Processing

Image Pyramids and Applications

7: Image Compression

The DCT domain and JPEG

Volume 2, Issue 9, September 2014 ISSN

Source Coding Techniques

Fingerprint Image Compression

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

Cosine Transform Priors for Enhanced Decoding of Compressed Images.

Image Compression With Haar Discrete Wavelet Transform

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

Does everyone have an override code?

Topic 5 Image Compression

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

IMAGE COMPRESSION. Chapter - 5 : (Basic)

REVIEW ON IMAGE COMPRESSION TECHNIQUES AND ADVANTAGES OF IMAGE COMPRESSION

Image Transformation Techniques Dr. Rajeev Srivastava Dept. of Computer Engineering, ITBHU, Varanasi

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

COLOR IMAGE COMPRESSION USING DISCRETE COSINUS TRANSFORM (DCT)

Image Compression System on an FPGA

Lecture 11 : Discrete Cosine Transform

A Novel VLSI Architecture for Digital Image Compression using Discrete Cosine Transform and Quantization

IMAGE COMPRESSION TECHNIQUES

CSEP 521 Applied Algorithms Spring Lossy Image Compression

A New Lossy Image Compression Technique Using DCT, Round Variable Method & Run Length Encoding

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

Lecture 5: Compression I. This Week s Schedule

Implementation of Random Byte Hiding algorithm in Video Steganography

Relationship between Fourier Space and Image Space. Academic Resource Center

Medical Image Compression using DCT and DWT Techniques

VC 12/13 T16 Video Compression

Combined DCT-Haar Transforms for Image Compression

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

Image Compression Using K-Space Transformation Technique

Comparative Study between DCT and Wavelet Transform Based Image Compression Algorithm

MRT based Fixed Block size Transform Coding

Operation of machine vision system

IMAGING. Images are stored by capturing the binary data using some electronic devices (SENSORS)

Transcription:

ME 535 FINAL PROJECT Image Compression Techniques Mohammed Abdul Kareem, UWID: 1771823 Sai Krishna Madhavaram, UWID: 1725952 Palash Roychowdhury, UWID:1725115 Department of Mechanical Engineering University of Washington

Introduction: Image Compression Data compression algorithms are designed specifically for reducing the size of an Image are used for compressing images for a large segment of data exchanged. Thus, Image compression softwares aid in saving storage space and time of data transfer. By altering key parameters of the algorithm during the compression, we can generate suitable image quality and file size. There are two main types of image compression algorithms: Lossy and Lossless compression. Lossy compression losses some information due to the compression whereas lossless algorithms retain all the information of an image. It is commonly observed that Lossy algorithms tend to generate higher compression ratios in comparison with Lossless algorithms. This study deals with comparing the compression ratios and output image qualities of Discrete Cosine Transform (DCT) and Fast Fourier Transform (FFT). Both of these algorithms come under the Lossy compression techniques and have high compression ratios. Joint Photographics Expert Group (JPEG) is a commonly used Lossy Compression type algorithm, we are going to perform DCT and FFT techniques on JPEG images and compare them. We do this in 3 main steps. First, we divide the image into multiple pixel blocks. An 8x8 size of pixel blocks are used for simplicity. Then, we change the image from spatial domain to frequency domain. Next, we quantize the data from frequency domain to filter out all the information we can afford to lose. Once these steps are completed then we will decompress the image by reverting it back to spatial domain and the reduced size image is obtained. Let's study each step in detail.

Procedure: Step 1: We divide the image into 8x8 blocks of pixels starting from the top left corner. For some images the pixels are not very well divided so they may not be in multiples of 8. For such images we add extra pixels to the image and make it a multiple of 8 by means of padding. These extra pixels values that are added will be removed once we have completed the 3 steps. Since we are doing a grayscale image compression and not for the color images, we have only white and black as the available color. So, each byte of the image can have a value between 0 which is full black and 255 which is full white. For simplicity we change the value of the colors by 128 from each byte so as to make the average tending to zero, where -128 is full black and 127 is full white. Once this process is done we proceed to next step. Step 2: Once the image is divided and pixels are assigned values in 64 byte block, we now convert the pixel data from spatial domain to the frequency domain. This is done since the techniques we are using for compression are functions of frequency, it will be easy for us to do the quantization process and remove the the unnecessary information in order to save the storage size. The way we go about it is, since every byte in the block represents the intensity of each pixel and when this is converted to the frequency domain, each value will be a variation of cosine function either in amplitude or phase change. For different frequencies it has different values and the whole block is now represented by multiplying those amplitudes with their respective cosine function and adding them. Once the frequency data is obtained, we filter out all the high frequency data since human being vision has trouble detecting high frequency data points. And once the data is removed, there is some loss in picture quality but human eye

cannot differentiate between the newly obtained image and the original one. This filtering of data is called Quantisation. Now coming to the algorithms we are going to use to compress the image, the FFT was one of the few popular algorithms used back then. Although the issue with FFT is that there are many imaginary components which are obtained which cannot be processed in spatial domain. Hence, these days we use DCT which is derived from FFT itself and is much faster in compressing the image and provides good compression ratios. The DCT usually is used for 1D data and in this case we apply it in x-direction and y-direction separately, thereby forming a 2D DCT. The 2D Discrete Cosine Transform equation is given in below. p(x, y) is the 8-bit image value at coordinates (x, y), and D (i, j) is the new entry in the frequency matrix. For an 8x8 matrix, this becomes: We take i and j as per the 8x8 pixel matrix so as to get the transition from spatial domain to frequency domain. The frequency matrix has values from -1024 to 1023 with the first element being the lowest frequency cosine coefficient and as we move to the right the values keeps on increasing. They represents the functions with increasing frequencies. And if we go down vertically then as well the frequency increases. Thereby leading to the final element which have the highest value. The whole lower right part of the matrix

has high frequency values which will be factored out after quantisation. This way almost half the matrix data is removed. As we can from the image below. Step 3: Now in order to remove the high frequency data from the matrix, we divide each of the coefficients with a certain fixed constant and then we round it down to the closest integer value. This fixed constant value has been researched about and they came up with certain numbers which gives out the best possible outcome for the compressed image. These values are then collected in a 8x8 matrix for our image and is called Quantization matrix. This matrix will be symmetrical about the diagonal and as mentioned earlier the matrix will have high frequency values in lower right part of it and low frequency values in upper left part. An optimised example standard quantisation matrix is shown below. It gives out an image of quality level of 50.

The algorithm takes a value from the Frequency matrix (F) and divides it by its corresponding value in the Quantization matrix (Q). This gives the final value for the location in the Quantized Frequency matrix (F quantize ). Decompressing the transformed image: Now to change the transformed image from frequency domain to spatial domain we need to first multiply each value with its respective quantisation matrix element and then we need to use the Inverse DCT technique to obtain the actual image. Given below is the Equation for the IDCT: And then we need to undo the changes made to the byte of each element by adding 128 to them as we subtracted the same amount in order to make the average to zero. Also we need to remove the any extra pixels that were added to make the image pixel division a multiple of 8. And then the pixels are combined to form a compressed image.

Compression Ratio After the compressed image is obtained, the compression ratio is calculated. A compression ration gives us the comparison of how much the data was compressed for a particular compressed image quality. A higher compression ratio is desirable but it also results in more data loss. Therefore, a balance between the high compression ratio and less data loss needs to be done.

Results: Original Image DCT of Image From the above images we can see that too high of a compression would result in more data loss due to which an image can become unpleasant to look and one can notice the low quality of the image. DCT Coefficient Matrix

DCT Matrix Running the matlab code gave us the following result for the total time for computing all these (5) images: Elapsed time is 3.124373 seconds Compressed Images with no. of Coefficients used (out of 64 Coefficients ) Compression ratios ~(10 30 50 70 90 100)%

Signal to Noise Ratio(SNR) as a function of no. of coefficients (Quality of obtained image)

Image compression with FFT: We used DCT in the previous part for image compression. In this part we are using the Fast Fourier Transform (FFT) to compress the images. Different compression ratios are depicted in the plot as well. FFT of the original image

FFT of the Image Compressed Images Running the matlab code gave us the following result for the total time for computing all these images: Elapsed time is 7.295931 seconds

Conclusion: From the results we can see that the DCT performs better than the FFT as it is faster and produces better results. References: Image Compression, Comparison between Discrete Cosine Transform and Fast Fourier Transform and the problems associated with DCT, Imdad Ali Ismaili, Sander Ali Khowaja, Waseem Javed Soomro Brunton, Steve, Dr. FFT and Image Compression. ME 565 Mechanical Engineering Analysis. Web. 1 March 2018.