Sunteți pe pagina 1din 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/303313377

A fast and Improved Image Compression Technique using Huffman Coding

Conference Paper · March 2016

CITATIONS READS
8 1,014

1 author:

Rachit Patel
ABES Institute of Technology
13 PUBLICATIONS   20 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Performance Analysis of 2-D Optical Codes with Cross Correlation Value of One and Two in Optical CDMA System View project

All content following this page was uploaded by Rachit Patel on 14 December 2017.

The user has requested enhancement of the downloaded file.


This fUll-text paper was peer-reviewed and accepted to be presented at the IEEE WiSPNET 2016 conference.

A Fast and Improved Image Compression Technique


Using Huffman Coding

Rachit Patel Virendra Kumar Vaibhav Tyagi Vishal Asthana


Department of ECE ABES-IT Department of ECE ABES-IT Department of ECE ABES-IT Department of ECE ABES-IT
Ghaziabad, India Ghaziabad, India Ghaziabad, India Ghaziabad, India
rachit05081gece@gmail.com r. virendra. p@gmail.com vaibhavtyagi023@gmail.com asthanavishaI702@gmail.com

Abstract: Image Compression using Huffman coding technique is and B PP, section IV consist of mathematical analysis, section
simpler & easiest compression technique. Compression of image V consist of result analysis of various images of different pixel
is an important task as its implementation is easy and obtains less size 256x256, 512x512, 1024x024, section VI is consist of
memory. The purpose of this paper is to analyse Huffman coding
conclusion part and section VII is a references part.
technique which is basically used to remove the redundant bits in
data by analysing different characteristics or specification like

B
Peak Signal to Noise Ratio (PSNR), Mean Square Error (MSE) Original Quantizer Symbol
Bits Per Pixel (BPP) and Compression Ratio (CR) for the various H
Image encoder
input image of different size and the new method of splitting an
input image into equal rows & columns and at final stage sum of encoder
all individual compressed images which not only provide better
result but also the information content will be kept secure. An
image compression technique has various advantages in the field
'v
of image analysis and also for the security purpose for the image.
C ompressed Inverse Symbol
Keywords:
MSE, CR, BPP.
Image Compression, Huffman Coding, PSNR,
image I� mapper � decoder

I. INTRODUC TION
A good Image will be analysed in terms of better picture
quality parameters along with memory space requirement Fig. I Systematic Block Diagram ofImageCompression.
which is very important for an image analysis. Image
compression is one very important application of Digital II. ALGORITHM OF HUFFMAN C ODING
Image Processing [I]. The aim of image compression is to
remove unwanted information from image so that it can be Image compression technique basically divided into two
able to transmit or store data in an efficient form. C ompression parts i.e. lossy technique and lossless technique [4]. For lossy
basically means removing unwanted information from image technique, as its name suggest that a little or small part of
which only lead to the enhancement of memory space information is vanished out or converted into noise factor
requirement without affecting quality of image [2]. The only during the process of image compression. In case of lossless
way to say that, particular image compression technique is technique will get compressed image without loss of
better by calculating the time taken to complete the processing information. That's why lossless technique is better as
i.e. compression speed which will depend upon the speed of compare with loss technique [1]. So, in order to have better
the processor [3]. Image compression using Huffman coding characteristics of image compression, author using Huffman
algorithm is comparatively simpler and easy to implement [2], coding in this paper, which come under lossless technique
[4]. Memory space requirement or storage space is related to with more prominent features in various application [6] such
the compression ratio (CR) i.e. if there is better compression as medical survey and analysis, technical drawing etc. As we
ratio then storage space is less. Quantization is the process know that Huffman coding algorithm is a step by step process
reduction in noise which makes the digital images have and involves the variable length codes to input characters & it
superior noise performance [5]. The whole paper is divided is helpful in finding the entropy and probability of the state.
into five sections which is organized as follows: Section I Huffman algorithm is comparatively easier because of its
consist of a short introduction to image compression, section simpler mathematical calculation in order to find the various
II enlighten Huffman C oding Algorithm, section III consist of parameter. Original image can be reconstructed with the help
different image quality parameters such as MSE, PSNR, CR of digital image restoration [7].

978-1-4673-9338-6/16/$31.00 ©2016 IEEE 2283


This fUll-text paper was peer-reviewed and accepted to be presented at the IEEE WiSPNET 2016 conference.

C. Peak Signal to Noise Ratio (PSNR)


INPUT IMAGE
PSNR is the major important factor in image processing. It
should be high as possible as. PSNR is given by ratio between
SPLIT INTO EQUAL ROWS AND peak or maximum signal power to noise encountered in signal.
C OLUMNS PSNR uses to measure quality of reconstructed digital image.
B etter PSNR gives better results at output. PSNR means how
much noise contains an output signal. It is mathematically
APPLY INDIVIDUAL HUFFMAN
expressed in logarithmic form and defined by-
C ODING

INDIVIDUAL C OMPRESSED PSNR


=
10log10
[ M x N
£2
] dB
IMAGE MS

Where, MxN is resolution of an uncompressed image.


SUM OF C OMPRESSED
INDIVIDUAL IMAGES
D. Bits per Pixel (BPP)

OVERALL C OMPRESSED IMAGE It is information (bits) stored per pixel of an image. This is
ratio of number of bits in the compressed image to total number
Fig. 2 Aowchart of the technique used
of pixel in original image.

number of bits in compressed image


B PP =
----:--....:.-
...,. --,----:'---,------''-­
III. IMAGE QUALITY PARAMETERS total number of pixel in the image
There are four major important parameters measure
between uncompressed image and compressed image [8], When B PP is large it means large memory required to store an
these are following- image, image contain more colours so B PP should be less.

A. Compression Ratio (CR)

The ratio of size of uncompressed image to the size of IV. MATHMATIC AL ANALYSIS
compressed image is called compression ratio. Higher A MxM digital image can be represented by following
compression ratio gives better image quality and the storage matrix form, where f(x, y) is the digital image, each of this
space for image is less. Where Nl and N2 are number of bits matrix arrays is called an image elements.
in uncompressed image and number of bits in compressed
image respectively. aO .O aO.1 aO,M-1

a1,0 a1,1
original image size N1
CR f(x,y)
= =

compressed image size N2

B. Mean Square Error (MSE)


aM-1,0 aM-I,1 aM-I,M-1
Mean Square Error is used to analyse quality of image.
MSE should be less as possible as. If MSE is zero, it means
compressed image is exactly similar to uncompressed image This digital image f(x, y) is break into a set of non­
that is called lossless image compression technique. It is given overlapping four sub images [2], [9] i.e. two row and two
as- column this can be represented as -

M-1 N-1
MSE
=
: IIN
[f'(i,j) - f(i,j)F
i=O j=O

Where f'(i,j)the function of is decoded image and f(i,j) is


function of original image.

2284
This fUll-text paper was peer-reviewed and accepted to be presented at the IEEE WiSPNET 2016 conference.

these tl ex,y), t2ex,y), t3ex,y), t4ex,y) are the sub-matrix of C. PARAMETERS ARE CALCULATED
original image after applying Huffman coding on these sub-
matrix they gives t{ex,y) , t;ex,y), t;ex,y), t;ex,y) Table1: Parameters for Flower Image
respectively the compressed image can be obtain by adding
Resolution 256x256 512x512 1024x1024
these t{ex,y) , t;ex,y), t;ex,y), t;ex,y) matrixes
CR 2.630 2.381 2.211

PSNR 21.2186 29.0651 37.6953


V. RESULTS ANALYSIS MSE 23.2980 18.5930 13.5934

BPP 2.408 1.917 1.625


In this paper author calculate different-different image
quality parameters i.e. CR, PSNR, MSE and B PP. These Table 2: Parameters for Girl Image
parameters are calculated for 2S6x2S6, S12xS12, 1024x1024 Resolution 256x256 512x512 I 024x1024
of three images and results are shows in tables to the
CR 5.665 3.355 2.814
corresponding image.
PSNR 29.4327 34.4093 41.4370

A. ORIGINAL IMAGES MSE 8.6518 9.7498 8.6805

BPP 1.09 0.95 0.93

Table 3: Parameters for Dog Image

Resolution 256x256 512x512 1024x1024

CR 2.847 2.560 2.549

PSNR 26.3788 35.7070 45.9418


Fig. 3OriginalImage MSE 12.4138 8.5058 5.2115

BPP 1.648 1.20 0.94


B. COMPRESSED IMAGES

The compressed image can be obtain by adding these


t{ex,y) , t;ex,y), t;ex,y), t;ex,y) matrixes, it can be given PSNR
as f'ex,y) t{ex,y) + t;ex,y) + t;ex,y) + t;ex,y)
=

50

45

40

35
'"
� 30
...
;:: 25
Fig. 4OutputImage of 256x256

I
20
'"
Q., 15

10

0
Flower Girl Dog

Fig. 5OriginalImage of 512x512


INPUT IMAGES

• 256x256 .512x512 • I 024x1024

Fig. 7 Comparison of PSNR values for different images.

From fig.-7 it is clear that a brighter image gives higher PSNR


Fig. 6OriginalImage of I 024x I 024 than a dark image

2285
This fUll-text paper was peer-reviewed and accepted to be presented at the IEEE WiSPNET 2016 conference.

VI. C ONC LUSION


In this paper author simulate a fast and improved
Huffman image compression technique using Huffman
coding on MATLAB . In this analysis author obtained that
the Huffman image compression coding technique cannot
work for multi order. From PSNR graph it is shown that a
light image (dog) gives high PSNR than the dark image
(flower). The author also evaluate that PSNR is increases as
resolution of the image increases.

VII. REFERENC E
[1] A. K. Jain,Image data compression: A review", in Proc. IEEE, vo169,
pp. 349-389, 1981.
d
[2] R. C. Gonzalea and R. E. Woods, "DigitalImage Processing", 2n Ed,

Prentice Hall, 2004.

[3] Jagdish H. Pujar and Lohit M. K. Kadlaskar "A New Lossless Method

of Image compression and decompression using Huffman coding


technique" Journal of Theoretical and Applied Information
Technology, 2010.

[4] C. C.Chen, "On the Selection ofImage CompressionAlgorithms",In


Proc. International Conference on Pattern Recognition, Brisbane,
Australia,Aug.1998.

[5] Dino Ho, Dagan Feng, Senior, and Kewei Chen Dynamic "Image
Data Compression in Spatial and Temporal Domains: Theory And
Algorithm".

[6] R. G. Galleger, "Variations on a theme by Huffman,"IEEE

Trans.Inform. Theory, vol. IT-24, pp. 668-674, Nov. 1978.

[7] " The past, present, and future ofImage and multidimensional signal

processing", mdsp_reviewI998.

[8] R. Praisline Jasmi, B. Perumal and M. Pallikonda Rajasekaran,


"Comparison of image compression techniques using Huffman
coding, DWT and Fractal algorithm", International conference on
Computer Communication andInformatics, 2015, pp. 1-5.

[9] Robert m. Haralic, and K. Shanmugam, "Comparative Study of a

Discrete Linear Basis for Image Data Compression".

2286

View publication stats

S-ar putea să vă placă și