ISSN: 2229-371X
Nikita Bansal*1, Sanjay Kumar Dubey2
|
Corresponding Author: Nikita Bansal, E-mail: nnikita3@gmail.com |
Related article at Pubmed, Scholar Google |
Visit for more related articles at Journal of Global Research in Computer Sciences
Digital images in their uncompressed form require an enormous amount of storage capacity which in turn needs large transmission bandwidth for the transmission over the network. Image compression reduces the storage space of image and also maintains the quality of image. There are various compression techniques available in literature. Discrete Cosine Transform (DCT) is one of the widely used image compression method and the Discrete Wavelet Transform (DWT) is another which provides improvements in the quality of the picture. This research paper proposed a scheme for image compression using DCT and DWT named as hybrid compression technique. DCT has high energy compaction property and often require less computational resources and DWT is multi-resolution transformation. The goal is to achieve higher compression rates with preserving the quality of the reconstructed image.
Keywords |
Image compression, DCT, DWT. |
INTRODUCTION |
Data compression is the method to reduce the redundancies in data so as to decrease data storage requirements and communication costs. Reducing the storage requirement is equivalent to increasing the capacity of the storage medium and hence communication bandwidth [6]. Data is represented as a mixture of information and redundancy. Information is that portion of data which must be preserved permanently in its original form so as to correctly interpret the meaning or the purpose of the data. Redundancy is that portion of the data which can be removed when it is not needed and can be reinserted in order to interpret the exact data when needed. There are two types of compression systems[9]:- |
a. Lossy Compression System:- Lossy compression techniques can be used where some of the finer details of the image can be sacrificed for saving a little more bandwidth or storage space [9]. |
b. Lossless compression system:- Lossless compression system aims at retrieving the decompressed image identical to the original one. |
Requirement for image compression system: |
An image compression system requires the following two components: |
a. Encoding System |
b. Decoding System |
Encoding System takes original image as an input, process it and gives compressed image as an output. While Decoding System takes an compressed image as input and gives the image as output which is more identical to original image. Nowadays, DCT and DWT are the most popular techniques for image compression. Both the techniques are frequency based techniques. Both of the techniques have their own advantages and disadvantages. Like DWT gives better compression ratio without losing more information of image but it need more processing power [14]. While DCT need low processing power but it has block artifacts which means loss of some of the information of the image. Our main goal is to take the advantages of both of the compression techniques and develop a hybrid of DCT and DWT. In recent times, developing hybrid schemes for effective image compression has gained enormous popularity among the researchers [1]. The aim of this paper is to achieve better compression ratio by using both of these techniques with less computational resources or overhead, in less time and without much loss of the information in the image. |
DISCRETE COSINE TRANSFORM (DCT) |
The discrete cosine transform (DCT) separate the image into different parts of varying importance. DCT expresses a sequence of finitely several data points in terms of sum of cosine functions oscillating at different frequencies [2]. In particular, a DCT is a Fourier-related transform similar to the discrete fourier transform (DFT), but using only real numbers [4]. The DCT is a unitary transform, meaning that the inversion can be accomplished [7]. |
Image Processing by DCT: |
Discrete cosine transform (DCT) is widely used in image processing by performing encoding and decoding. |
Encoding Technique in DCT: |
Steps to encode or compress the image:- |
Step1. Firstly the image is broken into N*N blocks of pixels. Here N may be 4, 8 etc. |
Step2. Working from top to bottom, left to right, the DCT is applied to each block. |
Step3. Every block elements are compressed through quantization means dividing by some specific value. |
Step4. This array of compressed blocks that constitute the image is stored in a reduced amount of space. |
So, first the whole image is divided into small N*N blocks and then DCT is applied on these blocks. |
After that for reducing the storage space DCT coefficients are quantized through dividing by some value or by quantization matrix. So that large value become small and need small size of space. This step is lossy step. If we take small value for quantization then we get the better quality or less MSE (Mean Square Error) but less compression ratio [14]. Block size also affects quality and compression ratio. Simply, higher the block size higher is the compression ratio but with loss of more information and quality. |
Decoding Technique in DCT: |
Decoding system is exact reverse process of encoding. There are four steps for getting the original image not exact but identical to original from compressed image [14]. |
Step1. Firstly, load compressed image from disk. |
Step2. Image is then broken into N*N blocks of pixels. |
Step3. Every block is de-quantized by applying reverse process of quantization. |
Step4. Now apply inverse DCT on every block. Then combine these blocks into an image which is identical to the original image. |
In the decoding process, N’s value is kept same as it was used in the encoding process. Then de-quantization process is performed by multiplying with quantization value or quantization matrix. This is lossy technique so output image is not exact copy of original image but it is identical to original image. So this process efficiency is measured by compression ratio. Compression ratio is defined by ratio of storage bits of original image and storage bits of compressed image [14]. |
In the decoding process, N’s value is kept same as it was used in the encoding process. Then de-quantization process is performed by multiplying with quantization value or quantization matrix. This is lossy technique so output image is not exact copy of original image but it is identical to original image. So this process efficiency is measured by compression ratio. Compression ratio is defined by ratio of storage bits of original image and storage bits of compressed image [14]. |
DISCRETE WAVELET TRANSFORM (DWT) |
Research activities in image coding have been focused on the DWT, which has become a standard tool in image compression applications because of their data reduction capability [10,16,17]. In DWT, the entire image is transformed and compressed as a single data object rather than block by block as in a DCT based compression system. |
Wavelet analysis can be used to divide the information of an image into approximation and detailed sub signal [15]. The approximation sub signal shows the general trend of the pixel value, and three detailed sub signals shows vertical, horizontal and diagonal details. If these details are very small than they can be set to zero without significantly changing the image. The compression ratio increases as the number of zeroes increases. There are two types of filters [15]:- |
a. High pass filter : high frequency information is kept, low frequency information is lost. |
b. Low pass filter : low frequency information is kept, high frequency information is lost. |
H = 1 /√2 (1 -1) [2] |
L = 1/√2 (1 1) [2] |
So signal is effectively decomposed into two parts, a detailed part (high frequency) and approximation part (low frequency). |
In the below figure, an image is shown after applying encoding process. This figure has four blocks. The first upper half block shows the approximation, while second upper half shows the horizontal detail. First lower level block shows the vertical detail and second lower level block shows the diagonal detail. |
Decoding Technique in DWT: |
In DWT, decoding process is not the exact reverse of the encoding process. Steps of the decoding of an image are shown below. |
Step1. Extract low pass filter image and high pass filter image from compressed image simply by taking upper half rectangle of matrix. |
Step2. Now, both of the images are up sampled by 2. |
Step3. Now, the summation of both images is taken into one image called r1. |
Step4. Now, again extract low pass filter image and high pass filter image by simply dividing vertically. The first half is low pass filtered image and the second half is high pass filtered image. |
Step5. Now, take summation of both of the images and obtained image is called as reconstructed image. |
PROPOSED DCT AND DWT TRANDFORM (HYBRID) |
In the combined approach, both DCT and DWT are carried out on the image in some sequence one after the other in order to compress the image much more and achieve much higher compression ratios. Compression increases with increase in window size for DCT and decreases with increase in window size for DWT. |
Here in this approach, first the image is divided into several blocks of images of size 32*32. Then 2D-DWT 1st level is applied on each block of image which results the image in four sub bands named LL, LH, HH, HL. Then on each sub band 2D-DWT 2nd level is applied again which again result in four different frequencies sub bands. Now first the scaling of these 8*8 blocks of images is done and done rescaling is performed via scaling factor. |
Then on these 8*8 blocks 2D-IDCT is performed followed by 2D-IDWT 1st level on the 8*8 block of images which result in 16*16 blocks of images. Then 2D-IDWT 2nd level is applied which result in 32*32 blocks of images. |
Then merging is performed in order to retrieve the compressed image. The compressed image occupies less space as compared to the original image as well less then the space occupied by the image when compressed via DCT and via DWT individually. |
RESULT AND DISCUSSION |
DCT is a technique for image compression which performs efficiently at medium bit rates. Disadvantage of DCT is that only spatial correlation of the pixels is considered and the correlation from the pixels of the neighboring blocks is neglected. Using DCT blocks cannot be decorrelated at their boundaries. DWT provides high compression quality at low bit rates. The use of larger DWT functions or wavelet filters produce blurring near edges in the images. DWT performs better than DCT in that it avoids blocking artifacts which degrade the reconstructed image. However DWT provides lower quality than DCT at low compression rates and requires longer compression time. Thus a hybrid technique which is a combination of the advantages of both DCT and DWT is proposed which achieves much more compression ratio than that achieved by DCT and DWT. |
CONCLUSION |
In this paper, hybrid of DCT and DWT for image compression and decompression has been proposed. It is observed that MSE is low and PSNR is high in DWT than DCT based compression. It is concluded that overall performance of hybrid is better than both DCT and DWT on the basis of compression rates. It achieves high compression ratio then both DCT and DWT without much loss of the image information. The image compressed with hybrid technique will require less space for storage and less bandwidth while transmission over the network. |
References |
|