**Open Access**-
**Total Downloads**: 13 -
**Authors :**Nitesh Agarwal , Ashutosh Vyas , Dr. A.M. Khan , Jitendra Suthar -
**Paper ID :**IJERTCONV3IS23015 -
**Volume & Issue :**NCETRASECT – 2015 (Volume 3 – Issue 23) -
**Published (First Online):**24-04-2018 -
**ISSN (Online) :**2278-0181 -
**Publisher Name :**IJERT -
**License:**This work is licensed under a Creative Commons Attribution 4.0 International License

#### An Analysis of Lossy Image Compression using DCT & DST

Nitesh Agarwal1 Department of Computer Science

Jodhpur Institute of Engineering & Technology

Jodhpur, India

Ashutosh Vyas2 Department of Computer Science

Jodhpur Institute of Engineering & Technology

Jodhpur, India

Dr. A.M. Khan3 Department of Mathematics

Jodhpur Institute of Engineering & Technology

Jodhpur, India

Jitendra Suthar4 Department of Computer Science

Jodhpur Institute of Engineering & Technology

Jodhpur, India

Abstract An image basically a 2D signal processed by the human visual system. The signal representing images are usually in analog form, but for processing, storage, transmission and computing by computer application analog images are converted from analog to digital form. A digital image is a 2D array of pixels. Digital images are used in medical science, security techniques, and transmission, for storing memories & for many purposes in human life. Digital image consume storage in digital devices as well as size of image may cause problem for transmission of digital image over a network hence we need some compression method to reduce image size w.r.t to storage. Image compression process use two technique to compress image lossless image compression & lossy image compression. In lossless image compression image in compress in such a way that in decompressing process original image is retrieve as it is without any loss but in lossy image compression an image is compressed by removing some information that are not needed for human visual system. Lossless image compression use some entropy encoding like Run Length Encoding, Huffman Encoding , LZW encoding etc. but lossy image compression required some transformation & quantization before applying this encoding techniques. Present paper deal with lossy image compression with DCT (Discrete Cosine Transform) & DST (Discrete Sine Transform) & give a comparative study of lossy image compression with these two transformation.

Key Words: DCT, DST, RLE, LZW.

1. INTRODUCTION

Because the human eye is very tolerant of approximation

images used for security, financial purpose cannot be compress using lossy image compression because these type of image cannot tolerate even a single error in image. Lossy image compression use some transformation, quantization & entropy encoding to compress an image. In this paper we use DCT & DST for transformation, standard quantize table & RLE (Run length Encoding) as entropy encoding. Both transformation work on 8*8 or 16*16 block of pixel matrices of image. To apply these transformation image pixel matrix is divided in to 8*8 or 16*16 block, each block passes through the transformation module & then after quantization we apply encoding techniques to compress image. This paper give an analytical overview of image compression using DCT & image compression using DST. Process is as follow

Fig 1: Lossy Image Compression with DCT/DST & RLE DCT (Discrete Cosine Transform) [1]

DCT convert an image into its equivalent frequency domain by partitioning image pixel matrix into blocks of size N*N. An image is a 2D pixel matrix hence 2D DCT is used to transform an image.

2-D DCT can be definedas

error in an image. Hence we may decide to exploit this

N 1 N 1

tolerance to produce increased compression, at the expense of Cu, v u(v) f x, ycos

2x 1 ucos

2y 1 v 1

image quality by reducing some pixel data or information.

2N 2N

x 0 y0

Lossy image compression compress the image by adding some

error (noise) in the image or by removing some information from that can be tolerable for human visual system. The

for u, v = 0,1,2,,N 1.

& inverse transformation is defined as 1.2 Quantization

f x,y N 1 N 1 u(v)cu,vcos 2x 1 ucos 2y 1 v 2 A Quantizer simply reduces the number of bits needed to store

u 0 v 0

2N

2N

the transformed coefficients by reducing the precision of those values. Since this is a many-to-one mapping, it is a lossy

f x, y represents pixel color value at position ( x, y ).

f x, y represents pixel color value at position ( x, y ).

Where cu,v represents frequency value for u, v & process and is the main source of compression in an encoder.

The quantization matrix is designed to provide more resolution to more perceivable frequency components over

(u)

for u 0

N

2

3

less perceivable components (usually lower frequencies over high frequencies) in addition to transforming as many components to 0, which can be encoded with greatest efficiency. If DCT used as a transformation then each DCT

N

1

for u 0 block is quantize using following formula

DCT (i, j)

QDCTi, j ROUND QT(i, j) 7

N for v 0 4

(v)

for v 0

N

& this QDCT block dequantize by following formula

DCTi, j ROUND QDCT(i, j) * QT(i, j) 8

DST (Discrete Sine Transform) [7]

DST work as same as DCT it also convert 2d pixel matrix in frequencydomain.

For i, j= 0, 1, 2, 3., N-1

Similarly if DST use as transformation then each DST block is quantize using following formula

DST( i j)

QDSTi, j ROUND ,

9

2-D DST can be definedas

QT(i, j)

, ( )N1 N1 , sin 2x 1(u1)sin 2y 1(v 1) 5 & this QDCT block dequantize by following formula

s u v u v f x y

2N 2N

x0 y0

for u, v = 0,1,2,,N 1.

& inverse transformation is defined as

DSTi, j ROUND QDST(i, j) * QT(i, j) 10

Where (i,j) define position of input & output value, QDCT is DCT block after quantization, QDST is DST block after

,

N1 N1

2x 1(u 1)

2y 1(v 1) 6

qasuantization, QT is standard quantization matrices & defined

f x y u (v)cu, vsin sin

16 | 11 | 10 | 16 | 24 | 40 | 51 | 61 |

12 | 12 | 14 | 19 | 26 | 58 | 60 | 55 |

14 | 13 | 16 | 24 | 40 | 57 | 69 | 56 |

14 | 17 | 22 | 29 | 51 | 87 | 80 | 62 |

18 | 22 | 37 | 56 | 68 | 109 | 103 | 77 |

24 | 35 | 55 | 64 | 81 | 104 | 113 | 92 |

49 | 64 | 78 | 87 | 103 | 121 | 120 | 101 |

72 | 92 | 95 | 98 | 112 | 100 | 103 | 99 |

16 | 11 | 10 | 16 | 24 | 40 | 51 | 61 |

12 | 12 | 14 | 19 | 26 | 58 | 60 | 55 |

14 | 13 | 16 | 24 | 40 | 57 | 69 | 56 |

14 | 17 | 22 | 29 | 51 | 87 | 80 | 62 |

18 | 22 | 37 | 56 | 68 | 109 | 103 | 77 |

24 | 35 | 55 | 64 | 81 | 104 | 113 | 92 |

49 | 64 | 78 | 87 | 103 | 121 | 120 | 101 |

72 | 92 | 95 | 98 | 112 | 100 | 103 | 99 |

u 0 v0 2N 2N

Where cu,v represents frequency value for u, v &

f x, y represents pixel color value at position ( x, y ).

(u)

(v)

1 for u N 1

N

2 for u N 1

N

1 for v N 1

N

5

6 Table 1: Quantization Matrices [9]

2 for v N 1 In this lossy image compression QDCT provides input for

N entropy encoding (RLE) if DCT use for transformation & if

DST use for transformation then QDST provides input for

entropy encoding (RLE).