ROLL NO. :- 02 Introduction The goal of image compression is to reduce the amount of data required to represent a digital image. JPEG image compression standard uses Discrete Cosine Transform (DCT). It is a fast transform. It is a widely used and robust method for image compression. It has excellent compaction for highly correlated data. DCT has fixed basis images. It gives good compromise between information packing ability and computational complexity. Image File Format There are numerous types of image formats such as .gif, .jpg, .png, .tif, .bmp, etc. each one with their own advantages and disadvantages.
GIF:-The Graphics Interchange Format is a bitmap
image format that was introduced by CompuServe in 1987 and has since come into widespread usage on the World Wide Web due to its wide support and portability. Image File Format PNG:- Portable Network Graphics is a raster graphics file format that supports lossless data compression. PNG was created as an improved, non-patented replacement for Graphics Interchange Format (GIF), and is the most used lossless image compression format on the Internet.
JPEG:- named after its creator the Joint Photographic
Expert Group, is a format for encoding high-resolution graphic images as computer files for storage and transmission. Discrete cosine transform (DCT) In this step, each block of 64 pixels goes through a transformation called the discrete cosine transform (DCT). The transformation changes the 64 values so that the relative relationships between pixels are kept but the redundancies are revealed. The formula is given below. P(x, y) defines one value in the block, while T(m, n) defines the value in the transformed block. The DCT of each 8 × 8 block of values is computed using the expression 7 7 T[m,n] = ¼ C(m) C(n) ∑ ∑ P[x,y] cos (2x+1) m π /16 cos(2y+1) n π /16 x=0 y=0 where C(m) and C(n) = 1/ √2 for m,n=0 =1 otherwise To understand the nature of this transformation, let us show the result of the transformations for three cases.
Case 1: uniform grayscale
Case 2: two sections Case 3: gradient grayscale Quantization After the T table is created, the values are quantized to reduce the number of bits needed for encoding. Quantization divides the number of bits by a constant and then drops the fraction. This reduces the required number of bits even more. In most implementations, a quantizing table (8 by 8) defines how to quantize each value. The divisor depends on the position of the value in the T table. This is done to optimize the number of bits and the number of 0s for each particular application. Compression After quantization the values are read from the table, and redundant 0s are removed. However, to cluster the 0s together, the process reads the table diagonally in a zigzag fashion rather than row by row or column by column. The reason is that if the picture does not have fine changes, the bottom right corner of the T table is all 0s.
JPEG usually uses run-length encoding at the compression
phase to compress the bit pattern resulting from the zigzag linearization. Reading the table Screenshots Original image Compressed image Conclusion This project successfully implemented the DCT for image compression. The system is designed by using MATLAB software. This project has been tested for all possible situations on MATLAB environment on Windows 8 and finally produced an 8x8 Compressed DCT image. One of the main problems and the criticism of the DCT is the blocking effect. In DCT, images are broken into blocks of 8x8 or 16x16 or bigger. The problem with these blocks is that when the image is reduced to higher compression ratios, these blocks become visible. This has been termed as the blocking effect. This image is compressed using 8x8 blocks and only 4 coefficients are retained. THANK YOU