You are on page 1of 14

A Paper Presentation on

IMAGE COMPRESSION
(BY ARTIFICIAL NEURAL NETWORKS)

BY
P.RAVISANKAR
(ravisankar430200@gmail.com)

K.SUBBARAO
(harisubbu.cec@gmail.com)
Department of
ELECTRONICS & COMMUNICATION
ENGINEERING

CHIRALA ENGINEERING COLLEGE

Abstract:
Digital image processing methods stems from two principle application areas:
improvement of pictorial information for human interpretation, and processing of
scene data for autonomous machine perception.
Uncompressed multimedia (graphics, audio and video) data requires
considerable storage capacity and transmission bandwidth. Despite rapid progress in
mass-storage density, processor speeds, and digital communication system
performance, demand for data storage capacity and data-transmission bandwidth
continues to outstrip the capabilities of available technologies. The recent growth of
data intensive multimedia-based web applications has not only sustained the need for
more efficient ways to storage and communication technology.
Apart from the existing technology on image compression represented by
series of JPEG, MPEG and H.26x standards, new technology such as neural networks
and genetic algorithms are being developed to explore the future of image coding.
Successful applications of neural networks to vector quantization have now become
well established and other aspects of neural network involvement in these
technologies. Here we present an extensive survey on the development of neural
network for image compression. One of the most promising ways to utilize the power
of neural network for image compression lies on
(a) Selection of efficient multi layered network
(b) Selection of training methods
(c) Test vector.
Based on this criteria network are trained and implemented. This paper deals with
basic concepts of digital image processing, and deals with image compression by
series of JPEG, MPEG standards, new technology such as neural networks and
genetic algorithms are being developed to explore the future of image coding.

CONTENTS

1.Introduction
Steps in image processing
Elements of image processing
Categories of image processing
Image Enhancement,
Image Restoration,
Image Coding,
Image Understanding

2. Image compression
Principles of Image Compression
Performance measurement of image Compression
Compression Standards

3. Image compression using artificial neural networks

Artificial neural networks


Inter& Intra layer connections.
Basic Algorithm
Training procedure
Flow chart for the implementation of image compression using artificial neural
network

4.Conclusion
5.References

Introduction:

The importance of visual communication has increased tremendously in the


last few decades. The progress in microelectronics and computer technology, together
with the creation of network operating with various channel capacities, is the bases of
an infrastructure for a new are of telecommunications. New applications are preparing
a revolution in the everyday life of our modern society. Communication based
applications include ISDN surveillance. Storage based audiovisual applications
include Training, Education, Entertainment, Advertising, Video mail and Document
annotation. Essential for the introduction of new communication services is low cost.
Visual information is one of the richest and most bandwidth consuming modes of
communication.
The digital representation of raw video requires a large amount of data. The
transmission of this raw video data requires a large transmission bandwidth. To reduce
the transmission and storage requirements, the video must be handled in compressed
formats. To meet the requirements, the new applications, powerful data compression
techniques are needed to reduce the global bit rate drastically. Even in the presence of
growing communication channels offering increased bandwidth. The issue of quality
is of prime importance in most applications of compression. In fact, although most
applications require high compression ratios, this requirement is in general in
conduction with desire for high quality in the resulting pictures.
The standardization of video coding techniques has become a high priority
because only a standard can reduce the high cost of video compression codes and
resolve the critical problem of inter operability of equipment from different
manufacturers. The existence of the standards is often the trigger to the volume
production of integrated (VLSI) necessary for significant cost reductions. Bodies such
as the international Standards Organization (ISO) and International
Telecommunication Union (ITU-T) today recommend the video compression
standards in practice.

Fundamental steps in image processing


Digital image processing encompasses a broad range of hardware, software,
and theoretical underpinnings. Steps in image processing are
1. image acquisition
2. preprocessing
3. segmentation
4. representation and description

Elements of image processing


The elements of a general purpose system capable of performing the image processing
operations discussed above generally consists of
1. Acquisition
2. Storage
3. Processing
4. communication
5. Display

Categories of image processing


Digital image processing can be classified broadly into four areas:
I. Image Enhancement,
II. Image Restoration,
III. Image Coding,

IV. Image Understanding.


1 Image Enhancement
Image enhancement is the use of image processing algorithms to remove
certain types of distortion in an image. Removing noise, making the edge structures in
the image stand out, enhances the image or any other operations that makes the image
to look better.
The most widely used algorithms for enhancement are based on pixel
functions that are known as window operations. A window operation performed on an
image is nothing more than the process of examining the pixels in a certain region of
the image, called the window region, and computing same type of mathematical
function derived from the pixels in the window.
2. Image Restoration
In image restoration, an image has been degraded in some manner and the
objective is to reduce or eliminate the degradation. The development of an image
restoration system depends on the type of degradation.
3 Image coding
The objective of image coding is to represent an image with as few bits as
possible preserving certain level of image quality and intelligibility acceptable for a
given application. Image coding can be used in reducing the bandwidth of a
communication channel; when images need to be retrieved.
4. Image Understating
The objective of image understating is to symbolically represent the contents
of an image. An application of image understanding includes computer vision and
robotics.

Image Compression
Image compression addresses the problem of reducing the amount of reducing
the amount of data required to represent a digital image. The underlying basis of
reduction required process is the removal of redundant data.
Direct transmission of the video data requires a high-bit-rate (Bandwidth)
channel. When such a high bandwidth channel is unavailable or not economical,
compression techniques have to be used to reduce the bit rate and ideally maintain the
same visual quality. Similar arguments can be applied to storage media in which the
concern is memory space. Video sequence contain significant amount of redundancy
within and between frames.. It is this redundancy that allows video sequences to be
compressed. Within each individual frame, the values of neighboring pixels are
usually close to one another. This spatial redundancy can be removed from the image
without degrading the picture quality using Intraframe techniques.
Also, most
of the information in a given frame may be present in adjacent frames. This temporal
redundancy can also be removed, in addition to the within frame redundancy by
interframe coding. Compression techniques fall into two categories: information
preserving and lossy.

Principles of Image Compression


The principles of image compression are based on information theory.
Compression algorithms are methods that reduce the number of symbols used to
represent source information, therefore reducing the amount of space needed to store
the source information or the amount of time necessary to transmit it for a given
channel capacity. The mapping from the source symbols into fewer target symbols is
referred to as Compression and Vice-versa Decompression. Image compression refers
to the task of reducing the amount of data required to store or transmit an image. At
the system input, the image is encoded into its compressed from by the image coder.

The compressed image may then be subjected to further digital processing,


such as error control coding, encryption or multiplexing with other data sources,
before being used to modulate the analog signal that is actually transmitted through
the channel or stored in a storage medium. At the system output, the image is
processed step by the step to undo each of the operations that were performed on it at
the system input. At the final step, the image is decoded into its original
uncompressed form by the image decoder. If the reconstructed image is identical to
the original image the compression is said to be lossless, otherwise, it is lossy.

Performance measurement of image Compression


There are three basic measurements.
1. Compression Efficiency
2. Complexity
3 Distortion measurement (DM)

Compression Standards
Digital images and digital video are normally compressed in order to save space
on hard disks and to speed up transmission
. There is presently several compression standards used for Main
Main
network transmission of digital signals on a network. Data sent by compression compression
a camera using video standards contain still image mixed with data standard for standards for
video signal
containing changes, so that unchanged data (for instance the still image
JPEG
M-JPEG
background) are not sent in every image. Consequently the frame
(Motion.JPEG)
rate measured in frames per second (fps) is much grater.
Wavelet
H.261,263etc.
Compression standards
JPEG 2000
MPEG1
GIF

MPEG2

IMAGE COMPRESSION WITH NEURAL NETWORKS:


MPEG3
Apart from the existing technology on image
MPEG4
compression represented by series of JPEG, MPEG standards, new
technology such as neural networks and genetic algorithms are being developed to
explore the future of image coding. Successful applications of neural networks to
vector quantization have now become well established, and other aspects of neural
networks involvement in this area are stepping up to play significant roles in assisting
with those traditional compression techniques.
ARTIFICIAL NEURAL NETWORKS: Artificial neural network is a system loosely
modeled on the human brain. The field goes by many names, such as connectionism;
parallel distributed processing, neuro computing, natural intelligent systems, machine
learning algorithms and artificial neural networks. It is an attempt to simulate with in
specialized hardware or sophisticated software, the multiple layers of simple
processing elements called neurons. Each neuron is linked to certain of its neighbors
with varying coefficients of connectivity that represent the strengths of these
connections Existing research can be summarized as follows:
1. Back-Propagation image Compression;
2. Hebbian Learning Based Image Compression;
3. Vector Quantization Neural Networks;
4. Predictive Coding Neural Networks.
The advantages of realizing a neural network in digital hardware (FPGA) are:
Fast multiplication, leading to fast update of the neural network.
Flexibility, because different network architectures are possible.
Scalability, as the proposed hardware architecture can be used for arbitrary
large networks, considered by the no of neurons in one layer.

The greatest potential of neural networks is the high speed processing that is
provided through massively parallel VLSI implementations.
The Analogy to the Brain: The most basic components of neural networks are
modeled after the structure of the brain. Some neural network structures are not
closely to the brain and some does not have a biological
counterpart in the brain. However, neural networks
have a strong similarity to the brain and therefore a
great deal of the terminology is borrowed from
neuroscience.
The Biological Neuron
fig: biological neuron
The most basic element of the human brain is
a specific type of cell, which provides with the abilities
to remember, think, and apply previous experiences to
our every action. These cells are known as neurons;
each of these neurons can connect with up to 200000 other neurons. The power of the
brain comes from the numbers of these basic components and the multiple
connections between them. All natural neurons have four basic components, which
are dendrites, soma, axon, and synapses basically; a biological neuron receives inputs
from other sources, combines them in some way, performs a generally nonlinear
operation on the result, and then output the final result. The figure shows a simplified
biological neuron and the relationship
of its four components.
Figure Single neuron

The Artificial Neuron

The basic unit of neural


networks, the artificial neurons,
simulates the four basic functions of
natural neurons. Artificial neurons are
much simpler than the biological
neuron; the figure below shows the
basics of an artificial neuron.
The various inputs to the
network are represented by the
mathematical symbol, x (n). Each of these inputs are multiplied by a connection
weight, these weights are represented by w (n). In the simplest case, these products
are simply summed, fed through a transfer function to generate a result, and then
output.
Even though all artificial neural networks are
constructed from this basic building block the fundamentals
may vary in these building blocks and there are differences.
A neuron receives input from many neurons, but produces a
single output, which is communicated to other neurons. The
neuron in a layer may communicate with each other, or
they may not have any connections. The neurons of one
layer are always connected to the neurons of at least
another layer.
Fig: Inter-layer connections

INTER LAYER CONNECTIONS: There are different types of connections used


between layers; these connections between layers are called inter-layer connections.
Fully connected:
Each neuron on the first layer is connected to every neuron on the
second layer.
Partially connected:
A neuron of the first layer does not have to be connected to all
neurons on the second layer
Feed forward:
The neurons on the first layer send their output to the neurons
on the second layer, but they do not receive any input back form the neuron on the
second layer.
Bi-directional.:
There is another set of connections carrying the output of the
neurons of the second layer into the neurons of the first layer
Feed forward and bi-directional connections could be fully-or partially connected
Hierarchical:
If a neural network has a hierarchical structure, the neurons of
a lower layer may only communicate with neurons on the next level of layer.
Resonance:
The layers have bi-directional connections, and they can
continue sending messages across the connections a number of times until a certain
condition is achieved.
Intra-layer connections:
In more complex structures the neurons communicate among themselves
within a layer, this is known as intra-layer connections. There are two types of intralayer connections.
Recurrent:
The neurons within a layer are fully or partially connected to one another.
After these neurons receive input form another layer, they communicate their outputs
with one another a number of times before they are allowed to send their outputs to
another layer. Generally some conditions among the neurons of the layer should be
achieved before they communicate their outputs to another layer.
On-center/of surround:
A neuron within a layer has excitatory connections to itself and its immediate
neighbors, and has inhibitory connections to other neurons. One can imagine this type
of connection as a competitive gang of neurons. Each gang excites it and its gang
member and inhibits all members of other gangs. After a few rounds of signal
interchange, the neurons with an active output value will win, and is allowed to
update its and its gang members weights. The are two types of connections between
two neurons, excitatory or inhibitory. In the excitatory connection, the output of one
neuron increases the action potential of the neuron to which it is connected. When the
connection type between two neurons is inhibitory, then the output of the neuron
sending a message would reduce the activity or action potential of the receiving
neuron. One causes the summing mechanism of the next neuron to add while the other
causes it to subtract. One excites while the other inhibits.
Learning:
The brain basically learns from experience. Neural networks are sometimes
called machine-learning algorithms, because changing of its connection weights
(training) causes the network to learn the solution to a problem. The strength of
connection between the neurons is stored as a weight-value for the specific
connection. The system learns new knowledge by adjusting these connection weights.
The learning ability of a neural network is determined by its architecture and
by the algorithmic method chosen for training.
The training method usually consists of one of three schemes:

1.

Unsupervised learning.
The hidden neurons must find a way to organize themselves without help from
the outside. In this approach, no sample outputs are provided to the network against
which it can measure its predictive performance for a given vector of inputs. This is
learning by doing.
2.
Reinforcement learning:
This method works on reinforcement from the
outside. The connections among the neurons in the hidden layer are randomly
arranged, then reshuffled as the network is told how close it is to solving the problem.
Reinforcement learning is also called supervised learning, because it requires a
teacher. The teacher may be a training set of data or an observer who grades the
performance of the network results.
Both unsupervised and reinforcement suffers from relative slowness and
inefficiency relying on a random shuffling to find the proper connection weights.
3.
Back propagation: this method is proven highly successful in training of
multilayered neural nets. The network is not just given reinforcement for how it is
doing on a task. Information about errors is also filtered back through the system and
is used to adjust the connections between the layers, thus improving performance a
form of supervised learning.
Off-line or On-line
One can categorize the learning methods into yet another group, off-line or online. When the system uses input data to change its weights to learn the domain
knowledge, the system could be in training mode or learning mode. When the system
is being used as a decision aid to make recommendations, it is in the operation mode,
this is also sometimes called recall.
Off-line
In the off-line learning methods, once the systems enters into the operation
mode, its weights are fixed and do not change any more. Most of the networks are of
the off-line learning type.
On-line
In on-line or real time learning, when the system is in operating mode (recall),
it continues to learn while being used as a decision tool. This type of learning has a
more complex design structure.
PROPSED IMGAE COMPRESSION USING NEURAL NETWORK
A two layer feed-forward neural network and the Levenberg Marquardt
algorithm was considered. Image coding using a feed forward neural network consists
of the following steps:
An image, F, is divided into rxc blocks of pixels. Each block is then scanned to
form a input vector x (n) of size p=rxc
It is assumed that the hidden layer of the layer network consists of I neurons
each with p synapses, and it is characterized by an appropriately selected weight
matrix Wh.
All N blocks of the original image is passed through the hidden layer to obtain
the hidden signals, h(n), which represent encoded input image blocks, x(n) If L<P
such coding delivers image compression.
It is assumed that the output layer consists of m=p=rxc neurons, each with L
synapses. Let Wy be an appropriately selected output weight matrix. All N hidden
vector h(n), representing an encoded image H, are passed through the output layer to
obtain the output signal, y(n). The output signals are reassembled into p=rxc image
blocks to obtain a reconstructed image, Fr.

There are two error matrices that are used to compare the various image compression
techniques. They are Mean Square Error (MSE) and the Peak Signal-to-Noise Ratio
(PSNR). The MSE is the cumulative squared error between the compressed and the
original image whereas PSNR is the measure of the peak error.
MSE I

MN
y 1 x 1

[ I ( x, y ) I ' x, y ] 2 1

The quality of image coding is typically assessed by the Peak signal-to-noise


ratio (PSNR) defined as
PSNR = 20 log 10 [255/sqrt(MSE)] 2

Training is conducted for a representative class of images using the Levenberg


Marquardt algorithm.
Once the weight matrices have been appropriately selected, any image can be
quickly encoded using the Wh matrix, and then decoded (reconstructed) using the Wy
matrix.
Levenberg Marquardt Algorithm:
The Levenberg Marquardt algorithm is a variation of Newtons method that
was designed for minimizing functions that are sums of squares of other nonlinear
functions. This is very well suited to neural network training where the performance
index is the mean squared error.
Basic Algorithm:Consider the form of Newtons method where the performance
index is sum of squares. The Newtons method for optimizing a performance index
F(x) is
Xk+1= Xk Ak 1 gk, .1
Where Ak = 2 F(x)x =x and gk =F(x)I x=xk;
It is assume d that F (x) is a sum of squares function:
n

F ( x ) vi2 x V T x v x ...2
r 1

Then the jth element of the gradient will would be


n

F x j F x / X j 2 Vi x vi x / X j .3
i 1

The gradient can be written in matrix form:


F(x) = 2JT (x) v(x) ....4.
Where J(x) is the Jacobian matrix.
Next the Hessian matrix is considered. The k.j element of Hessian matrix
would be
2 F x kj 2 F x / xk x j ..5
The Hessian matrix can then be expressed in matrix form:
2 F(x) = 2 JT (x) J(x) + 2 S(x) .. 6
n

2
Where S x Vi x . vi x .........................................................7
i 1

Assuming that S(x) is small, the Hessian matrix is approximated as


2 F(x) 2 JT(x) J(x)..8
Substituting the values of 2 F(x) & F(x), we obtain the Gauss-Newton
method:
Xk+1 = Xk [JT (Xk) J ( Xk)]-1 JT (Xk) V(Xk) .9

One problem with the Gauss-Newton over the standard Newtons method is that the
matrix H=JTJ may not be invertible. This can be overcome by using the following
modification to the approximate Hessian matrix: G = H + I.
This leads to Levenberg Marquardt algorithm
Xk+1 = Xk [JT (Xk) J ( Xk)+kI]-1 JT (Xk) V(Xk) .10
Or
Xk =- [JT (Xk) J ( Xk)+ kI]-1 JT (Xk) V(Xk) .11
This algorithm has the very useful feature that as k is increased it
approaches the steepest descent algorithm
with small learning rate.
The iterations of the LeverbergMarquardt back propagation algorithm
(LMBP) can be summarized as follows:
1. Present all inputs to the network and
compute the corresponding network
outputs and the errors eq = tq a Mq.
Compute the sum of squared errors
over all inputs. F(x).
2. F (x) = eq T eq =(ej.q )2 = (vi)2
Compute the Jacobian matrix.
Calculate the sensitivities with the
recurrence relation. Augment the
individual
matrices
into
the
Margquardt sensitivities.
3. Obtain Xk.
4. Recompute the sum of squared errors using
Figure neural network block diagram
Xk + Xk... If this new sum of squares is smaller than that computed in step 1
then divide by v, let Xk+1 = Xk + Xk and go back to step 1. If the sum of squares
is not reduced then multiply by v and go back to step 3.
Training procedure: During training procedure data from a representative image
or a class of image is encoded into a structure of the hidden and out put weight
matrices. It is assumed that an image F, used in training of size RXC and consists
of rxc blocks.
1. The first step is to convert a block matrix F into a matrix X of size P x N
containing training vectors, x(n), formed from image blocks. That is: P= r.c and
p.N = R.C
2. The target data is made equal to the data, that is: D=X
3. The network is trained until the mean square error is small. The matrices W h
and Wy will be subsequently used the image encoding and decoding and decoding
steps.
Image Encoding: The hidden-half of the two-layer
network is used to encode images. The Encoding
procedure can be described as follows
FX, H= (Wh. X) Where X is an encoded image of F.
Image Decoding The image is decoded (reconstructed)
using the output-half the two-layer network. The
decoding procedure is described as follows:

Y=(Wy.H),YF

These steps were performed


using
MATLAB
(Matrix
laboratory). The compression so
obtained was though offline
learning. In the off-line learning
methods, once the systems enters
into the operation mode, its
weights are fixed and do not
change any more. The flow chart
is shown adjacent.
Implementation using MATLAB
An image blood1.tif was taken as the
input to be compressed. At each
instance (1:64, 1:64) pixels were
considered. Now using blkM2vc
function the matrix was arranged
column wise. The target was made
equal to the input and the matrix was
scaled down. The network was
developed using 4 neurons in the
first layer (compression) and 16
neurons in the second layer
(decompression) as shown in the fig
5.1. The first layer used tangent
sigmoid function and the linear
function in the second layer. Then
the training was performed using
Levenberg-Marquardt Algorithm.
The results of the resultant are
shown in adjacent figure.
The following functions were used
for this purpose
net.traniparam.goal = le-5,
net.trainparam.epochs=300.
After this the network was simulated
and its output was plotted against the
target.
The function used for this purpose was:
A = sim (net_s,in3);
Rearranging of the matrix was done
using function vc2blkM followed by
scaling up.
The weights and the biases at the
transmitter end were found out using
the following functions in the
MATLAB command window.

Compendium/conclusion:
From the above discussion we can conclude that image
compression address the problem of reducing the amount of data required
representing the digital image. The image compression is recognized as an enabling
technology. It plays a very important role in many important applications, including
televideo-conferancing remote sensing, document and medical imaging, facsimile
transmission; the category of image compression that deals with information
preserving finds a particular use in image archiving. The lossy image compression is
useful in applications such as broadcast television, videoconferencing, and facsimile
transmission, in which a certain amount of error is an acceptable trade-off for
increased compression performance. The compression and decompression of the
digital image using neural networks facilitate handling of non stationeries in image
data.
Back-propagation algorithm used to implement image compression is to
obtain weights and biases for any input image of 64: 64. The network consists of two
layers the input and the output layer, the input layer consists of four neurons and the
output layer is having sixteen neurons. Sixty-four weights are there for each input and
output layer and four biases for input layer and sixteen biases for output layer. The
neural network compression and decompression blocks are designed using MATLAB.

Bibliography
1. H.Demuth and M. Beale. Neural Network TOOLBOX Users Guide. For use
with MATLAB. The Math Works lne.. (1998)
2. J. Jiang. Image compression with neural networks. Signal Processing: Image
Communication 14 (1999) 737-760
3. Neural Networks
by
Simon Haykin
4. Design of Neural Networks by
Hagan Demuth Beale
5. Image Processing by
Anil K. Jain

You might also like