You are on page 1of 8

International Journal of Electronics and Computer Science Engineering 919

Available Online at www.ijecse.org ISSN- 2277-1956

Compression of a filtered Image using DCT-Technique


1 2
Ms. Deepti Mehta Ms. Kavita Chauhan
1
M. Tech Scholar, Department of ECE, N.G.F College of Engineering and Technology
2
Asst Prof., Department of ECE, N.G.F College of Engineering and Technology
d.mehta@ymail.com, kavita_chau@rediffmail.com

Abstract: This paper provides compression of a filtered Image using DISCRETE COSINE TRANSFORM (DCT) and
the comparison of PSNR-value between an original Image and noisy Image. Parameters of a given image are
Compression Ratio, Number of pixels, Quantization bits per pixel, Frame rate and Correlation between adjacent
samples (Φ).These parameters defines the Quality of an image. DCT is better technique as it transforms coefficients
relatively uncorrelated. Energy of DCT is highly compacted. It is reasonable robust relative to channel errors. DCT
operates on Intraframe Redundancy which results 6bpp is compressed into 1.2 bits per pixel while other techniques
operate on point to point redundancy which results 6bpp is compressed into 2bpp.

Keywords: Image Compression, DCT, PSNR, Coefficient, Coding technique, Filter, Decompression, Simulink,
Color Conversion, Noise in image, pixels, JPEG, transmission, MATLAB

I. INTRODUCTION
Image compression has become an essential requirement for storage, transfer and manipulation of digital images.
An image file from digital cameras occupies large memory. Image compression reduces storage spaces by efficient
utilization of bandwidth. The main goal of image compression is to represent an image in which pixels are less
correlated. There are two fundamental principles for image compression: Redundancy and Irrelevancy. Redundancy
is used to remove redundant data from the signal source and Irrelevancy is used to omit pixel values which are not
noticeable by human eye. Compression technique is of two types: Lossy and Lossless. Lossy compression
techniques are able to achieve much higher compression than lossless technique. The two important image standard
based on Lossy compression technique are JPEG and JPEG 2000. JPEG is based on Discrete Cosine Transform
(DCT) and JPEG 2000 is based on Discrete Wavelet Transform (DWT).Transform coding techniques use a reversible
and linear mathematical transform to map the pixel values onto a set of coefficients which are then quantized and
encoded.
II. DISCRETE COSINE TRANSFORM
This technique works on different frequency by separating an image. From all of frequencies, it has been observed
that at low frequency we can obtain maximum information. With the help of DCT, Image of higher size is divided
into sub-images or blocks of small size. Through these sub-blocks, coefficients are calculated which provides the
maximum and minimum value .These values represents information about the image. So at the top-most corner
(having Low frequency), high value of the coefficient is obtained. Therefore this corner needs to be quantize and
encoding techniques in order to obtain bit-stream at the transmitter-side. The reverse process is done through IDCT in
order to obtain reconstructed image.DCT have many advantages:
(1) It has been implemented in single integrated circuit;
(2) It has the ability to pack most information in fewest coefficients;
(3) It minimizes the block like appearance called blocking artifact that results when boundaries between sub-images
become visible. This block diagram shows an internal diagram for transmitting a compressed image using DCT
technique. See Fig 2.1

ISSN 2277-1956/V2N3-919-926
920
Compression of a filtered Image using DCT-Technique

B YUV Color Down


Image Chrominance sampling
8*8 DCT
G
R

Huffman
Encoding
Zig-Zag QUANTIZER
Bit-
Stream
Huffman Differential
Encoding coding

Fig 2.1 Image Compression using DCT

III IMAGE COMPRESSION ON SIMULINK

Simulink is an environment on which various blocks can be placed using Drag & Drop facility and a model can be
drawn .With the help of Simulink,we can draw the block diagram of Image Compression. Image Is compressed by
DCT and it is reconstructed by IDCT. PSNR is one of the parameter of Image Compression.It defines the quality of
the ImageThe given flowchart shows the basic idea of the project. The step by step description of image
compression, decompression and computation of PSNR is given below:

RGB IMAGE
(INPUT IMAGE)

Color Space Conversion


RGB Y Cb Cr

Filter- Image using


Median-filter

Color Space Conversion


Y Cb Cr RGB

Color Space Conversion


RGB Y Cb Cr

Block Processing
2-D DCT

Block Processing
2-D IDCT

ISSN 2277-1956/V2N3-919-926
IJECSE, Volume 2, Number 3 921
Ms. Deepti Mehta et al.

Color Space Conversion


YCbCr RGB

Reconstructed
Image

Flowchart for an Image Compression using DCT and Decompression using IDCT

PSNR is an acronym of peak signal to noise ratio.It defines the quality of the Image. PSNR is one of the parameter
of Image Compression. It measures the quality of the Image. PSNR can be measured after applying decompression
technique. It measures the value in decibels. Comparison of Quality between Original Image and Noisy Image is
evaluated with the help of PSNR. Higher the value of PSNR, quality of an Image will be better. The flowchart is
given as:

START

Original Image as I1

Decompressed Image as I2

On Applying PSNR –Block


(For each R, G and B
Component)

Display the Output in dB

STOP

Flowchart for Analyzing PSNR-Output

Compression of colored – image can be obtained easily by converting it into non-colored image, which means 3-D
signal is converted into 2-D signal. This 3-D to 2-D conversion should be done before applying DCT because DCT
works on 2-D signal

ISSN 2277-1956/V2N3-919-926
922
Compression of a filtered Image using DCT-Technique

IV. RESULTS

Colored image can be compressed with the help of DCT. So, by taking a colored image from the MATLAB -
workspace and put some noise in the same image and represent it by another name. Both images are called in the
Simulink environment. Here the original image is shown as in fig 4.1.

Fig.4.1 Original Image


Noisy image is an image which have noise in terms of salt and pepper.The maximum intensity of the noise in
Image is 1.Here, noisy image is shown with the intensity of 0.02.This image is also called from MATLAB –
workspace. See Fig 4.2

Fig.4.2 Noisy Image


For the transmission and storage of an image, compression becomes necessary. Before compression and
transmitting an image, noise should be filtered out this is done to obtain an original image. By considering all these
issues, color space conversion become necessary. It converts 3-D signal into 2-D signal. As colored image is 3-
dimensional signal and all the operations such as Filtering, DCT and IDCT is performed on 2-dimensional Image.
The 2-D image of the original image is shown as in Fig.4.3

ISSN 2277-1956/V2N3-919-926
IJECSE, Volume 2, Number 3 923
Ms. Deepti Mehta et al.

Fig.4.3 Color converted 2-D Image

Sunset PSNR(R) PSNR(G) PSNR(B)


Image\
PSNR

Original
Image 22.01 27.20 21.61

Filtered
Image 40.01 39.16 40.34

After obtaining 2-D Image Median Filter can be applied over noisy image in order to obtain Filtered Image.This
filter Performs Median filtering of input matrix which comes from the input image. It uses the Neighborhood size
parameter to specify the size of the neighborhood over which the block computes the median..Noise
intensity gets almost reduced. See Fig.4.4

ISSN 2277-1956/V2N3-919-926
924
Compression of a filtered Image using DCT-Technique

Fig.4.4 Filtered Image

Now, filtered Image is ready to compress by DCT algorithm so that compression should be done over filtered
image.DCT is an image compression technique which is used for compressing an image at low compression ratio.
See Fig 4.5
.
.

Fig.4.5 Compressed Image

In order to obtain an original image at the receiver, decompression technique is needed. Here, IDCT is a
corresponding decompression technique to the DCT. Reconstructed image is shown in Fig.4.6

ISSN 2277-1956/V2N3-919-926
IJECSE, Volume 2, Number 3 925
Ms. Deepti Mehta et al.

Fig.4.6 Decompressed Image


At the receiver side, image is reconstructed with the help of IDCT technique. From the above observation we can
check the quality of the image with the parameter known as PSNR. It uses two inputs in which one is reconstructed
- image and another one is noisy-Image. Comparison of PSNR value is shown in table 4.1. See table 4.1

The bar graph represents the comparison of PSNR value with Image component such as R,G and B. The different
values of PSNR is shown as in Fig 4.7

Fig 4.7 PSNR verses True Color Image Component


V. CONCLUSION

When an image is transmitted from transmitter then during the transmission some noise gets introduced in terms of
salt and pepper.This noise is filtered through median filter after converting image in 2-D and then it is compressed.
Image is reconstructed at the receiver side in 3-D.From this paper, it is concluded from the comparison between
filtered Image and noisy Image that higher the value of PSNR gives better quality of the image.As we increase the
Compression-Ratio, value of PSNR will decreases.This will degrade the Quality of the Image.DCT will provide
better compression results at low compression ratio.So, at higher compression-ratio,we use another technique for
Image Compression known as Discrete Wavelet Transform (DWT).

ISSN 2277-1956/V2N3-919-926
926
Compression of a filtered Image using DCT-Technique

REFERENCES

[1] Comparative Analysis of Digital Image Watermarking Techniques in Frequency Domain using SIMULINK by
Mandeep Singh, International Journal of Engineering Research & Application, June 2012

[2] Wavelet coding design for Image data compression by Othman Khalifa in Malaysia, International Arab Journal
of IT, April 2005

[3] Analysis of PSNR by Divya S.Das in Bangalore,


International Journal of IT, August 2012

[4] Secured color Image water-making technique in


DWT-DCT Images, International Journal of Computer Science, Engineering and Information Technology
(IJCSEIT), Vol.1, No.3, August 2011

[5] A new lossless method of image compression and decompression using Huffman coding techniques by Jagadish
H. Pujar and Lohit M. Kadlaskar, Journal of Theoretical and Applied Information Technology

[6] Performance Analysis of Image Compression Using Discrete Cosine Transform with various Discrete Wavelet
Transform by Harish Jindal

[7] Analysis Of Image Compression Algorithm Using DCT by Maneesha Gupta, Dr. Amit Kumar Garg,
International Journal of Engineering Research and Applications (IJERA), Vol. 2, Issue 1, Jan-Feb 2012

ISSN 2277-1956/V2N3-919-926

You might also like