0% found this document useful (0 votes)
17 views6 pages

A Comparative Study of Image Compression Techniques: Kamalesh Acharya, Shruti Bijawat

This paper presents a comparative study of three image compression algorithms: Block Truncation Coding (BTC), Discrete Cosine Transform (DCT), and Singular Value Decomposition (SVD). The study evaluates these algorithms using MATLAB, focusing on metrics such as Mean Square Error (MSE), Peak Signal to Noise Ratio (PSNR), and Compression Ratio (CR). Results indicate that BTC offers the highest compression ratio, while SVD achieves the lowest MSE, making BTC preferable for transmission and SVD for lossless storage.

Uploaded by

Mariam Mirza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

A Comparative Study of Image Compression Techniques: Kamalesh Acharya, Shruti Bijawat

This paper presents a comparative study of three image compression algorithms: Block Truncation Coding (BTC), Discrete Cosine Transform (DCT), and Singular Value Decomposition (SVD). The study evaluates these algorithms using MATLAB, focusing on metrics such as Mean Square Error (MSE), Peak Signal to Noise Ratio (PSNR), and Compression Ratio (CR). Results indicate that BTC offers the highest compression ratio, while SVD achieves the lowest MSE, making BTC preferable for transmission and SVD for lossless storage.

Uploaded by

Mariam Mirza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

© 2018 IJSRST | Volume 4 | Issue6 |Print ISSN: 2395-6011 | Online ISSN: 2395-602X

National Conference on Smart Computation and Technology in Conjunction with The Smart City Convergence 2018

A Comparative Study of Image Compression Techniques


Kamalesh Acharya*, Shruti Bijawat
Department of Computer Engineering, Poornima Institute of Engineering & Technology Jaipur, Rajasthan, India

ABSTRACT

The increase in the amount of images captured per day and uploaded over cloud nowadays requires much more
bandwidth then previous few years. The high end enhanced image quality requires more number of bits per pixel
which increase the overall size of a single image. We generally need to compress the image before storing and
transmitting over the channel. In this paper we shall discuss three algorithms for image compression such as: -
Block Truncation Coding (BTC), Discrete Cosine Transform (DCT) and Singular Value Decomposition (SVD). We
shall compare the results by using MATLAB as tool by calculating Mean Square Error (MSE), Peak Signal to Noise
Ratio (PSNR) and Compression Ratio (CR).
Keywords: Image compression, BTC, DCT, SVD, MSE, PSNR and CR.

I. INTRODUCTION The loss in term of information required to represent


an image comes under lossy image compression
In this super fast world people do not wish to wait for where the compressed image losses some of the
a second. Similarly in case of image transmission and information as the bits are reduced per pixel in
uploading of image over internet where people are compression.
more obsessed about taking pictures from a DSLR In lossless image compression the original image is
whose average size of image ranges from 4-12 regenerated by the compressed representation of
Megabytes (MB). A picture of such size needs a image where there is no loss in the information is
higher bandwidth of channel to transmit from one seen. Both the techniques applied depending on the
place to another instead it will have higher requirement of the scenario.
transmission time. Although it can be possible to In case of social sites and messaging application lossy
transfer such size of file in just blink of eye by image compression can be applied where as in case of
applying different compression algorithms to the official documents and banking details we require
image. lossless image compression.

There is two type of image compression technique II. LITERATURE SURVEY


such as lossy image compression and lossless image
compression.
A compression algorithm is one which reduces the
size of image in context to bit representation.
Compression is none other than encoding of an image

IJSRST174623 | Published :25March2018 | March-April-2018 [(4)6: 105-110] 105


in some other representation and to get it back III. ALGORITHMS
decoding the compressed image. In the field of digital
image processing, a large variety of image
compression algorithms have been introduced. Some In this paper we shall be working on three algorithms
of them are efficient and being used in different field to find out which one is giving better result based on
depending on their requirements. Below is the the parameters as compression ratio, MSE and PSNR.
literature survey on different proposed algorithms for The objective is to reduce the redundant bits by
image compression by authors. eliminating them from repeating in the image. The
algorithms we are working on is lossy compression
In [1], the author uses the adaptive interpolation for algorithms.
image compression and decompression which is
A. Block Truncation Coding
computationally inexpensive and reduces the size of
image effectively. The author also provided different It is a lossy image compression type of technique for
compression ratios that can be applied based on greyscale and also used for colour image compression.
original image. The original image is being divided into blocks and
after that quantises to reduce the gray levels by
In [2], the author performed a new compression keeping the mean and standard deviation similar.
technique by combining two algorithms in two step For a two level quantization the formula is given by:
sequence where in first step he used Lempel-Ziv-
Welch (LZW) algorithm and in second step the
output of first step is input to the second algorithm
that is Bose, Chaudhuri and Hoc-quenghem (BCH).
(1)
The compression ratio was higher than other
algorithms. Here x is the original image where as y is the
In [3], the author introduced two new algorithms compressed image block which is calculated based on
based on Run length encoding (RLE). He proposed the mean value.
RLE-1 and RLE-2 which gave better result by saving The compressed image is then transmitted along with
bytes and increasing the compression ratio. Almost the mean and standard deviation to retrieve back the
17.88% and 17.75% better CR respectively. original values. The value of a and b is calculated as
In [4], the author compared five algorithms and their such by formula:
advantages and disadvantages among other
algorithms. It was a survey paper on image
compression. The compression techniques are
wavelet compression, JPEG/DCT, vector quantization,
fractal and genetic algorithm.

(2)

International Journal of Scientific Research in Scienceand Technology (www.ijsrst.com) 106


Where sigma is standard deviation, m is total 3) Third, quantization is performed on each 8x8
frequency of pixel and q is the frequency of pixels block of image which in result compresses the
greater than mean. size of each block.

4) Fourth, reduced image formed by these blocks


are then stored in memory.

5) Fifth, decompression can be done on the


(3)
compressed image to retrieve back the original
To reconstruct the image 0’s are replaced with a and image by applying inverse discrete cosine
1’s are replaced with b. transform (IDCT).

B. Discrete Cosine Transform C. Singular Value Decomposition


In DCT the image is processed in blocks of size 8x8 of Image processing and signal processing is being the
different frequencies. DCT is generally used for the main field of singular value decomposition as in
process of JPEG images. It is again a lossy image image processing it works as to reduce noise and
compression technique where compressed block is image compression and in signal processing to least
stored in reduced space. These blocks of image are square fitting. The working of SVD is to decompose
processed from left to right and top to bottom. the maximum signal energy into few coefficients as
per need.
Steps:-
The singular value decomposition takes a matrix A of
1) First, the image is split into blocks of 8x8 to dimension m*n and decomposes by
process quantization.
A = U∑VT
2) Second, DCT is calculated for each block
(6)
applying from left to right and top to bottom
along the image. Where ∑ hold the singular values of A along
diagonally, U and V are matrices having dimension
m*m and n*n respectively and are orthogonal
matrices.
(4)
It calculates eigenvalues and eigenvector by ATA for
computing SVD where eigenvector is used to
structure the matrix U and singular values are
calculated by taking square root of the eigenvalues.
(5)
The generated matrix is now a reduced matrix which
Where p(x,y) is the pixel value of the image
is decomposed based on the singular values that used
represented by matrix p along x and y
to distribute the all values present in matrix A.
coordinate and N is the size of the block of
DCT.

International Journal of Scientific Research in Scienceand Technology (www.ijsrst.com) 107


IV. METHODOLOGY

The algorithms of BTC, DCT and SVD are being used


in MATLAB tool to compare the results of the
compression techniques. Matlab is a matrix
laboratory tool which is uniquely built for
performing operations on matrixes.

The inbuilt libraries are very easy to use and provide


a diverse range of functionality to be used by the
user. An image is a 2-D matrix which holds the pixel
value for each RGB for a color image where as a
single value for a gray image.

A graphical user interface (GUI) is being build to


Figure 1. Compressed result using BTC
visually show how the algorithms showing results by
providing a 2-D image. The GUI have 3 section for
We can see that the image is compressed from the
each algorithm where each section hold the before
size 592.93 KB is reduced by the block truncation
and after size of original image and compressed image
coding to 345.08 KB.
along with the MSE, PSNR and CR.
B. Discrete Cosine Transform
The traditional image of Lena is used for comparison
The DCT algorithm showed a compression ratio of
between all the three algorithms. Also we have
1.56 on the image of Lena along with the mean
performed comparison of 10-15 images to find out
square error of 4.26 and peak signal to noise ratio of
which algorithm efficiently gives better result.
41.86888 dB. The template is shown below.
A. Block Truncation Coding
The BTC algorithm showed a compression ratio of
1.72 on the image of Lena along with the mean
square error of 3.05 and peak signal to noise ratio of
43.32602 dB. The template is shown below.

Figure 2. Compressed result using DCT

International Journal of Scientific Research in Scienceand Technology (www.ijsrst.com) 108


We can see that the image is compressed from the minimum so that the compressed image holds the
size 592.93 KB is reduced by the DCT to 379.57 KB. maximum original data.
Below is the table having data of nine images which
C. Singular Value Decomposition
are mostly used as sample images for image
The SVD algorithm showed a compression ratio of
compression and analysis of image compression
1.33 on the image of Lena along with the mean
algorithms. The table has MSE, PSNR and CR for
square error of 0.39 and peak signal to noise ratio of
each algorithm BTC, DCT and SVD for each
52.26027 dB. The template is shown below.
particular image.
The compression ratio (CR) of block truncation
coding (BTC) is higher in all the nine images among
other algorithms except the image Barbara which
have the same compression ratio 2.28 with discrete
cosine transform (DCT).
The image compressed by BTC is higher among other
two algorithms.
Table 1.Data Obtained By Matlab
Image Algorithm MSE PSNR CR

BTC 3.82 42.34378 dB 2.13


Figure 3. Compressed result using SVD
We can see that the image is compressed from the Airplane DCT 6.49 40.04101 dB 1.72
size 592.93 KB is reduced by the SVD to 446.20 KB. SVD 0.36 52.65154 dB 1.57

BTC 12.02 37.36460 dB 1.45


V. RESULT ANALYSIS
Baboon DCT 20.33 35.08343 dB 1.18
As the result generated it is quite obvious to analyze
SVD 6.15 40.27670 dB 1.04
and predict that which algorithm performs efficiently
and provide good result while compressing an image BTC 6.09 40.31910 dB 2.28
during storage and transmission.
Barbara DCT 10.46 37.96867 dB 2.28
The factors by which we can define that which
algorithm can be used while transmission and which SVD 0.61 50.30531 dB 2.25
algorithm can be used for storage purpose.
BTC 10.13 38.11078 dB 1.81
We can say that an image needs to be highly
compressed for transmission purpose and for storage Cameraman DCT 14.06 36.68417 dB 1.29
purpose we can say that an image needs to be error
SVD 0.04 62.46416 dB 1.4
free such that its mean square error should be
BTC 3.05 43.32602 dB 1.72

International Journal of Scientific Research in Scienceand Technology (www.ijsrst.com) 109


Lena DCT 4.26 41.86888 dB 1.56 VI. CONCLUSION

SVD 0.39 52.26027 dB 1.33


In this modern world where people are being more
BTC 3.45 42.78617 dB 2.11 smart and intelligent along with smart gadgets the
data transmission really require quick actions so to
Pepper DCT 6.16 40.27114 dB 1.77
provide a better experience to the user. In this paper,
SVD 1.25 47.20961 dB 1.64 it is concluded that block truncation coding
algorithm is efficient in term of higher compression
BTC 1.38 46.76361 dB 2.22
ratio where as in term of MSE the singular value
Pepper2 DCT 2.48 44.21708 dB 1.24 decomposition have an upper hand.

SVD 0.17 55.82348 dB 1.15 BTC can be used where there is more focus on
transmission rather than what information is present
BTC 5.13 41.06360 dB 1.98 in the image where as SVD can be used for the
Sail Boat DCT 8.85 38.69512 dB 1.61 credentials, banking details and confidential
documents where data loss is not tolerated.
SVD 1.63 46.05110 dB 1.48

BTC 1.69 45.89778 dB 2.11 VII. REFERENCES

Tiffany DCT 3.95 42.20010 dB 1.92 [1] Sunil Bhooshan and Shipra Sharma, “Image
SVD 0.57 50.63899 dB 1.54 compression and decompression using adaptive
interpolation”8th WSEAS International Conference
2008.
The compression ratio of BTC is higher than DCT and [2] A. Alarabeyyat, S. Al-Hashemil, T. Khdour, M.
compression ratio of DCT is higher than SVD which is Hjouj Btoush, S. Bani-Ahmad and R. Al-Hashemi,
very clear from table 1. “Lossless image compression technique using
If we talk about mean square error that is the error combination
due to reduction in the information lost while methods”http://dx.doi.org/10.4236/jsea.2012.510088
compressing an image. The MSE for algorithm SVD is Published Online October 2012.
lesser than other two algorithms that show that this [3] Ali A. Al-hamid, Ahmed Yahya and Reda A. El-
algorithm can compress an image efficiently along Khoribi, “Optimized image compression techniques
with lesser amount of information loss. The least for the embedded processors” in International
value of MSE is for the image Cameraman with value Journal of Hybrid Information Technology Vol.9,
0.04 having a compression ratio of 1.4 which is not No.1 (2016), pp. 319-328
too bad. http://dx.doi.org/10.14257/ijhit.2016.9.1.27.

The mean square error for SVD is least than other two [4] Sudha Rawat and Ajeet Kumar Verma, “Survey
paper on image compression techniques”publised in
and then comes the BTC algorithm which has less
IRJET Volume: 04 Issue: 03 | Mar -2017
error than DCT.

International Journal of Scientific Research in Scienceand Technology (www.ijsrst.com) 110

You might also like