VIDEO COMPRESSION USING DWT AND HUFFMAN ENCODING TECHNIQUE

Page 1

International Engineering Journal For Research & Development

E-ISSN NO:-2349-0721

Vol.4 Issue 1

Impact factor : 3.35

VIDEO COMPRESSION USING DWT AND HUFFMAN ENCODING TECHNIQUE 1

1

Prof. Soniya Hokam, 2Tejaswini Channe, 3Ruchika Shukla, 4Poonam Mohane

Professor , 2,3,4B.E. Student, ETC Department, SRMCEW, RTMNU University, Nagpur

________________________________________________________________________________________ ABSTRACT Digital image and video in raw form desire large amount of storage capacity. Image compression is basically mean reducing the size of graphics file, without compromising on its quality. Depending on the reconstructed image, to be exactly same as the original or some unidentified loss may be incurred, two techniques for compression exist. Two techniques are: lossy techniques and lossless techniques. Digital imaging and video play an important role in image processing hence it is necessary to develop a system that produces high degree of compression while preserving critical image/video. In this paper we present hybrid model which is the combination of several compression techniques. This paper presents DWT and DCT implementation because these are the lossy techniques and also introduce Huffman encoding technique which is lossless. On several medical, endoscopic, Lena and Barbra images simulation has been carried out. At last implement lossless technique so our PSNR and MSE will go better than the old algorithms and due to DWT and DCT we will get good level of compression. The results show that the proposed hybrid algorithm performs much better in term of peak-signal-to-noise ratio with a higher compression ratio compared to standalone DCT and DWT algorithms. Keywords — DCT (discrete cosine transform), DWT (discrete wavelet transform), MSE (mean square error), PSNR (peak signal to noise ratio)

INTRODUCTION Compression means to reducing the quantity of data required to represent a file, image or video content without excessively reducing the quality of the original data. It also decreases the number of bits in need to store and/or transmit digital media. To compress something means that you have a piece of data as well as you decrease its size. The objective of image compression is to reduce irrelevance as well as redundancy of the image data in order to be able to store and/or transmit data in an efficient form. Image compression may be lossy or lossless. Lossless compression is used for archival purposes and often for medical imaging, technical drawings, clip art, or comics. Lossy compression methods, especially when used at low bit rates, introduce compression artifacts. Lossy methods are especially apt for natural images such as photographs in applications where minor (sometimes imperceptible) loss of

www.iejrd.in

1


International Engineering Journal For Research & Development

Vol.4 Issue 1

fidelity is acceptable to achieve a substantial reduction in bit rate. Lossy compression which produces negligible differences may be called visually lossless. Video compression is the process of encoding in such a way that consumes less space than the original file and is easier to transmit over the network/internet.“Compressed� just means that the information is packed into a smaller space. Eliminates redundant and non functional data from the original video file. Video compression uses modern coding techniques to reduce redundancy in video data. Most video compression algorithms and codecs combine spatial image compression as well as temporal motion compensation. Video compression is a practical implementation of source coding in information theory. In practice, most video codecs also use audio compression techniques in parallel to compress the separate, but combined data streams as one package. The majority of video compression algorithms use lossy compression. Uncompressed video requires a very high data rate. Although lossless video compression codecs perform at a compression factor of 5-12, a typical MPEG4 lossy compression video has a compression factor between 20 and 200. As in all lossy compression, there is a trade-off between video quality, cost of processing the compression and decompression, and system requirements. Highly compressed video may present visible or distracting artifacts. Transmission and storage of uncompressed video would be extremely costly and impractical therefore it is necessary to produce such a system that will give compressed video without changing its original quality of video. Methods for compression : There are four methods for compression 1. Discrete Cosine Transform (DCT) :A discrete cosine transform (DCT) expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies. A DCT is a fourier-related transform similar to the discrete fourier transform (DFT). 2. Discrete Wavelet Transform (DWT): In numerical analysis and functional analysis, a discrete wavelet transform (DWT) is any wavelet transform. In which the wavelets are discretely sampled. As with other wavelet transforms, a key advantage it has over Fourier transforms is temporal resolution: it captures both frequency and location information (location in time). 3. Vector Quantization (VQ) :Vector quantization (VQ) is a classical quantization technique from signal processing that permits the modeling of probability density functions with the help of distribution of prototype vectors. It was originally used for data compression. It works by dividing a large set of points (vectors) into groups having nearly the same number of points close to them. Each group is represented by its centroid point, as in k-means and some other clustering algorithms. 4. Fractal Compression (FC) :Fractal compression is a lossy compression method for digital images, based on fractals. The method is best suited for textures and natural images, relying on the fact that parts of an image is similar to other parts of the same image Fractal algorithms convert these parts into mathematical data called "fractal codes" which are used to recreate the encoded image. www.iejrd.in

2


International Engineering Journal For Research & Development

Vol.4 Issue 1

DISCRETE WAVELET TRANSFORM The discrete wavelet transform mathematically transforms an image into frequency component. Wavelet transform decomposes the signal into set of basis functions. These basis functions are known as wavelets. Wavelets are mathematical function that cut up data into different frequency and study each component with resolution. The wavelet transform (WT) has achieved widespread acceptance in signal processing and image compression. Because of their inherent multi-resolution nature, wavelet-coding schemes are especially apt for applications where scalability and tolerable degradation are necessary. Wavelets have the great advantage of being able to separate the find details in the signal. very small wavelets can be use to isolate very fine details in a signal, while very large wavelet can identify coarse details. These characteristic of wavelet compression allows getting best compression ratio, while maintaining the quality of the images. The 1-D wavelet transform is given by : Lifting schema of DWT has been recognized as a faster approach :The basic principle is that, to factorize the polyphase matrix of a wavelet filter into a series of alternating upper and lower triangular matrices and a diagonal matrix . This leads to the wavelet implementation by means of banded-matrix multiplications. Following are the merits of DWT:  No need to divide the input coding into non-overlapping 2-D blocks, it has higher compression ratios avoid blocking artifacts.  Allows good localization both in time as well as spatial frequency domain.  Transformation of the whole image which introduces inherent scaling.  Better identification of which data is relevant to human perception higher compression ratio.

Objectives of project are as follows:         

Improved low bit-rate compression performance Improved lossless as well as lossy compression Improved continuous-tone and bi-level compression Be able to compress large images Use single decompression architecture Transmission in noisy environments Also robustness to bit-errors Progressive transmission by pixel accuracy and resolution Protective image security

www.iejrd.in

3


International Engineering Journal For Research & Development

Vol.4 Issue 1

BLOCK DIAGRAM

In fig.1, first of all a video as an input is given which is sequence of images which are displayed in order. Each of these images is called Frame. We cannot notice small changes in the frames like a slight difference of colour so some of details are lost. So to overcome this problem further video are converted to frames and are compressed as shown in above block diagram. Above block diagram contains following blocks: Video to Frames: Converts video into frames and these frames are saved in one of the folder. Which helps to find the redundancy among the frames by using temporal, spatial and spectral correlation techniques.

Motion Estimation: Motion estimation based on the input image and the reconstruction image to generate the motion vectors for each macro block. Macroblock is processing unit in image and video compression formats based on linear block transform. It consist of 16*16 samples. Motion estimation is carried which would give a tentative estimation on how many frames or macro blocks that can be compensated using block matching algorithm. Motion estimation is process of determining motion vectors that describes transformation from 2D images to another images for these motion vector is the key element.

Motion Compensation: Motion compensation is an algorithm technique which describe a picture in terms of reference picture to the current picture. It is executed based on the reconstruction image and it is used to map the macro block from the previous frame to compensated frame. Motion compensation is only possible on pframes where the motion could be predicted but it cannot be applied on I-frame which is a completed independent frame. It is used in encoding video of data for data compression. www.iejrd.in

4


International Engineering Journal For Research & Development

Vol.4 Issue 1

Discrete Wavelet Transform: It is a technique to transform image pixel into wavelets which are further used for compression and encoding. It mathematically transforms an image into frequency component. It is used for signal coding in more redundant form for data compression. The discrete wavelet transform mathematically transforms an image into frequency component. Wavelet transform decomposes the signal into set of basis functions. These basis functions are called wavelets. Wavelets are mathematical function that cut up data into different frequency and study each component with resolution.

Quantization: Quantization involved in image processing is a lossy compression technique, it is achieved by compressing a range of value to a single quantum value. When the number of discrete symbols in a given stream is reduced ,the stream become more compressible. For example, reducing the number of colours required to represent a digital image makes it possible to reduce it's file size.

Huffman Coding: Huffman coding is a lossless data compression algorithm. The idea is to assign variable length codes to input characters, length of the assigned codes are based on the frequencies of corresponding character. The most frequent character gets the smallest codes and the least frequent character gets the largest code. It assigns variable length codes to input characters which depends on frequencies of corresponding of characters.

First Module: “Converting video into Frames”

STEPS:    

Selecting the video Read the video Counting of frames Storing frames into folder

REFERENCES 1. “A New Video Compression Method using DCT/DWT and SPIHT based on Accordion Representation” Jaya Krishna Sunkara, E Navaneethasagari, D Pradeep, E Naga Chaithanya, D Pavani, D V SaiSudheer, Assistant Professor, PDCE, Sullurpet, India (I.J. Image, Graphics and Signal Processing, 2012, 4, 28-34 ) www.iejrd.in

5


International Engineering Journal For Research & Development

Vol.4 Issue 1

2. “Video Compression Using Hybrid DWT-DCT Algorithm” L. Escalin Tresa1, Dr. M. Sundararajan2 1Research Scholar, Sathyabama University, Chennai 2Principal, Alpha College of Engineering & Technology, Puducherry (International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 10, October 2012) 3. “A Combined DWT-DCT approach to perform Video compression base of Frame Redundancy” Jasmeetkaur and Ms.Rohini Sharma, International Journal of Advanced Research in Computer Science and Software Engineering (Volume 2, Issue 9, September 2012 ) 4. “Hybrid Image Compression Using DWT, DCT &Huffman Encoding Techniques” Harjeetpalsingh&Sakhi Sharma M.Tech Student, Lecturer, ECE Department, C.G.C Landra, Punjab Technical University, Punjab.(ISSN 22502459, Volume 2, Issue 10, October 2012) . 5. J.M.Shapiro, “Embedded image coding using zerotrees of wavelet Coefficients,” in Special Issue on Wavelet And Signal Processing,vol. 41, no. 12. IEEE Trans. Signal Processing, Dec 1993. 6. Said and W. A. Pearlman, “An image multiresolution representation for lossless and lossy compression,” in IEEE TransactionsOn Image Processing, vol. 5, no. 9, September 1996 7. X. Li, Y. Shen, and J. Ma, “An efficient medical image compression,,”in Engineering In Medicine And Biology 27th Annual Conference, Shangai, China, September 1-4 2005 IEEE 8. Ali Al-Fayadh, AbirJaafarHussain, Paulo Lisboa, and Dhiya Al- Jumeily “An Adaptive Hybrid Classified Vector Quantisation and Its Application to Image Compression” 2008 IEEE 9. Zhang Shi-qiang,ZhangShu-fang, Wang Xin-nian, Wang Yan “ The Image Compression Method Based on Adaptive Segment and Adaptive Quantified” 2008 IEEE 10. SuchitraShrestha and Khan Wahid,”Hybrid DWT-DCT algorithem for biomedical image and video compression application.” 2010 10th International conference.

www.iejrd.in

6


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.