Efficient and Robust Video Compression Using Huffman Coding

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Webpage: www.ijaret.

org Volume 2, Issue VIII Aug 2014


ISSN 2320-6802

INTERNATIONAL JOURNAL FOR ADVANCE RESEARCH IN


ENGINEERING AND TECHNOLOGY
WINGS TO YOUR THOUGHTS…..

EFFICIENT AND ROBUST VIDEO COMPRESSION


USING HUFFMAN CODING
M. Atheeshwari1, K. Mahesh2
1
M. Phil Research Scholar, Department of Comp. Sci & Engg
Alagappa University, Karaikudi
[email protected]
2
Associate Professor, Department of Comp. Sci & Engg
Alagappa University, Karaikudi
[email protected]

Abstract - The compression techniques for the images as well as the videos, increasing gradually in the past decade. Video
compression techniques such as DCT coding, Quantization, Entropy coding, Motion estimation are widely used. The focus of
this paper is to analyze video compression techniques required for video processing especially to discover how much
amount of data to compressed, which techniques is faster and visual quality better and so on. We evaluate the video compression
techniques for finding compression ratio. Handling video over the internet becomes very complex in the digital world. To reduce
the complexity we need a strong algorithm to compress the video to reduce the size and do not affect visual quality. In this paper,
we proposed Huffman coding to compress the video. Huffman's algorithm is very efficient to optimize the data, generating a
minimum redundancy codes and provide the best compression compared with other methods.
Keywords - DCT coding, Quantization, Entropy coding, Motion estimation, Huffman Coding.

1. INTRODUCTION concepts [2], PCA based method [3], CABAC Method [4],
Basic techniques of video compression algorithms are Accordion Function [5], EZW and FSBM [6],SPIHT
efficient to reduce the redundancy of the video data. And Algorithms [7], Active Mesh Based [8],Wavelet Based Rate
producing a reconstructed video from the original video Scalable Method [9],Morphological operators [10].
with the introduction of error that is insignificant to the The paper is structured as follows. Section 2 briefly
intended applications. A digital video sequence can be discusses the background study for the proposed technique.
represented as a series of JPEG pictures. The advantages Section 3 comprises of description about the proposed
are the same as with a single still JPEG pictures – technique and the procedure for the proposed methodology.
flexibility both in terms of quality and compression ratio. The experimental results and their evaluations also present in
There are two types of video Compression Algorithms: section 4. Section 5 gives the conclusion.
Lossless Compression Algorithms and Lossy compression
algorithms. Lossless Compression, compresses the data with 2. RELATED WORK
less amount of affect visual quality. Lossy compression Yih-Chuan Lin and Shen-Chuan Tai et al have proposed a
compresses the data with more amount of affect visual technique “Fast Full-Search Block-Matching Algorithm for
quality. Here we propose a lossless compression technique Motion-Compensated Video Compression” in 1997. The
like Huffman coding. The main objective of this paper is to proposed technique has been built upon fast block-matching
compress videos by reducing the number of bits per pixel algorithms that use three fast matching error measures,
required to represent the videos using Huffman codes. We besides the conventional mean-absolute error (MAE) or
are implementing video compression in Huffman coding mean-square error (MSE). An incoming reference block in
because various authors suggest the implementation the current frame is compared to candidate blocks within the
complexity of Huffman coding less than with other search window using multiple matching criteria [18]
algorithms. Huffman compression is based on growing a Eugeniy Belyaev et al. Propose a new spatial scalable and
binary tree that contains A-Z characters in the source at its low complexity video compression algorithm based on
child nodes, and with their corresponding characters' multiplication free three dimensional discrete pseudo cosine
probabilities at the side. transform. This paper/papered show an efficient result
The video signal is an integral part of multimedia which has compared with H.264/SVC as well as it can be used for
a tremendous importance in most of the applications robust video transmission of wireless channels. [12].
involving the concept of the multimedia i.e. video Zhengxin Hou, Baochen Jiang, Yupeng Cao, Aiping Yang
conferencing; video-on-demand, broadcast digital video, and and Chengyou Wang et al. Proposed I frame encoding adopts
high-definition television (HDTV), etc [7]. Basically video wavelet transform and set partitioning in hierarchical
compression in the domain of redundancy exists in a video trees (SPIHT) algorithm; of P frames, each frame sets
sequence in two forms: spatial and temporal. Some popular the reconstructed frame of its previous frame as a reference
video coding techniques in spatial domain like vector frame, and then P frames proceed to code with ME and MC
quantization, Block Transform, Discrete Cosine Transform [14].
and temporal domain like Frame Differencing, Motion Lai-Man Po and Wing-Chung Ma et al.[17] have proposed
Compensation, Block Matching. The video compression “A Novel Four-Step Search Algorithm for Fast Block
techniques include Frame Difference Approaches [1], Fuzzy Motion Estimation” in 1995. The proposed algorithm has

Page 5
Webpage: www.ijaret.org Volume 2, Issue VIII Aug 2014
ISSN 2320-6802

INTERNATIONAL JOURNAL FOR ADVANCE RESEARCH IN


ENGINEERING AND TECHNOLOGY
WINGS TO YOUR THOUGHTS…..
given based on the center-biased global minimum motion  Construct the heap tree with the help of
vector distribution characteristic of real world image descending order record.
sequences, a new Four-Step Search algorithm for fast block-
based motion estimations. Heap tree constructed based on the below rules.
Cong Dao Han et al. implemented a novel search algorithm  Left node must be lowest of sort’s record.
which utilizes an adaptive hexagon and small diamond  Second lowest is in right node.
search to enhance search speed. Simulation results shown  Build the Huffman code with the help of
that the proposed approach can speed up the search process constructing the tree.
with little effect on distortion performance compared with  Repeat the Step 5 to 7 until we get single node.
other adaptive approaches [13].  Repeat all the step for each image
F. Mueller et al. Proposed the work of introducing the
generalized Gaussian distribution to model the DCT-
coefficients more accurate than with Laplace distributions
4. RESULTS AND DISCUSSION
[16]. The proposed compression and encryption mechanism is
R. Reininger, J. Gibson et al. The distribution of DCT- implemented with visual studio 2010 and language user c#
coefficients in the field of image compression is examined .net framework 4.0 using windows 8- 64 bit operating system
and an approximation of the AC-coefficients with Laplace with core i5 processor and 4gb ram. The experiments are
distributions is proposed [15]. carried out on some standard videos.
The performance evaluation factors compression values are
obtained from different video is summarized in Table 2.
3. PROPOSED METHODOLOGY
3.1 Summary of Techniques for Video Compression Table 2: Compression Result for different videos
The following table summary the video compression
Video Original Compressed
techniques, its areas of application and the, methodology of
name Size(kb) Size (kb)
the techniques.
Barcodes 9891.84 888
3.2 Huffman Coding Vipbarcode 59801.6 7065.6
Huff man proposed to build compressed data by similar data
is converted into same code. One of the main strengths of Original and compressed of the two output results on
Huff man coding is it did not fix the code like ASCII. barcodes and vipbarcode are shown in Figure 1 and 2
Huffman code is varying based on the input. In the computer respectively.
science industry Huff man coding is one the big revolution
for compression of data without any loss. Huff Man code
generates Encoding table based on the input given the
compression. So its Encoding table may be varied based on
the input. And also encoding table is constructed based on
the frequency of the data occurrence the ultimate aim of the
Huffman coding is to use fewer numbers of bits frequently
occurred data. Huffman code working procedure for text is.
Read the input text. Get the ASCII value of each character.
Suppose our input text is “Demo”. Convert each character
into the ASCII value so we get 68,101, 109,111. Three bits
coding char code binary for “Demo” is

Table 1: Character into ASCII Conversion Figure 1: Original Video


D 0 00
E 1 01
M 2 10
O 3 11

Now the input text is encoded as 0123.

3.3 Video Compression using Huffman Coding


 Read the video file.
 Extract the images (Frame) from Video file.
 Convert each image into a gray scale image
Figure 2: Compressed Video
 Take Image Ij Order the all gray scale value in
descending based on the repeated character
count. Repeat this work for every image through
N-1 image.

Page 6
Webpage: www.ijaret.org Volume 2, Issue VIII Aug 2014
ISSN 2320-6802

INTERNATIONAL JOURNAL FOR ADVANCE RESEARCH IN


ENGINEERING AND TECHNOLOGY
WINGS TO YOUR THOUGHTS…..

Table 3: Summarization of video compression Techniques

Summarization of Video Compression Techniques


References Techniques Methodology

[1] Calculation of frame near distance (difference between frames) to


Frame Difference
compress videos.
Approaches
[2] H.264 is more effective than MPEG-4 of medical videos using new
Fuzzy concepts fuzzy based scheme.
Video is a composition of sequential and correlated frames, so we
[3] can apply the PCA to these high correlated frames. Compared with
PCA based method DCT doesn’t reduce the bandwidth of frequency response, so the
Edges of frames don’t fade.

Combining an adaptive binary arithmetic coding technique with


[4] context modeling, a high degree of adaptation and redundancy
CABAC Method reduction is achieved on the new ITU-T/ISO/IEC standard
H.264/AVC for video compression is presented.

In this proposed method input video to reduce the spectral And


[5] temporal redundancies using accordion function. it converts the
Accordion Function temporal redundancy into the spatial redundancy, which was
removed using Discrete Cosine Transform (DCT)

Video compression is done using EZW as intra compression and


[6] seven different algorithms of the block matching algorithms used
EZW and FSBM for motion estimation in video compression. The results are much
better if instead of EZW, SPIHT algorithm is used.

Traditional approach as well as proposed one i.e. SPIHT (Set


[7] Partitioning in Hierarchical Trees) algorithm for video
SPIHT Algorithms Compression of the signal. SPIHT algorithm also provides better
video compression without effecting image quality.

New mesh based algorithm proposed for motion estimation and


compensation in the wavelet domain. It is based on the mesh
[8] Active Mesh Based energy minimization with novel sets of energy functions. In this
Motion Compensation algorithm proposed two main approaches 1, motion estimation of
Algorithm consecutive frames 2, motion estimation and compensation in the
wavelet sub-bands compensation in the wavelet sub-bands.

Figure 3: Original Video Figure 4: Compressed Video

Page 7
Webpage: www.ijaret.org Volume 2, Issue VIII Aug 2014
ISSN 2320-6802

INTERNATIONAL JOURNAL FOR ADVANCE RESEARCH IN


ENGINEERING AND TECHNOLOGY
WINGS TO YOUR THOUGHTS…..
5. CONCLUSION [11] Eugeniy Belyaev et al., "Scalable Video Coding
Based on Three Dimensional Discrete Pseudo Cosine
Our Proposed method works very efficiently and compresses
Transform", ruSMART/NEW2AN 2010, LNCS
the video without loss of data using Huffman encoding
6294, pp 448-459, 2010.
technique. Compare to other compression technology
[12] Cong Dao Han et al., "An Adaptive Fast Search
Huffman coding is more efficient and also it uses minimum
Algorithm for Block Motion Estimation in H.264",
resource to compress the video at low cost. In video
Journal of Zhejiang University Science C (Computer
compression technique Huff Man Based on the results
& Electron), Vol. 11, No. 8, pp 637-644, 2010.
obtained, the proposed method Huffman encoding will give
[13] Zhengxin Hou, Baochen Jiang, Yupeng Cao, Aiping
better performance.
Yang and Chengyou Wang, “Video Compression
Based on Wavelet Transform and DBMA with
References
Motion Compensation", Journal of Communications
[1] Muzhir Shaban Al-Ani and Talal Ali Hammouri,
Vol. 8, No. 7, July 2013.
Video Compression Algorithm Based on Frame
[14] R. Reininger, J. Gibson, Distributions of the Two
Difference Approaches International Journal on Soft
Dimensional DCT Coefficients for Images, IEEE
Computing (IJSC) Vol.2, No.4, November 2011.
Transactions on Commun. Vol. COM-31, pp.
[2] J. Mohanalin Rajarathnam, A novel Fuzzy based
835–839, June, 1983
Medical video compression using H.264, Georgian
[15] F. Mueller, Distribution Shape of Two-Dimensional
Electronic Scientific Journal: Computer Science and
DCT Coefficients of Natural Images, Electronic
Telecommunications 2008, No.3(17).
Letters Vol. 29, No. 22, pp. 1935–1936, October 28,
[3] Mostafa Mofarreh-Bonab, Mohamad Mofarreh-
1993.
Bonab, Adaptive Video Compression using PCA
[16] Lai-Man Po and Wing-Chung Ma, A Novel Four-
Method International Journal of Computer
Step Search Algorithm for Fast Block Motion
Applications (0975 – 8887)Volume 44– No.21, April
Estimation IEEE Trans. CIRCUITS AND
2012.
SYSTEMS FOR VIDEO TECHNOLOGY, VOL. 6,
[4] Detlev Marpe, Heiko Schwarz and Tomas Wiegand,
NO. 3, JUNE 1996.
“Context-Based Adaptive Binary Arithmetic Coding
[17] Yih-Chuan Lin and Shen-Chuan Tai, Fast Full-
in the H.264/AVC Video Compression Standard”, in
Search Block-Matching Algorithm for Motion-
IEEE Transactions on Circuits and Systems for
Compensated Video Compression IEEE Trans.
Video Technology. Vol 13, No.7 July 2003.
COMMUNICATIONS, VOL. 45, NO. 5, MAY 1997.
[5] Mitesh Shah, Hetal Patel, "Design of a New Video
Compression Algorithm Using Accordion Function
", International Journal of Science and Modern
Engineering (IJISME) ISSN: 2319-6386, Volume-1,
Issue-6, May 2013.
[6] Sangeeta Mishra, Sudhir Savarkar, “Video
Compression Using EZW and FSBM”, International
Journal of Scientific and Research Publications,
Volume 2, Issue 10, October 2012, ISSN 2250-3153.
[7] Charu Pandey, Satish Kumar, Rajinder Tiwari, "An
Innovative Approach towards the Video
Compression Methodology of the H.264 Codec:
Using SPIHT Algorithms “, International Journal of
Soft Computing and Engineering (IJSCE) ISSN:
2231-2307, Volume-2, Issue-5, November 2012.
[8] Mohammad Hossein Bisjerdi, Alireza Behrad,
"Video Compression USING a New Active Mesh
Based Motion Compensation Algorithm in Wavelet
Sub-Bands”, Journal of Signal and Information
Processing, 2012, 3, 368-376.
[9] Ke Shen,Edward J. Delp , " Wavelet Based Rate
Scalable Video Compression", IEEE
TRANSACTIONS ON CIRCUITS AND SYSTEMS
FOR VIDEO TECHNOLOGY, VOL. 9, NO. 1,
FEBRUARY 1999.
[10] Philippe Salembier, Patrick Brigger, Josep R. Casas
and Montse Pardas, "Morphological Operators for
Image and Video Compression", IEEE
TRANSACTIONS ON IMAGE PROCESSING
VOL. 5 NO. 6, JUNE 1996.

Page 8