Sie sind auf Seite 1von 11

Interim Project Report

On
Enhancement of Edge Detection Using
Gravitational Search Algorithm

Submitted by: -
Aayush Agarwal 1101209271
Diamond Mohanty 1101209286
Pratikshya Nandy 1101209299
Sanchita Mohanty 1101209309

B.Tech (IT), 7
th
Semester
Group No IT-12
Under Guidance of:
Mr. Nihar Ranjan Nayak


Silicon Institute of Technology
Bhubaneswar



1

Abstract
In an image edges are points at which image brightness changes sharply and are
organized into a set of curved line segments. Edge detection is a process for
identifying edges and is important in further analyzing image content. It is one of the
elementary steps in image processing, image analysis, image pattern recognition,
and computer vision techniques. Traditional edge detection technique and algorithm
result in missing edge segments, possibly loss of some important edges.
Gravitational search algorithm (GSA) is a population-based search algorithm based
on Newtonian gravity. This Algorithm uses the theory of Newtonian gravity and it
uses searcher agents which are the collection of masses. The idea of GSA is that
masses attract each other by way of gravity force, and this force causes a global
movement of all objects towards the objects with heavier masses. By using this
algorithm edge of an image is to be detected and compared with other existing
algorithms.













2

Table of Contents
1 Introduction .................................................................................................................................... 3
2 Process in Image processing ..................................................................................................... 3
3 Edge Detection ............................................................................................................................. 3
4 Steps of Edge Detection ............................................................................................................. 4
5 Application of Edge Detection .................................................................................................... 4
5.1 Oil Sand Ore Extraction ....................................................................................................... 4
5.2 Traffic Control System ......................................................................................................... 4
5.3 Video Surveillance ............................................................................................................... 4
6 Some Optimization Algorithms ................................................................................................... 5
6.1 ACO [Ant Colony Optimization] .......................................................................................... 5
6.2 GSA [Gravitational Search Algorithms] ............................................................................. 5
7 Introduction to Gravitational Search Algorithm ........................................................................ 5
7.1 Law of Gravity ....................................................................................................................... 6
7.2 Law of Motion ........................................................................................................................ 6
7.3 Relation of Gravitational Constant with Age of Universe ............................................... 7
8 Gravitational Search Algorithm .................................................................................................. 7
9 Algorithm ...................................................................................................................................... 10
10 Future Work ............................................................................................................. 10
11 References ............................................................................................................... 10










3

1 Introduction
Digital image processing refers to processing of digital images by digital computer.
Edges often carry important information about an object, when shown as large
gradient magnitude. Edge detection strategies seek out obvious edges in an image.
Traditional edge detection techniques commonly extract edges by smoothing
function or some other methods. But traditional filtering methods often result in
some drawbacks like broken edges. Therefore many optimization methods have
been proposed to link these broken edges in order to improve edges detection.
Gravitational Search Algorithm (GSA) is such an optimization method.
2 Process in Image processing
There is no clear-cut boundaries in the continuum from image processing at one end
to computer vision at the other. However paradigm is to consider three types of
computerized processes in this continuum:
1. Low-level process: It involves primitive operations such as image pre -
processing to reduce noise, contrast enhancement and image sharpening.
Both input and output are images.
2. Middle-level process: It involves segmentation, description of those objects to
reduce them to a form suitable for computer processing and classification of
individual objects. In this process, input is an image and output is the
attributes extracted from those images.
3. High-level process: It involves image analysis and performing the cognitive
functions normally associated with vision.
3 Edge Detection
Edge detection is a process of locating an edge of an image. Detection of edges in
an image is a very important step towards understanding image features. Edges
consist of meaningful features and contain signicant information. It signicantly
reduces the image size and lters out information that may be regarded as less
relevant, thus preserving the important structural properties of an image. Edges
define the boundaries between regions in an image, which helps with segmentation

4

and object recognition. They can show where shadows fall in an image or any other
distinct change in the intensity of an image.
4 Steps of Edge Detection
(1) Smoothing: suppress as much noise as possible, without destroying the true
edges.
(2) Enhancement: apply a lter to enhance the quality of the edges in the image
(sharpening).
(3) Detection: determine which edge pixels should be discarded as noise and
which should be retained (usually, thresholding provides the criterion used for
detection).
(4) Localization: determine the exact location of an edge (sub-pixel resolution
might be required for some applications, that is, estimate the location of an edge
to better than the spacing between pixels). Edge thinning and linking are usually
required in this step
5 Application of Edge Detection
5.1 Oil Sand Ore Extraction
The oil is extracted from the sand ore from the deep caves by digging process. There
are large lump ores which obstructs the extraction of the extraction and exploring
process. So different images are taken from the camera at different angles and then
through edge detection process they estimate the dimension of the ores and decide
the way to dig them.
5.2 Traffic Control System
The image sequences from a camera that are captured in the traffic junction are
analyzed using various edge detection and object counting methods to obtain the
most efficient technique. Subsequently, the number of vehicles at the intersection is
evaluated and traffic is efficiently managed.
5.3 Video Surveillance
Motion tracking is an important task in image processing applications. To track
moving objects and their interaction in a complex environment is a difficult task, this
work basically explains the technique of tracking moving objects. Moving object

5

detection can be accomplished by image capturing, background subtraction and
Prewitt edge detection operator.
6 Some Optimization Algorithms
6.1 ACO [Ant Colony Optimization]
ACO is a heuristic method that imitates the behavior of real ants to solve discrete
optimization problems. The created artificial ants behave like intelligent agents with
memory and ability to see. These ants share their experiences in form of pheromone
in order to search optimal paths iteration by iteration. Since the starting states of ants
and the terminating riles are defined, ants adopt transition rules to construct their
optimal solutions. Furthermore, the constructive steps of each ant can be different in
the same iteration. It means that no requirements are demanded to estimate the total
number of probable optimal solutions. This condition differs from other evolutionary
computation methods like genetic algorithms. In solving the edge detection problem,
each pixel of image is assumed to be connected with 8-neighbourhood pixels. The
distance between adjacent pixels is estimated from the original image, and the ants
are placed on endpoints extracted from the traditional edge detection approaches.
These located ants attempt to repair breaks of edges, and extend their searching
range to find compensable edges.
6.2 GSA [Gravitational Search Algorithms]
Gravitational search algorithm is an optimization algorithm inspired by Newtonian
gravity. Masses cooperate using a direct form of communication, through
gravitational force of attraction. Each mass presents a solution, and the algorithm is
navigated by properly adjusting the gravitational and inertia masses. The lighter
masses tend to get attracted towards heaviest mass... In GSA, Newtonian laws of
gravity are applied to find the optimum solution by a set of agents called masses.
The heavier mass presents an optimum solution in the search space
7 Introduction to Gravitational Search Algorithm
GSA is a heuristic optimization method. This algorithm is based on the law of
gravitation and mass interaction. Heuristics are techniques which seek good (near-
optimal) solutions at a reasonable computational cost without being able to

6

guarantee either feasibility or optimality, or even in many cases to state how close to
optimality a particular feasible solution is. Heuristic algorithms mimic physical or
biological processes. The basic laws used are:-
7.1 Law of Gravity
The gravitation is the tendency of masses to accelerate toward each other. It is one
of the four fundamental interactions in nature. In the Newton law of gravity, each
particle attracts every other particle with a gravitational force. The gravitational force
between two particles is directly proportional to the product of their masses and
inversely proportional to the square of the distance between them.
(1)
Where F is the magnitude of the gravitational force, G is gravitational constant, M1
and M2 are the mass of the first and second particles respectively, and R is the
distance between the two particles.
7.2 Law of Motion
Newtons second law says that when a force, F, is applied to a particle, its
acceleration, a, depends only on the force and its mass, M


(2)
Based on (1) and (2), there is an attracting gravity force among all particles of the
universe where the effect of bigger and the closer particle is higher. An increase in
the distance between two particles means decreasing the gravity force between
them as it is illustrated in Fig. 1. In this figure,

is the force that acting on

from

and

is the overall force that acts on

and causes the acceleration vector

.
In addition, due to the effect of decreasing gravity, the actual value of the
gravitational constant depends on the actual age of the universe. Eq. (3) gives the
decrease of the gravitational constant, G, with the age

7

7.3 Relation of Gravitational Constant with Age of Universe

(3)
Where G (t) is the value of the gravitational constant at time t. G (

) is the value of
the gravitational constant at the first cosmic quantum-interval of time

.

Fig 1: Every mass accelerate toward the result force that act it from the other masses
8 Gravitational Search Algorithm
In this section the algorithm is explained. In the proposed algorithm, agents are
considered as objects and their performance is measured by their masses. All these
objects attract each other by the gravity force, and this force causes a global
movement of all objects towards the objects with heavier masses. Hence, masses
cooperate using a direct form of communication, through gravitational force. The
heavy masses which correspond to good solutions move more slowly than lighter
ones, this guarantees the exploitation step of the algorithm.
In GSA, each mass (agent) has four specifications: position, inertial mass, active
gravitational mass, and passive gravitational mass. In our case we will be
considering active and passive gravitational masses only as masses of the agents.
And experimental results show that R provides better results than R^2. The position
of the mass corresponds to a solution of the problem, and its gravitational and
inertial masses are determined using a fitness function.

8

In other words, each mass presents a solution, and the algorithm is navigated by
properly adjusting the gravitational and inertia masses. By lapse of time, we expect
that masses be attracted by the heaviest mass. This mass will present an optimum
solution in the search space.
Now, consider a system with N agents (masses). We define the position of the ith
agent by:
(4)
Where

presents the position of ith agent in the dth dimension.


At a specific time t, we define the force acting on mass i from mass j as following:
(5)
Where

is the force acting on mass i due to mass j, G (t) is the gravitational


constant at time t, and

and

are the masses of agent i and j at time t,


and

are the position vectors,

is the Euclidian distance between agent i and j


and is a small threshold. G(t) is decreased with iteration according to equation (3).
(6)
(7)
Where

and

represent the mass and the fitness value of the agent i at


time t, respectively. In case of minimization problem, worst (t) and best (t) are
defined as follows:

9

(8)
(9)
Using the Newtons second law of motion, the total gravitational acceleration on the
ith agent, is calculated as:
(10)
Where

is a random number within the interval [0, 1], considered to add some
stochastic behavior to the acceleration. The velocity and position of the agents are
updated as:
(11)
(12)
Where

and

are the velocity and acceleration of agent i.






10

9 Algorithm
1) Identification of search space.
2) Initialization.
3) Agent evaluation using fitness function.
4) Update G(t) ,best(t) ,worst(t) and

for i=1,2,..N.
5) Calculation of the total force in all possible directions.
6) Acceleration and velocity calculations.
7) Updating agents position.
8) Repeat steps 3 to 7 until the stop criterion is reached.
9) End
10 Future Work
Implementation of GSA in MATLAB
Applying GSA for edge detection
Comparison with other optimisation algorithms
11 References
Esmat Rashedi, Hossein Nezamabadi-pour , Saeid Saryazdi GSA: A
Gravitational Search Algorithm , Information Sciences, Vol. 179(13),
page- 2232-2248, june 2009.
Om Prakash Verma, Rishabh Sharma, Manoj Kumar, and Neetu Agrawal. An
Optimal Edge Detection Using Gravitational Search Algorithm, IEEE 4
th

International Conference on Electronics Computer Technology (ICECT), April
2012.
De-Sian Lu, Chien-Chang Chen, Edge Detection Improvement by Ant Colony
Optimisation, Pattern Recognition Letters, Volume 29, Issue 4, 1 March 2008,
Pages 416425

Das könnte Ihnen auch gefallen