Sie sind auf Seite 1von 6

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)

Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856

Wavelets and Neural Networks based Hybrid Image Compression Scheme


Mr. S. SridharM.I.S.T.E1, V.Venugopal2, S. Ramesh3, S.Srinivas4 and Sk. Mansoob5
1

Professor, ECE Dept. LENDI Institute of Engineering and Technology, Vizianagaram, INDIA Student, ECE Dept. LENDI Institute of Engineering and Technology, Vizianagaram, INDIA

2,3,4,5

Abstract: Images having large data quantity needs more


space for storage and very high data rates for transmission. As a result, highly efficient image compression methods are under wide attention. Employing more than one traditional image compression algorithms, results in hybrid image compression techniques. This paper aims at implementing a wavelet transform and neural network based model for image compression which combines the advantages of both wavelet transformations and neural networks. Images are decomposed using Haar wavelet filters into a set of sub bands with different resolutions corresponding to different frequency bands. Scalar quantization and Huffman coding schemes are used for compression of different sub bands based on their statistical properties. The coefficients in low frequency band are compressed by Differential Pulse Code Modulation (DPCM) and the coefficients in higher frequency bands are compressed using neural networks. Using this scheme we can achieve satisfactory reconstructed images with increased bit rates, large Peak Signal to Noise Ratio (PSNR) values. Image compression using cosine transform results in blocking artifacts, which can be eliminated using wavelet transforms, on the other hand neural networks reduce Mean Square Error (MSE). Empirical analysis and calculation of required metrics is performed.

JPEG, MPEG and H.261 for image and video compression have been completed. At present, the main core of image compression technology consists of three important processing stages: pixel transforms quantization and entropy coding. The design of pixel transforms is to convert the input image into another space where image can be represented by uncorrelated coefficients or frequency bands. Quantization, in mathematics and digital signal processing, is the process of mapping a large set of input values to a smaller set such as rounding values to some unit of precision. A device or algorithmic function that performs quantization is called a quantizer. The error introduced by quantization is referred to as quantization error or roundoff error. Entropy coding is a form of lossless data compression in which statistical information of input data considered to reduce the redundancy. Typical algorithms are arithmetic coding, Huffman coding and run-length coding etc. The main objective of this paper is to compress images by reducing number of bits per pixel required to represent it for storing or transmission of images and then reconstructing back by decoding the Huffman codes. 1.1 Principle behind Compression The following example illustrates the need for compression of digital images. To store a color image of a moderate size, e.g. 512512 pixels, one needs 0.75 MB of disk space. A 35mm digital slide with a resolution of 12m requires 18 MB. One second of digital PAL (Phase Alternation Line) video requires 27 MB. To store these images, and make them available over network (e.g. the internet), compression techniques are needed. Image compression addresses the problem of reducing the amount of data required to represent a digital image. The underlying basis of the reduction process is the removal of redundant data. According to mathematical point of view, this amounts to transforming a two-dimensional pixel array into a statistically Page 195

Keywords: Blocking artifacts, DPCM, Haar wavelet, MSE, Neural Networks, PSNR, Scalar Quantization, and Wavelet transforms.

1. INTRODUCTION
Image compression is a part of large context where different types and size of images are compressed using different methodologies. Computer file format designed primarily to store scanned documents, especially those containing a combination of text, line drawings, and photographs. Image compression uses technologies such as image layer separation of text and background/images, progressive loading, arithmetic coding, and lossy compression for bi-tonal (monochrome) images. Image compression is a key technology in the development of various multi-media computer services and telecommunication applications such as video conferencing, interactive education and numerous other areas. Image compression techniques aim at removing (or minimizing) redundancy in data, yet maintains acceptable image reconstruction. A series of standards including Volume 2, Issue 2 March April 2013

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
uncorrelated data set. The transformation is applied prior to storage or transmission of the image. At receiver, the compressed image is decompressed to reconstruct the original image or an approximation to it. 1.2 Redundancy Data redundancy is of central issue in digital image compression. If n1 and n2 denote the number of information carrying units in original and compressed image respectively, then the compression ratio CR can be defined as image can be reasonably predicted from the values of group of other pixels in the image. For example the gray levels of neighboring pixels are roughly the same and by knowing gray level value of one of the neighborhood pixels one has a lot of information about gray levels of other neighborhood pixels. Thus the value of the individual pixel carries relatively small amount of information and much more information about pixel value can be inferred on the basis of its neighbors' values. These dependencies between pixels' values in the image are called inter-pixel redundancy. In order to reduce the inter-pixel redundancies in the image, the 2-D pixel array of image values, used for image visualization should be transformed into another, generally "nonvisual" representation. 1.2.3 Psycho visual Redundancy It is known that the human eye does not respond to all visual information with equal sensitivity. Some information is simply of less relative importance. This information is referred to as psycho visual redundant and can be eliminated without introducing any significant difference to the human eye. The reduction of redundant visual information has some practical applications in image compression. Since the reduction of psycho visual redundancy results in quantitative loss of information, this type of reduction is referred to as quantization. The most common technique for quantization is the reduction of number of colors used in the image, thus color quantization. Since some information is lost, the color quantization is an irreversible process. So the compression techniques that used such process are lossy. It should be noted that even if this method of compression is lossy, in situations where such compression technique is acceptable the compression can be very effective and reduce the size of the image considerably. Its elimination is possible only because the information itself is not essential for normal visual processing. Since the elimination of psychovisual redundant data results in a loss of quantitative information. Thus it is an irreversible process. As it is an irreversible operation (visual information is lost) quantization results in lossy data compression. 1.3 Error Criteria To judge the performance of a lossy compression technique we need to decide upon the error criteria. The error criteria commonly used may be classified into two broad groups: (a) Objective criteria, (b) Subjective criteria. 1.3.1 Objective Criteria Inter-pixel redundancy is another form of data redundancy, which is related to inter-pixel correlation within an image. Usually the value of certain pixel in the Volume 2, Issue 2 March April 2013 Two of the objective error criteria used to compare the various image compression techniques are the Mean Page 196

Relative Data Redundancy is given by

In digital image compression, three basic data redundancy can be identified and exploited (a) coding redundancy, (b) inter-pixel redundancy, and (c) psychovisual redundancy. Data compression is achieved when one or more of these redundancies are reduced or eliminated. In this paper image compression is achieved by reducing all these redundancies. 1.2.1 Coding redundancy In digital image processing the technique for image enhancement by histogram processing is on the assumption that the gray levels of an image are random quantities. In this paper we give similar formulation to show the gray level of an image also can provide a great deal of insight into the construction of codes to reduce the amount of data used to represent it. The mathematical equations of coding redundancy is

Where L is number of gray levels, is number of times that the kth gray level appears in the image and n is the number of pixels in the image. is the discrete random variable in the interval [0, 1], length of the bit stream to represent each variable of and is the average number of bits required to represent each pixel. To reduce this redundancy from an image we go for the Huffman technique were we assign fewer bits to the more probable gray levels than to the less probable ones achieves data compression. 1.2.2 Inter-pixel redundancy

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
Square Error (MSE) and the Peak Signal to Noise Ratio (PSNR) to achieve desirable compression ratios. The MSE is the cumulative squared error between the compressed and the original image, whereas PSNR is a measure of the peak error. The mathematical formulae for the two are: In DPCM we transmit not the present sample x(n), but e(n) (the difference between x(n) and its predicted value y(n)). At the receiver, we generate y(n) from the past sample value to which the received x(n) is added to generate x(n). There is, however, one difficulty associated with this scheme. At the receiver, instead of the past samples x(n-1),x(n-2),.., as well as e(n),we have their quantized version xs(n 1), xs(n 2),.. This will increase the error in reconstruction. In such a case, a better strategy is to determine y(n), the estimate of xs(n) (instead of x(n)), at the transmitter also from the quantized samples xs(n 1), xs(n 2), The difference e(n)=x(n)y(n) is now transmitted via PCM. At the receiver, we can generate y(n), and from the received e(n), we can reconstruct xs(n). x(n) + _ y(n) Predict Predictor and Correct loop + e(n) Q Predictor and Compare loop xs(u) + eq(n)

Where I(x,y) is the original image, I'(x,y) is the approximated version (which is actually the decompressed image) and M,N are the dimensions of the images. A lower value for MSE means lesser error, and as seen from the inverse relation between the MSE and PSNR, this translates to a high value of PSNR. Logically, a higher value of PSNR is good because it means that the ratio of Signal to Noise is higher. Here, the 'signal' is the original image, and the 'noise' is the error in reconstruction. So, if you find a compression scheme having a lower MSE (and a high PSNR), you can recognize that it is a better one. 1.3.2 Subjective criteria The subjective error measure is performed as follows. The original image and the reconstructed image are shown to a large group of examiners. Each examiner assigns grade to the reconstructed image with respect to the original image. These grades may be drawn from a subjective side, divide as, and say excellent, good reasonable poor and unacceptable. However the scale can of course be dividing into coarser or finer bins. Finally, based on grades assigned by the entire examiner, an overall grade is assigned to the reconstructed image. Complement of this grade gives an idea of the subjective error.

Figure 1 DPCM Encoder The difference of the original image data, x(n), and prediction image data, y(n), is called estimation residual, e(n). So

Is quantized to yield

Where q(n) is the quantization error and eq(n) is quantized signal And

2. COMPRESSION TECHNIQUES
2.1 Differential Pulse Code Modulation Differential pulse-code modulation (DPCM) is a signal encoder that uses the baseline of pulse-code modulation (PCM) but adds some functionality based on the prediction of the samples of the signal. The input can be an analog signal or a digital signal. If the input is a continuous-time analog signal, it needs to be sampled first so that a discrete-time signal is the input to the DPCM encoder.

Here b is number of bits. Imax, (simg)max is maximum value of an image signal. The prediction output y(n) is fed back to its input so that the predictor input xs(n) is

This shows xs(n) is quantized version of x(n). The prediction input is indeedxs(n), asassumed. Along with Volume 2, Issue 2 March April 2013 Page 197

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
DPCM, wavelet transforms, neural networks, Quantization and Huffman coding are also used in this scheme. next section. Finally, the output of combiner is Huffman encoded and is ready for transmission or storage. 3.1 Image Decompression Scheme The block diagram of decompression scheme for compressed image (compressed bit stream) is shown in figure 3. The output of the Huffman encoder is given to Huffman decoder, these reconstructed bit streams are dequantized after splitting the values of band-1 and rest of the bands (band-2 to band-6). The output values of the reverse quantization block are frequency band-2 to band6, band-1 is compressed low frequency band and band-2 to band-6 are compressed high frequency bands. The compressed low frequency components are given to inverse DPCM (IDPCM) in inverse DPCM quantization will not be present. The compressed frequency bands are given to output layer of the neural network, and then we get reconstructed sub bands. These reconstructed sub bands are given to Inverse Discrete Wavelet Transform (IDWT), the output of the IDWT is our desire output i.e. reconstructed image.

3. CODING SCHEME
3.1 Image Compression Scheme

Figure 2 Block diagram of Image Compression Scheme Input image of size 256 X 256 is decomposed into seven frequency bands with different resolutions. In two level wavelet decomposition, there exist seven different bands. The second level decomposition produces four bands with resolutions 64 X 64 namely a2, h2, v2, d2. First band in second level decomposition contains approximation coefficients. These are high-scale, low frequency components of the signal. Second, third and fourth bands are detail coefficients which are low-scale, high frequency components of the signal. First level decomposition produce another three detail coefficients namely h1,v1,d1 with resolution 128 X 128. First band is compressed using DPCM. Rest of the six bands are compressed using neural networks. Images compressed using neural networks are scalar quantized and the quantized bits along with DPCM codded data are combined and given to Huffman encoder. Figure 2 shows the block diagram of complete image compression system. The low frequency band-1 is compressed with Optimal DPCM which reduces the inter pixel redundancy. Depending upon previous pixel information we can predict the next pixel, the difference between current pixel and predicted pixel is given to optimal quantizer which reduces the granular noise and slop over lode noise. Finally we get the error output from DPCM the corresponding image is shown in figure 2, these error values are given to splitter. The Human Visual System (HVS) has different sensitivity to different frequency components, for this reason we are going for neural network, neural networks of different sizes must be used to allow for different reconstruction quality, resulting in different compression ratios for the various frequency bands. After the wavelet coefficient are compressed using either DPCM or by using neural networks, they are given to combiner. The output of neural networks is scalar quantized where the values of entire kx1 hidden vectors are scalar quantized at once. The results are given in the Volume 2, Issue 2 March April 2013

4. EXPERIMENTAL RESULTS
The experiment evaluates the effect of discreet Haar wavelet filters on the quality of the reconstructed image. Experiment has been conducted on various images of size 256 X 256 with 28=256 graylevels. The image was decomposed using Haar wavelet transform.

Figure 3 Block diagram of Image Decompression Scheme

Figure 4 Input Image Page 198

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856

Figure 5(a)-(d) BAND 1 to BAND 4, II-level DWT images Figure 8 Neural Network Training Block.

5. CONCLUSION
In this paper we used techniques such as wavelet transforms, DPCM and Neural Network for image compression. We discussed complete image compression and decompression scheme. First input image is decomposed using DWT these decomposed frequency bands are low frequency band and high frequency bands, the low frequency band is compressed with DPCM and high frequency bands are compressed with neural networks subsequently encoded with Huffman encoder. The compressed bit stream is decompressed using DPCM and DWT. Compared to the neural networks applied on the original image wavelet based decomposition improved dramatically the quality of reconstructed images. Wavelet decomposition eliminates blocking effects associated with DCT. This application may be further extended for automatic compression of data and images to large extent where transfer of data over web is most effective and convenient for the users. In this application data is secure and will not lose its efficiency. Moreover it can be used in Bar code creation to identify any product or person and can also be used in various fields like space, medical, defense and many more. We have discussed the importance of Metrics and measured the same through software tool (MATLAB) in this paper.

Figure 6 (a)-(c) BAND5 to BAND 7, I-level DWT images.

References
[1] R.C. Gonzalez and R. C. Woods, Digital image processing, Mass. Addison-Wesley, 1992. [2] Tzu- Heng Henry Lee, Introduction to Medical Image Compression Using Wavelet Transform, 2007. [3] IEEE Trans. Acoust., Speech, Signal Processing, vol. 34, 1986, pp.12781288. Page 199

Figure 7 Decompressed Image

Volume 2, Issue 2 March April 2013

International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)


Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com Volume 2, Issue 2, March April 2013 ISSN 2278-6856
[4] S. G. Mallat, A theory for multi resolution signal decomposition: The wavelet representation, IEEE Trans. Pattern Anal. Machine Intell. vol.11, 1989, pp. 674693. [5] ChigozieObiegbu, Image Compression Using Cascaded Neural Networks University of New Orleans, 2003. [6] T. Acharya and A. K. Ray, Image Processing: Principles and Applications. Hoboken, NJ: John Wiley & Sons, 2005. [7] ISSN: 0975-9646, A. Shaik, Dr. C.R.K Reddy, Syed Azar Ali, Empirical Analysis of Image Compression through Wave Transform and Neural Network, International Journal of Computer Science and Information Technologies, Vol. 2(2), 2011, 924-931. AUTHORS Mr. S. Sridhar M.I.S.T.E. isworking as a Professor in LENDI Institute of Engineering and Technology, JNTUK Vizianagaram, Andhra Pradesh. He has 15 years of teaching and industrial experience both at UG and PG level. Mr. V.VenugopalispersuinghisB.Tech in LENDI Institute of Engineering and Technology, JNTUK, Vizianagaram. Mr. S. RameshispersuinghisB.Tech in LENDI Institute of Engineering and Technology, JNTUK, Vizianagaram. Mr. S. SrinivasispersuinghisB.Tech in LENDI Institute of Engineering and Technology, JNTUK, Vizianagaram. Mr. Sk. MansoobispersuinghisB.Tech in LENDI Institute of Engineering and Technology, JNTUK, Vizianagaram

Volume 2, Issue 2 March April 2013

Page 200

Das könnte Ihnen auch gefallen