Você está na página 1de 26

PROJECT GUIDE :

V.V.RAMAKRISHNA M.Tech,
M.Hemanth kumar
M.Nagakumar
N.Nagasaidireddy
CONTENTS:

OBJECTIVE
INTRODUCTION
WORKING PRINCIPLE
HOW DCT CAN BE USED FOR COMPRESSION
IMPLEMENTATION
IMAGE COMPRESSION
AUDIO COMPRESSION
MATLAB FUNCTIONS USED IN PROGRAMS
CONCLUSION
OBJECTIVE:
TO IMPLEMENT GENERAL IMAGE COMPRESSION,

STANDARD JPEG COMPRESSION AND STANDARD

MP3 COMPRESSION TECHNIQUES USING DCT AND TO

ANALYSE THE RESULTS.
INTRODUCTION:

Data compression is the technique to reduce the redundancies in
data 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 the
capacity of the storage medium and hence communication
bandwidth.

Thus the development of efficient compression techniques will
continue to be a design challenge for future communication systems
and advanced multimedia applications.


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 the
gray 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.

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.

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 in
some 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.

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.

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 .



ENCODER
DIVIDE SOURCE
INTO N x N
BLOCKS
2-D
DCT
TRANSFORM
QUANTIZATION
BLOCK DIAGRAM:
SOURCE IMAGE
OR
AUDIO
COMPRESSED
IMAGE
OR AUDIO
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.


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.







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 values
represent higher frequencies, and are often small - small enough
to be neglected with little visible distortion.
1D Forward DCT
Given a list of n intensity values I(x),
where x = 0, , n-1
Compute the n DCT coefficients:


1 ... 0 ,
2
) 1 2 (
cos ) ( ) (
2
) (
1
0
=
+
=

=
n u
n
x
x I u C
n
u F
n
x
t

\
|
=
=
otherwise
u f or
u C where
1
, 0
2
1
) (
CS 414 - Spring 2012
Equations for 2D DCT
Forward DCT:




Inverse DCT:
|
.
|

\
|
+
|
.
|

\
|
+
=

=
m
v y
n
u x
y x I v C u C
nm
v u F
m
y
n
x
2
) 1 2 (
cos *
2
) 1 2 (
cos * ) , ( ) ( ) (
2
) , (
1
0
1
0
t t
|
.
|

\
|
+
|
.
|

\
|
+
=

=
m
v y
n
u x
v C u C u v F
nm
x y I
m
v
n
u
2
) 1 2 (
cos *
2
) 1 2 (
cos ) ( ) ( ) , (
2
) , (
1
0
1
0
t t
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

JPEG Compression (Baseline)
FDCT
Source
Image
Quantizer
Entropy
Encoder
Table Table
Compressed
image data
DCT-based encoding
8x8 blocks
R
B
G
CS 414 - Spring 2012
Image Preparation
Image Processing
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.

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 has
a 1.4MBps bit rate.

Number of channels (mono / stereo /
multichannel)

Reduction by lowering those values or by
data compression / encoding

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.


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.

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.

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 .

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.

Você também pode gostar