7/29/2019 Implementation of Image and Audio Compression Techniques Using
1/26
PROJECT GUIDE :V.V.RAMAKRISHNA M.Tech, M.Hemanth kumarM.NagakumarN.Nagasaidireddy
7/29/2019 Implementation of Image and Audio Compression Techniques Using
2/26
CONTENTS:
OBJECTIVE
INTRODUCTION
WORKING PRINCIPLE
HOW DCT CAN BE USED FOR COMPRESSION
IMPLEMENTATION
IMAGE COMPRESSION
AUDIO COMPRESSION
MATLAB FUNCTIONS USED IN PROGRAMS
CONCLUSION
7/29/2019 Implementation of Image and Audio Compression Techniques Using
3/26
OBJECTIVE:
TO IMPLEMENT GENERAL IMAGE COMPRESSION,
STANDARD JPEG COMPRESSION AND STANDARD
MP3 COMPRESSION TECHNIQUES USING DCT AND TO
ANALYSE THE RESULTS.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
4/26
INTRODUCTION:
Data compression is the technique to reduce the redundancies indata representation in order to decrease data storage requirements
and hence communication costs. The data may be image(jpeg),
audio(mp3) or video(mpeg).
Reducing the storage requirement is equivalent to increasing thecapacity of the storage medium and hence communication
bandwidth.
Thus the development of efficient compression techniques willcontinue to be a design challenge for future communication systems
and advanced multimedia applications.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
5/26
The existing techniques used for compressing image files are
broadly classified into two categories, namely lossless and
lossy compression techniques.
In lossless compression, image data is reduced while image
information is totally preserved.
First step is , it uses the predictive encoding which uses thegray level of each pixel to predict the gray value of its right
neighbor and these values with very small deviation are stored.
Statistical encoding is another step in lossless data reduction.
Statistical encoding is used code to gray level statistics of the
images based on predictive coding.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
6/26
Lossless compression algorithms used in text compression
and medical imaging applications etc.
In lossy compression techniques, the original digital image is
usually transformed through an invertible linear transform into
another domain, where information and redundancy are highly
de-correlated by the transform.
This de-correlation concentrates the important image
information into a more compact form.
The transformed coefficients are then quantized yielding bit-
streams containing long stretches of zeros.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
7/26
Such bit-streams can be coded efficiently to remove the
redundancy and store it into a compressed file.
The decompression reverses this process to produce the
recovered image.
The advantage of lossy methods over lossless methods is that insome cases a lossy method can produce a much smaller
compressed file than any known lossless method, while still
meeting the requirements of the application.
Lossy methods are most often used for compressing sound,
images or videos and lossless compression is used for text
compression and medical image compression.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
8/26
WORKING PRINCIPLE:
Data is represented as a combination of information and
redundancy.
Information is the portion of data that must be preserved
permanently in its original form in order to correctly interpret the
meaning or purpose of the data.
Redundancy is that portion of data that can be removed when it is
not needed and can be reinserted to interpret the data when needed.
The redundancy in data representation is reduced such a way that
it can be subsequently reinserted to recover the original data, which
is called decompression of the data.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
9/26
Data compression can be understood as a method that takes
an input data D and generates a shorter representation of the
data c(D) with less number of bits compared to that of D.
The reverse process is called decompression, which takes the
compressed data c(D) and generates or reconstructs the data D.
Sometimes the compression (coding) and decompression
(decoding) systems together are called a CODEC .
7/29/2019 Implementation of Image and Audio Compression Techniques Using
10/26
ENCODER
DIVIDE SOURCEINTO N x N
BLOCKS
2-DDCT
TRANSFORM
QUANTIZATION
BLOCK DIAGRAM:
SOURCE IMAGE
OR
AUDIO
COMPRESSEDIMAGE
OR AUDIO
7/29/2019 Implementation of Image and Audio Compression Techniques Using
11/26
Why only DCT:
Properties of DCT
Decorrelation :
The main advantage of signal transformation is the removal of
redundancy between neighboring values.
This leads to uncorrelated transform coefficients whichcan be
encoded independently.
Energy Compaction
Efficiency of a transformation scheme can be directly gauged by
its ability to pack input data into as few coefficients as possible.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
12/26
This allows the quantizer to discard coefficients with
relatively small amplitudes without introducing visual
distortion in the reconstructed image.
DCT exhibits excellent energy compaction for highly
correlated signals.
So it is most oftenly used for compression image , audio
and video files in multimedia applications.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
13/26
The basic operation of the DCT is as follows:
The input image is N by M;
f(i,j) is the intensity of the pixel in row i and column j;
F(u,v) is the DCT coefficient in row k1 and column k2 of the
DCT matrix.
For most images, much of the signal energy lies at low
frequencies; these appear in the upper left corner of the DCT.
Compression is achieved since the lower right valuesrepresent higher frequencies, and are often small - small enough
to be neglected with little visible distortion.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
14/26
1D Forward DCT Given a list ofnintensity values I(x),
where x = 0, , n-1
Compute the nDCT coefficients:
1...0,2
)12(cos)()(2)(1
0
nun
xxIuCn
uFn
x
otherwise
uforuCwhere
1
,02
1
)(
CS 414 - Spring 2012
7/29/2019 Implementation of Image and Audio Compression Techniques Using
15/26
Equations for 2D DCT Forward DCT:
Inverse DCT:
m
vy
n
uxyxIvCuC
nmvuF
m
y
n
x 2
)12(cos*
2
)12(cos*),()()(
2),(
1
0
1
0
mvy
nuxvCuCuvF
nmxyI
m
v
n
u 2)12(cos*
2)12(cos)()(),(2),(
1
0
1
0
7/29/2019 Implementation of Image and Audio Compression Techniques Using
16/26
IMPORTANCE OF CO-EFFICIENTS:
F(0,0)
includes the lowest frequency in both directions
is called DC coefficient
Determines fundamental color of the block
F(0,1) . F(7,7)
are called AC coefficients
Their frequency is non-zero in one or both directions
7/29/2019 Implementation of Image and Audio Compression Techniques Using
17/26
JPEG Compression (Baseline)
FDCT
Source
Image
Quantizer
Entropy
Encoder
TableTable
Compressed
image data
DCT-based encoding
8x8 blocks
R
B
G
CS 414 - Spring 2012
Image Preparation
Image Processing
7/29/2019 Implementation of Image and Audio Compression Techniques Using
18/26
JPEG Process:
Original image is divided into blocks of 8 x 8.
Pixel values of a black and white image range from 0-255 but DCT
is designed to work on pixel values ranging from -128 to
127.Therefore each block is modified to work in the range.
Equation(1) is used to calculate DCT matrix.
DCT is applied to each block by multiplying the modified block
with DCT matrix on the left and transpose of DCT matrix on its right.
Each block is then compressed through quantization.
Quantized matrix is then entropy encoded using run length coding.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
19/26
Audio Compression Audio signal overview
Sampling rate (# of samples per second)
Bit rate (# of bits per second). Typically,
uncompressed stereo 16-bit 44.1KHz signal hasa 1.4MBps bit rate.
Number of channels (mono / stereo /multichannel)
Reduction by lowering those values or bydata compression / encoding
7/29/2019 Implementation of Image and Audio Compression Techniques Using
20/26
The MP3 COMPRESSION Algorithm:
Converting the original audio into 8192 x 8192
Applying 2-D DCT to the above image.
Reconstructing the required number of samples.
For compression factor of n , we will reconstruct (1/n) of
the total number of samples.
Plotting or playing the audio signals to interpret the
results.
Saving the compressed audio files to verify the
compression factor.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
21/26
Function of matlab used in programming
Wavread():
Used to read an audio file from the specified location.
Wavwrite()
Used to write an audio file from the specified location.
Wavplay()
Used to play an audio file from the specified location.
Specgram()
Used to plot spectrum a given signal.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
22/26
Dct2():
Used to calculate the 2-D DCT coefficients of the
given input.
Idct2():
Used to calculate the 2-D IDCT coefficients of the
given input.
Imread():
Used to read the image from the specified location.
Imshow():
Used to show the image on the desktop from the
specified location.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
23/26
Imcrop():
Used to crop the image to the specified size.
Rgb2gray():
Used to convert the RGB image into grayscale image.
Imresize():
Used to change the size of an image to the specified
size .
7/29/2019 Implementation of Image and Audio Compression Techniques Using
24/26
CONCLUSION:
High compression ratio and better image quality
accomplished which is better than existing methods.
This project has concentrated on development of
efficient and effective algorithm for still image
compression.
Results show that reduction in encoding time with little
degradation in image quality compare to subsisting
method.
Compression ratio is also increased, while comparing
the proposed method with other methods.
7/29/2019 Implementation of Image and Audio Compression Techniques Using
25/26
THANK YOU
7/29/2019 Implementation of Image and Audio Compression Techniques Using
26/26
ANY QUERIES
Top Related