You are on page 1of 8

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

Analysis of algorithms based on artificial vision

using detection of edges for the evasion of obstacles
Ayala Mara Jos, Gallegos Joselyn y Rojas Darwin.
{mjayala3, jegallegos1, djrojas1}
Universidad de las Fuerzas Armadas ESPE
Departamento de Elctrica y Electrnica
Quito- Ecuador 2016

Abstract - In the present article there is described a

comparative analysis of methods that give solution to the
problem of evasion of obstacles for a mobile robot. The above
mentioned system integrates methods of artificial vision for the
detection of edges. The proposed system determines the edges
of the obstacles that form the environment of the robot using
algorithms as the Hough's transformed one, detector of edges of
Sobel and Canny.
Key words: Robotic, artificial vision, Canny, Sobel, Hough



The field of the robotics includes a wide spectrum of

applications, between which designs appear for
mobile terrestrial, aquatic, air and spatial robots.
Great part of the investigations nowadays they are
focused in technologies of autonomous navigatio n.
In case of mobile robots, the processes of knowledge
associated with the planning of movements, they are
a competition of the control of navigation [1].
On having provided local or global information of
the environment that makes a detour to the mobile
robot, in addition considering the mission that this
type of robot must fulfill, the control of navigation is
a module entrusted to take decisions according to the
given information, to manage to reach aims of the
surest and ideal form.
Inside the mobile robotics there exists a great
investigation dedicated to algorithms and systems of
autonomous navigation, so much in environme nts
structured like in unknown areas, which includes the

study of technologies that handle sensory merger,

artificial vision, cooperative systems, handle real
time of random events, systems of communicatio ns,
mechanical systems between other topics that they
must be studied in depth to achieve the independence
of a robotic system [2].
The control of navigation tries to integrate all the
topics mentioned previously to achieve the planning
of paths, depending on the royal environment and the
mission of the robot. In this respect the major
achievement in mobile robotics has been the pair of
robots that were sent to the planet Mars: Spirit and
Opportunity, which possess one of the systems of
navigation more outposts that one has developed [3].
Being the robotics a field of born study years
behind, it tells nowadays with a considerable record
as for works of investigation, developments and
offers that to a great extent they sustain the bases for
tests of major scope and inclusive new offers or lines
of investigation. In this part of the article there appear
the principal methods developed for evasion of
obstacles using artificial vision.
The first one of these, called VFF, was born in 1999,
with Khatib's exposition, this one was taking as a
point of item the system of forces raised by Craig
Reynolds, [4] in which there are related the obstacles,
an aim (point of arrival) and the direction of the robot
of a vectorial way.
The method VOA ("Obstacle Velocity
Approach") and his improvement the method BOA

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

in 2009 [5], they were seeking to make a mapping of

the surrounding objects to the robot in every instant
for hereby, admit the free spaces where the robot
could move without smashing; in these algorithms
there was done a calculation of areas of danger of
shock and safety to move, they were depending on
the angle in the one that was meeting the robot in
relation the analyzed obstacles, his speeds and
present and future positions. Hereby it was ordering
him to the robot to happen for the areas that were
implying less danger of collision.
Inside the possibilities of controlling a mobile
robot of autonomous form there exist methods that
imply that the robot must be capable of taking his
own decisions and in case obstacles appear it must
find viable ways between a point of item and a point
of destination, to this it is known like path planning
and there exist great quantity of methods between
them the graphs of Voronoi, Visibility graphs, Road
Maps, between others.
characterization of images like the Bag of Words ",
"Sift", Visual LandMarks, with them one seeks to
obtain more information about the environment of
the robot.
The studies realized by Carnegie-Mello n
University (CMU) [5], [6], [7] served to shape the
world of the robot in a matrix form; the cells of the
array were defined as values of probability of
existence of obstacles C (ij) ". While more big one
was the value of the cell (C (ij)), bigger it is the
certainty of which an obstacle occupies this cell. The
force of repulsion generated by the obstacles was
directly proportional to the value C (ij) and
inversely proportionally to the square of the distance
between the cells and the robot.

mistakes and of providing a major autonomy

increasingly correct in the distance of the mobile
robot. The references that are mentioned are the most
representative on mobile robots. The presented work
will focus in the problem of the evasion of obstacles
using potential fields with mobile robots.

It is a tool used to detect figures in a digita l

image that they can be expressed mathematica lly,
such as straight lines, circles or ellipses. The Hough's
transformed ones determine the location of curves
parametrized inside an image. In this case they will
use for the location of straight lines and circles. If the
curves corresponding to two points are intercepted,
the point of intersection in Hough's space
corresponds to a line in the space of the image that
happens for these two points. Generalizing, a point
set that they form a straight line, they will produce
sinusoids that are intercepted in the parameters of
this line. The algorithm of the Hough's transformed
one uses a counterfoil, called accumulator, which
dimension is equal to the number of unknown
parameters of the problem, in case of a straight line
the dimension of the accumulator will be two,
corresponding to the values quantified for (,) [8].
To be able to represent all the possible straight lines
that could appear in the image, we can use the
equation of the straight line in polar coordinates:
+ =

Fig 1. Straight to an arbitrary point (xo, yo)



Between the different types of robots of agreement

to his architecture they find the mobile robots, in
which the principal task to developing is to evade
obstacles during his path from an initial point
towards his goal, for it different series of algorithms
have developed with the purpose of minimizing

Will natural range be had [0, 2]. Then, there

transforms every point (x, y) of the image of origin,
in the points (i, i), the space defined for (, ), it is
named a Hough's space for the set of straight lines in
two dimensions. For an arbitrary point in the Fig 2
with coordinates (x0, y0), are the straight lines that
happen for this point the couples (, ), with r =
x*cos + y*sin Where (The distance between the
line and the origin) is it determined for . Does this

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

correspond to a sinusoidal curve in the space

(i, i), that is only for this point.

= 2 + 2

Or using the absolute value of the terms:

= | | + | |

This approximation, he behaves also as a derivative,

this wants to say, that zero is done in areas of
constant intensity and his values are proportional to
the degree of change of intensity, in areas where the
values of the pixels are variable. It is common to
refer to the magnitude of the gradient or his
approximation simply as "the gradient.
Fig 2. Intersection of points

If the curves corresponding to two points are

intercepted, the point of intersection in Hough's
space corresponds to a line in the space of the image
that happens for these two points. Generalizing, a
point set that they form a straight line, they will
produce sinusoids that are intercepted in the
parameters of this line.

Detector of edges Sobel

The detector of edge Sobel uses the mask that
appears in the Fig 4 to bring near in digital form the
first derivatives Gx and Gy, of such a way, that the
gradient in the central point of a neighborhood can
be calculated by the detector Sobel. The operator of
Sobel looks for axes in the horizontal and vertical
directions by means of the use of masks and
combines this information by means of the
magnitude [10].

2 3

4 5 6
7 8 9
Fig 4. Mask
Fig 3. Sinusoids formed by a set of points

An edge, inside an image, it is considered to be a type
of discontinuity, by this what it can be detected using
derivatives of the first and second order. The
derivative of the first order for an image is the
gradient, which, for a function in two dimensio ns,
f (x, y) it comes given for:

f = [ ] = [

The magnitude of this vector is:

= () = [2 + 2 ] 2
2 2

The operator Sobel (K=2), supposes that is more

sensitive to the diagonal edges that that of Prewitt
(K=1) though in the practice there is few differe nce
between they.
Gradient Row
-1 0

- 0 K
-1 0 1
= (3 + 26 + 9 ) (1 + 24 + 7 )

Gradient Column
-1 K
0 1


= [( ) + ( ) ]

= (7 + 28 + 9 ) (1 + 22 + 3 )

This quantity can be simplified in some cases,

omitting the square root of the operation:

= [ 2 + 2 ]2

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

= {[(7 + 28 + 9 ) (1 + 22 + 3 )]2 +
[(3 + 26 + 9 ) (1 + 24 + 7 )]2 }2

Canny's algorithm
One of the most important methods to realize a
global detection of edges on an image is the
as Canny's method.
technology, which is characterized for being
optimized for the detection of differential edges,
consists of three principal stages: leaked, initia l
decision, and hysteresis. The first stage consists
of the leaked one of convolution of the first
derivative of a Gaussian normalized discreet
function on the image realized in two directions :
horizontal and vertical [11]. The Gaussian
function possesses two fundamental parameters,
average value m, and standard deviation s. In this
case, the average value is void, being the
equation that defines the Gaussian filter of the
() = exp (



where k it is chosen so that the maximum of g(x)

is the unit in his discreet version. For the
accomplishment of the filter used in the first
stage, the previous expression stems, being

) =
( ) = 2 exp ( 2 )
( )


The algorithm of detection of Canny's edges uses

a filter based on the first derivative of The
Gaussian one. Since it is capable to the present
noise in information of image without
processing, the original image is transformed by
a Gaussian filter. The result is an a bit blurry
image with regard to the original version. This
new image does not meet affected by the only
pixel of noise in a significant degree.

Fig 5. Example of mask 5x5 for Gaussiano filter with =1.0

Detection of the gradient of the image

The edge of an image can appear in differe nt

directions, for what Canny's algorithm uses four
filters to detect horizontally, vertically and
diagonally in the edges of the blurry image.

= [2 + 2 ]2
= arctan (

To obtain the slimming of the width of the edges,

obtained with the gradient, the suppression realizes
of not maximums up to achieving edges of a pixel of
width. Also the hysteresis of threshold applies to
herself, this function of hysteresis that is based on
two thresholds; one wants to reduce the possibility of
false edges.
To fulfill the hysteresis of Threshold a process of
double is realized Threshold with which the pixels of
the edge were deciding: the pixels are marked by
value over a threshold T1; are marked those pixels
connected to the first whose value is above a second
threshold T2 (T2<T1). This will eliminate false
edges or edges double, at the same time that allows a
related result.
Later they present the results obtained on having
implemented the algorithms in Matlab, observing the
differences that exist between every method and the
existing edges in the image.

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

Hough's algorithm presents a method based on an

accumulator that uses family of straight lines for
every point or pixel in the image, hereby there
decides the straight line that it contains to all the
consecutive points in the image, the presented lines
depend on the existing noise in the photo to realize a
correct description, this method presents the
principal lines of edge, realizing a modification in the
equation of the families of straight lines it is allowed
identify circular edges. A significant difference with
the other two analyzed methods that it shows the
royal photo with the most significant principal edges
without modifying the image. The quantity of
presented edges they depend on the programming of
the algorithm, hereby we can obtain a very detailed
image of edges.

Fig 6. Original Image

Fig 8. Sobel Horizontal's algorithm

Fig 7. Hough's algorithm

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

whole image without importing the relevancy of the

objects or figures that they find in the above
mentioned image, hereby what we can observe as
result is an image that presents many distortion, the
edges can be observed but in a slightly
understandable way. The method has two variatio ns
(vertical and horizontal), which present the same
disadvantages mentioned previously, but they can be
useful in cases where the image to using is in a
specific position already be horizontal or vertical.
When the original images have a good contrast and
with few quantity of noise, this one is the best
method adapted for the detection of edges, besides
which his time of calculation is limited.

Fig 9. Sobel Vertical's algorithm

Fig 11. Algoritmo de Canny

Fig 10. Algoritmo de Sobel

Sobel's method is one of the simplest since it allows

to observe to the edges as a type of discontinuity that
can be detected using the derivative of the first order
that is the gradient, he presents neither any type of
filter of noise, nor any type of improvement in the
image, proves to be a general discretization of the

Canny's algorithm presents the improvement of the

basic concept of the Sobels method, but to avoid the
whole noise generated of the image begins with a
Gaussian filter, then the gradient is realized and
finally a process of thresholding to determine which
are the pixels of edge, with this, the exact edges of
the whole image is obtained, showing much more
detailed the edges and exact, it is a very exact method
to the moment to show the edges of the image, on
having compared Canny's algorithm with that of
Sobel we observe that it proves to be much differs
with images to color existing very much noise in

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

sodal, the noise disappears glaringly on having used

images to white and black, in this case the edges are
detected better but incomplete in comparison with

The algorithm of canny presents problems when he is

in royal environments, since a royal environment
presents many details and this in turn does that the
algorithm tries to present the edges of all these details,
which appears as many present spots in the image
without having a clearer and general figure of the
obstacles and the way that must continue.

The edges correspond to the components of high

frequency of the image. It is possible to use the
algorithm of canny as a filter to realize the detection of
edges. This filter acts on the images in scale of gray, for
what there is necessary a transformation of the space of
color of the image. On the image delivered by the filter
of canny it is possible to apply the Hough's transformed
one that is an algorithm of extraction of characteristics
to identify the present lines in the image. This stage
returns an arrangement of parameter that shape the
existing straight lines in the image.


There are multiple algorithms, based on the

different methods of evasion of obstacles,
however the choice of which to use will
depend on the application, the environment in
which it develops the robot and the availab le
devices at the time of its implementation.
The algorithm of the Transformed of Hough
performs well in images with little noise. The
images must not have too much noise or more
than 256 pixels that belong to a line already
that each cell that accumulates is 8 bits
The edge detection using the method of
Canny allows you to highlight the
effectiveness of the method when it comes to
check what are the regions previously
The algorithm of sobel is the method that
presents more problems in the description of
the edges, since it is capable to the noise, and
presents a distortion with regard to the
original image, this problem is solved using
the derivations, as long as the orientation of
the image is born in mind to improve the

Hughs's algorithm does not react so much to

the noise, thus present of a much more
specific way the principal edges of the image
nevertheless limits itself to presenting only
linear and circular edges.
With Canny's algorithm, to the being an
algorithm that contains a filter, is achieved to
determine thinner and definite edges,
obtaining hereby a much clearer image and
with major detail of the edges.

[1] O. Khatib. Real-Time Obstacle Avoidance for

Manipulators and Mobile Robots. IEEE International
Conference on Robotics and Automation, 1985
[2] Ballard, D. y Brown, C. (1982) Computer Vision,

[3] W. Craing Reynolds. Steering Behaviors For
Autonomous Characters. Sony Computer Entertaimen t
America. 1986
[4] P. Fiorini and Shillerz. Motion Planning in dynamic
Environments. Int. Journal of Robotics Research, Vo l.
17, No. 7, 1998 pp. 760-772
[5] A. Elfes. Sonarr-based Real_world Mapping and
Navigation. IEEE Journal of Robotics and Automation,
Vol. RA-3, No 3, 1987, pp.249-265.
[6] H.P. Moravec and A. Elfes. High Resolution Maps fro m
Wide Angle Sonar. IEEE Conference on Robotics and
Automation, Washington D.C., 1985, pp. 116-121.
[7] Behan J. y OKeeffe D., (2007). The develoment of an
autonomous service robot. Implementation: LucasThe library assistant robot. Springer-Verlag.
[8] GONZLES Rafael C. y WOODS Richard E.. Digital
Imaging. Addison-Wesley, 1992
[9] Borenstein J. y Koren Y., (1985). A Mobile Platform for
Nursing Robots. IEEE Trans. on Industrial Electronics ,
Vol. 32, No.2, pp. 158-165.
[10] Pea O, Len C, Rojas E. Methods of Planning of
routes and evasion of obstacles for a Robot Wizard",
University Santo Tomas, Colombia.
[11] ] Rock Or, Len C, Red E. Planations Methods of
Routes and Evasion of Obstacles for a Robot Assistant ",
University Saint Thomas, Colombia.

Joselyn Estefana Galleos
Valenzuela was born in Quito,
Ecuador, on 07 November 1992.
Made his primary and secondary
studies in the Educational Unit
"Perez Pallares" south of Quito,
graduating bachelor of physicomathematical. At the moment is

Universidad de las Fuerzas Armadas ESPE. Ayala, Gallegos, Rojas. Solucin evasin de obstculos.

finishing eighth level of Electronic Engineering in

Automation and Control, at the Universidad de las
Fuerzas Armadas ESPE. Currently she works as a
professor in the Pre-Universitario Stephen Hawking
south of Quito.
Mara Jos Ayala Farfn was born in Quito,
Ecuador, on 1 September 1992.
Graduated from the National
College Experimental "Maria
Angelica Idrobo" in the year
2010 of bachelor of physicomathematical and is currently
studying the eighth level of the
race in Electronic Engineering in
Automation and Control at the
Universidad de las Fuerzas Armadas ESPE.

Darwin Javier Rojas Quishpe was born in Quito,

Ecuador on 22 May 1990.
Made his primary studies in
the school Educational Unit
FAE. Then continued his
secondary studies at the
College Educational Unit FAE
graduating with the specialty
of Physical mathematician. At
the moment he studied at the
Universidad de las Fuerzas Armadas ESPE, the
career of electronics with mention in Automation and