Vision Based Obstacle Avoidance Techniques
Vision Based Obstacle Avoidance Techniques
Vision Based Obstacle Avoidance Techniques
www.intechopen.com
84
problem of motion discontinuities induced by objects moving with respect to other objects
or the background (Contreras, 2007). Various integrated methods for solving these problems
have been proposed; nevertheless it is still a key challenge to employ optical flow for mobile
robot navigation. Furthermore, appearance based methods also suffer from illumination
problems and, are highly sensitive to floor stains, as well as to the physical structure of the
terrain.
Consequently, while having significant performance advantages, there are certain
drawbacks which restrict the applicability of these methods. In order to solve those
challenges, a novel obstacle avoidance method is introduced in this chapter. The method is
principally designed to fuse a Scale invariant features transform (SIFT) algorithm (Lowe,
1999), and template matching with a convolution mask technique, using a Fuzzy Logic
approach. As opposed to the Appearance based methods, previously mentioned, an occupancy
map of the environment is generated with respect to the local features and a template. The
experimental results reveal that the proposed obstacle avoidance technique allows the robot
to move efficiently within its environment and to successfully attain its local goals.
This chapter is organized as follows. In Section 2, the background knowledge to the
conventional methods is briefly introduced. In Section 3, new technique is introduced.
Section 4 provides the implementation of the behaviour-based robot and the experiment
results from both the real and simulation experiments. Section 5 provides a summary of the
work.
2. Background
In this section, optical flow based navigation techniques will first be outlined, followed by a
brief introduction of the appearance based methods.
2.1 Optical flow
Optical flow, illustrated in Fig. 1, is an approximation to the motion field, summarizing the
temporal change in an image sequence. The main idea behind the technique assumes that
for a given scene point, the corresponding image point intensity I remain constant over time,
which is referred as conservation of image intensity (Atcheson et al., 2009). Therefore, if two
consecutive images have been obtained at the following time intervals, the basic idea is to
detect the motion using image differencing. If any scene point projects onto image point
( , ) at time t and onto image point + , +
at time +
, the following equation
is inferred based on the conservative of image intensity assumption.
, ,
, +
, +
(1)
Expanding the right-hand side of the Eq. 1 using a Taylor series about , , , and ignoring
the higher order terms then by rearrangement gives the following expression.
+
(2)
www.intechopen.com
85
(3)
where, Ix, Iy and It are the partial derivatives of image brightness with respect to x, y and t,
respectively. Having one equation in two unknowns
,
for each pixel is an aperture
problem of the optical flow algorithms. To find the optical flow another set of equations is
needed, using some additional constraint. All optical flow methods introduce additional
conditions for estimating the actual flow. There are several methods employed to determine
optical flow, namely: Block-based methods, differential methods, Phase Correlation and
General variational methods (Atcheson et al., 2009). Differential methods are widely used
for navigation tasks, and are mainly based on partial derivatives of the image signal and/or
the sought flow field and higher-order partial derivatives. One of those methods is used to
estimate flow vectors to steer the robots.
2.1.1 The optical flow method proposed by Horn and Schunk
Horn and Schunk proposed one of the most important optical flow methods using an
gradient based approach (Horn & Schunck, 1981). According to their methodology, a
regularizing term associated with smoothness is added to the general flow equation, as
illustrated in Equation 3, in which neighbouring pixels have the same velocity as moving
objects, so the brightness pattern of an image changes regularly. This constraint is
demonstrated by minimizing the squares of gradient magnitudes. Smoothness of an optical
flow area can also be calculated by determining the Laplacian of optical flow vectors speed
both horizontal and vertical directions denoted by u and w respectively, illustrated in
following expressions:
Where Ei=
and Es =
(4)
(5)
Horn and Schunk, can be used as the main reference to understand and solve the given error
function, from which a pair of equations for each point can be obtained. Direct solution of
these equations such as Gaus-Jordan Elimination (Bogacki, 2005) would be very costly.
Instead, an iterative Gauss Seidel, approach is used to reduce the cost and obtain the flow
vectors, as follows (Horn & Schunck, 1981):
un+1 = u
n -
n ; vn+1 = v
(6)
where Ix Iy and It are the partial derivatives with respect to x,y and t respectively, and the
superscript n+1 denotes the next iteration, which is to be calculated and n is the last
calculated result (Horn & Schunck, 1981).
www.intechopen.com
86
| |
| |
(7)
where | | and | | are the sum of the magnitudes of optical flow in the visual hemi fields
on both sides of the robots body. The following expression gives the new heading angle
=
www.intechopen.com
(8)
87
where k, is a constant, and used to convert the obtained result to an appropriate control
parameter to steer the robot.
2.3 Appearance-based methods
Appearance based methods that identify locations on the basis of sensory similarities are a
promising possible solution to mobile robot navigation. The main idea behind the strategy is
to head the robot towards the obstacle-free position using similarities between the template
and the active images (F. Vassallo et al., 2000). The similarity between the image patterns
can be obtained by using feature detectors, involving corner based detectors, region based
detectors and distribution based descriptors (Alper et al., 2006). However, most of these
techniques consume a lot of process on time which is not appropriate for real time systems.
In order to handle this problem in mobile robot applications, algorithms are designed based
on the appearance of individual pixels. The classification of the obstacles is carried out by
using the pixel difference between the template and active image patterns.In principally;
any pixel that differs in appearance from the ground is classified as an obstacle. However,
the method requires three assumptions that are reasonable for a variety of indoor and
outdoor environments which are (Saitoh et al., 2009):
a.
b.
c.
The first assumption is to distinguish obstacles from the ground, while the second and third
assumptions are required to estimate the distances between detected obstacles and the robot.
There are several models for representing colour. The main model is the RGB(Red, Green,
Blue) model which is used in monitor screens and most image file formats however, colour
information for RGB model is very noisy at low Intensity. The RGB format is mostly converted
to a HSV (Hue, Saturation, and Value). In HSV, Hue is what humans perceive as colour, S is
saturation and Value is related to brightness, (or HIS(Hue, Intensity, Saturation) model) and in
HIS, H and S represents the same as parameters in HSV colour models but I is an intensity
value with a range between [0,1] where 0 is black and white is 1. These colour spaces are
assumed to be less sensitive to noise and lighting conditions. The flow chart of the appearance
based obstacle detection systems is illustrated in Figure 2. The input image is first convolved
with a smoothing filter to reduce the noise effects, and then smoothed image is converted to
HIS, HSV or any related colour space with respect to the developed algorithm (Fazl-Ersi &
Tsotsos, 2009). A reference area is obtained from this image which might be any shape of
geometry such as trapezoidal, triangle or square, and histogram values of this reference area
are generated (Saitoh et al., 2009). Finally, a comparison between the reference image and the
current image is made using some predefined threshold values. For instance, assume that the
bin value, Hist(H(x, y)), of the generated histogram and the threshold value,TH, are compared,
where H(x, y) is the H value at pixel (x, y). If Hist(H(x, y)) > TH then the pixel (x, y) is classified
into the safe region, or else it is classified into the obstacle region. In order to simply the
problem, the results are represented in a binary image in which the safe path is represented
with white but the obstacles are represented with black, as illustrated in Figure 3.However,
identifying places purely on the basis of sensory similarity is too simplistic; different places
may look very similar, even with a rich sensing methodology due to lighting conditions,
shadows on illumination Furthermore, for dynamic environments there might be unexpected
stains on the ground which may be the detected as an obstacle and leads the robot to an unsafe
path. An example with respect to this case is illustrated in Figure 4.
www.intechopen.com
88
www.intechopen.com
89
www.intechopen.com
90
where,
, ,
, ,
=
=
, ,
(9)
(10)
www.intechopen.com
91
When DoG images have been obtained, key- points are identified as local minima/maxima
of the DoG images across scales. This is done by comparing each pixel in the DoG images to
its eight neighbors at the same scale and nine corresponding neighboring pixels in each of
the neighboring scales. If the pixel value is the maximum or minimum among all compared
pixels, it is selected as a candidate keypoint, as shown in Figure 8.
Following steps are Key-point localization and Orientation assignment (Lowe, 1999a,
2004b). After key-point orientation has been completed, each key specifies stable 2D
coordinates, comprising x, y, scale and orientation. Finally, a signature, local descriptor, is
computed as a set of orientation histograms on 4x4 pixel neighbourhoods. Histograms have
8 bins each, and each descriptor contains an array of 4 histograms around the key-point.
This leads to a SIFT feature vector with 8x4x4 = 128 elements, illustrated in Figure 9. This
vector is normalized to enhance invariance to changes in illumination.
www.intechopen.com
92
localization and mapping. This procedure requires an appropriate and fast matching
algorithm. An example with respect to the SIFT matching is illustrated in Figure 10. The
main matching algorithm is able to find each key-point by identifying its nearest neighbor in
the database of key-points from training images. The nearest neighbor is defined as the keypoint with minimum Euclidean distance for the invariant descriptor vector, as previously
discussed.However, many features may not be matched correctly due to background clutter
in natural images or may not have correct match in the training database, and hence,
mismatches should be discarded in order to obtain accurate results. Global thresholding on
distance to the closest feature does not perform well, as some descriptors are much more
discriminative than others. Alternatively, a more effective measure is obtained by
comparing the distance of the closest neighbor to that of the second-closest neighbor, which
performs well. An appropriate threshold value regarding this comparison, called distance
ratio, is employed to reject false matches while increasing the correct matches. This value
varies from 0.1 to 0.9, depending on the application type. In this case, 0.7 is employed with
respect to the experimental results, which eliminates %90 of the false matches while
discarding almost %10 correct matches. In addition, to reject rest of all false matches, an
essential statistical method is applied to the matching space, fundamentally using the rate
between scale and orientation parameters of the feature vectors. According to this method,
even though the matching is validated between any two feature vectors, if the scale or the
orientation parameter rate between them is more than a threshold value, matching is
discarded; this procedure performs robustly to decrease false matches over all data sets
(Lowe, 1999a,2004b).
www.intechopen.com
93
(11)
Where N is the template image size; and represents average gray level in the template
and source image respectively. The goal is to find the corresponding (correlated) pixel
within a certain disparity range that minimizes the associated error and maximizes the
similarity. This matching process involves computation of the similarity measure for each
www.intechopen.com
94
disparity value, followed by an aggregation and optimization step (Zitov & Flusser, 2003).
An example related to correlation based technique is illustrated in Figure 12.
www.intechopen.com
www.intechopen.com
95
96
www.intechopen.com
97
(a)
(b)
(c)
Fig. 18. Membership function shapes, (a) Triangular, (b) Trapezoidal, (c) Gaussian.
www.intechopen.com
98
The triangular function has three parameters which can be defined as follows:
, <
, <
(12)
,
, >
, <
, <
,
, <
(13)
, >
(a)
(b)
(c)
Fig. 19. Fuzzy Operators, (a) AND, (b) OR, (c) NOT
3.4.3 Defuzzification
Defuzzification is the process of mapping from a space of inferred fuzzy control action to a
space of non-fuzzy control actions where the calculated crisp value is that which best
www.intechopen.com
99
represents the inferred control action. Several methods can be used to calculate this crisp
value such as the Centre-of-Area, Centre-of-Largest-Area, Centre-of-Sums, and Mean-ofMaximum. These methods are based on two basic mechanisms: Centroid and Maximum.
The centroid methods are based on finding a balance point while the Maximum methods
search for the highest peak of weight (area) of each fuzzy set (Ross & Hoboken, 2004).
Centre-of-Sum is used in this study which is faster than many defuzzification methods, and
is not restricted to symmetric membership functions. This process performs the algebraic
sum of individual output fuzzy sets instead of their union, illustrated in the following
equation:
(14)
(15)
www.intechopen.com
100
current image, is illustrated in Figure 21(a). Whereas the correlation function represents the
similarity between the reference and current images, as illustrated in Figure 21(b). Turning
Rate is the output function which represents the angular velocity value to steer the robot
whilst avoiding obstacles (see Figure 22). The next step is to design appropriate fuzzy rules
depending on the detail of each Fuzzy Inference System (FIS). A set of experiments were
carried out until the outputs are judged to satisfy each different situations. Table 2 displays
the fuzzy rules for the given problem.
Linguistic Variables
Linguistic Terms
SIFT
Correlation
Turning Rate
Correlation (cs)
SIFT (sm)
Weak
Medium
Strong
Weak
Sharp
Medium
Less
Medium
Sharp
Medium
Straight
Strong
Medium
Less
Straight
(a)
(b)
Fig. 21. Membership function, (a) input SIFT matching, (b) input Correlation.
www.intechopen.com
101
www.intechopen.com
102
(a)
(b)
Fig. 24. Test environment, (a) Pioneer 3-DX robot with Axis-213, (b) Robotics and
Automation Laboratory
Scenario 1: The mobile robot is required to navigate from Start Position (-6, 0) along a
forward direction in a partially cluttered enviorement and avoids one obstacle located along
its path as shown in Figure 25 (a). Performance of the image processing algorithms during
the task is given Figure 25 (b). The robots GoTo behaviour steers the robot forward
direction.
Scenario 2: The mobile robot navigates from Start Position (-6, 0) along a forward direction
in a partially cluttered enviorement and has to avoid two obstacles located along its path as
shown in Figure 26 (a) and evaluation of the image processing algorithms illustrated in
Figure 26 (b). The robots GoTo behaviour steers the robot forward direction.
www.intechopen.com
103
Scenario 3: The mobile robot navigates from Start Position (-7, 0) along a forward direction,
two obstacles located on both sides of its path as shown in Figure 27 (a). Performance of the
image processing algorithms are illustrated in Figure 27 (b). The robots GoTo behaviour
steers the robot forward direction.
Scenario 4: The mobile robot is required to navigate from Start Position (-6, 0) to the Goal
Position (3, 0.5) in a partially cluttered enviorement as shown in Figure 28(a). Performance
of the image processing algorithms during the task is given Figure 28 (b). The robots GoTo
behaviour steers the robot to a specific position which evaluates the performance of the
obstacle avoidance algortihm with a Wavefront path planning algorithm (Barraquand &
Latombe, 1991).
Figure 25 (a) presents the navigation results for scenario 1, in which the robot steers forward
until it percives the obstacle. The robot avoids the obstacle succesfully and then keeps going
forward until it detects the wall, after which it avoids the wall and continues heading
forward until it encounters the door. The robot succesfully avoids the door and continues
moving.
(a)
(b)
Fig. 25. Scenario 1, (a) Estimated Trajectory, (b) Performance of the image processing
algorithms.
www.intechopen.com
104
(a)
(b)
Fig. 26. Scenario 2, (a) Estimated trajectory, (b) Performance of the image processing
algorithms.
Figure 26(a) displays the test results for scenario 2. Two obstacles are located along the
robots path in the forward direction. The robot navigates until it detects the first obstacle,
then it avoids the obstacle and steers forward. Having detected the wall, the robot ceases
forward motion and avoids the wall, after which, it moves forward until it detects the
second obstacle, which it avoids succesfully. Subsequently, the robot avoids the door and
the wall respectively.It finally moves forward until it is ceased. The third simulation is given
Figure 27(a) where the robot attempts to move forward while passing the gap between two
obstacles. It keeps moving forward until the obstacles are detected, initially turns left,
followed by a right maneuver. After the robot succesfully avoids the objects it then resumes
its path and continues moving forward.
www.intechopen.com
105
(a)
(b)
Fig. 27. Scenario 3, (a) Estimated trajectory, (b) Performance of the image processing
algorithms.
Figure 28(a) displays the test results for scenario 4. The aim of this scenario is to test the
avoidance strategy with a Wavefront path planning algortihm (Barraquand & Latombe,
1991) provided by the Player Architecutre. The robot navigates towards the first waypoint
until it perceves the obstacle. The robot avoids the obstacle and resumes its desired path. As
there are no obstacles located along the rest of its path to the goal, the robot, therefore
navigates directly to its goal.
www.intechopen.com
106
(a)
(b)
Fig. 28. Scenario 4, (a) Estimated trajectory, (b) Performance of the image processing
algorithms.
5. Conclusion
The aim of this research was that it should be possible to develop a robust intelligent vision
based obstacle avoidance system that can be adapted to realistic navigation scenarios. Most
of the previously proposed techniques suffer from many problems. One of the most popular
of those is Apperance-based methods which basically consist of detecting pixels different in
appearance than the ground and classifying them as obstacles. Conventional Appearance-
www.intechopen.com
107
based methods utilize simple template matching techniques which are fast but highly
sensitive to lighting conditions and structure of the terrains. In addition, Optical flow-based
methodologies,, the pattern of apparent motion of objects in a visual scene caused by the
relative motion relying on apparent motion, are also highly sensitive to lighting conditions
and suffer from nose.
To overcome those problems, a new obstacle avoidance method has been proposed which is
inspired from feature matching principal. SIFT-based descriptors outperform other local
descriptors on both textured and structured scenes, with the difference in performance
larger on the textured scene. Accordingly, conventional SIFT algorithm, which is able to
perform with high accuracy and reasonable processing time, is employed to match images,
and it is finally adapted to an obstacle avoidance technique. According to the techniques,
reference image, presenting the free path, is matched with the current image during the
navigation to estimate the steering direction. However, preliminary experimental results
reveals that despite the SIFT algorithm performs better than conventional methods with
stained environment and compensates lighting failures, they may fail or produce several
mismatched features due to low resolution or vibration caused by navigation over rough
terrains. Therefore instead of using each method individually, conventional template
matching method and SIFT-based descriptor are fused by using an appropriate Fuzzy Fusion
algorithm which increases the accuracy and compensates the errors caused by lighting
conditions and stains.
In order to verify the performance of the proposed obstacle avoidance algorithm, Real
experiments to guide a Pioneer 3-DX mobile robot in a partially cluttered environment are
presented, Results validate that proposed method provides an alternative and robust
solution for mobile robots using a single low-cost camera as the only sensor to avoid
obstacles.
6. References
Alper, Y., Omar, J. & Mubarak, S. (2006) Object tracking: A survey. ACM Comput. Surv., 38,
13.
Atcheson, B., Heidrich, W. & Ihrke, I. (2009) An evaluation of optical flow algorithms for
background oriented schlieren imaging. Experiments in Fluids, 46, 467-476.
BArraquand, J. & Latombe, J.-C. (1991) Robot motion planning. A distributed representation
approach. International Journal of Robotics Research, 10, 628-649.
Bogacki, P. (2005) HINGES - An illustration of Gauss-Jordan reduction. Journal of Online
Mathematics and its Applications.
Brooks, R. A. (1986) ROBUST LAYERED CONTROL SYSTEM FOR A MOBILE ROBOT.
IEEE journal of robotics and automation, RA-2, 14-23.
Contreras, E. B. (2007) A biologically inspired solution for an evolved simulated agent.
Proceedings of GECCO 2007: Genetic and Evolutionary Computation Conference.
London.
Desouza, G. N. & Kak, A. C. (2002) Vision for mobile robot navigation: A survey. IEEE
Transactions on Pattern Analysis and Machine Intelligence, 24, 237-267.
Driankov, D. (1987) Inference with a single fuzzy conditional proposition. Fuzzy Sets and
Systems, 24, 51-63.
www.intechopen.com
108
F. Vassallo, R., Schneebeli, H. J. & Santos-Victor, J. (2000) Visual servoing and appearance
for navigation. Robotics and Autonomous Systems, 31, 87-97.
Fazl-Ersi, E. & Tsotsos, J. K. (2009) Region classification for robust floor detection in indoor
environments. Lecture Notes in Computer Science (including subseries Lecture Notes in
Artificial Intelligence and Lecture Notes in Bioinformatics). Halifax, NS.
Guzel, M. S. & Bicker, R. (2010) Optical flow based system design for mobile robots. 2010
IEEE Conference on Robotics, Automation and Mechatronics, RAM 2010. Singapore.
Horn, B. K. P. & Schunck, B. G. (1981) Determining optical flow. Artificial Intelligence, 17, 185203.
Lowe, D. G. (1999) Object recognition from local scale-invariant features. Proceedings of the
IEEE International Conference on Computer Vision. Kerkyra, Greece, IEEE.
Ross, T. J. & Hoboken, N. J. (2004) Fuzzy Logic with engineering applications Hoboken,
NJ:Wiley.
Saitoh, T., Tada, N. & Konishi, R. (2009) Indoor mobile robot navigation by central following
based on monocular vision. IEEJ Transactions on Electronics, Information and Systems,
129, 1576-1584+18.
Souhila, K. & Karim, A. (2007) Optical flow based robot obstacle avoidance. International
Journal of Advanced Robotic Systems, 4, 13-16.
Wen-Chia, L. & Chin-Hsing, C. (2009) A Fast Template Matching Method for Rotation
Invariance Using Two-Stage Process. Intelligent Information Hiding and Multimedia
Signal Processing, 2009. IIH-MSP '09. Fifth International Conference on.
Zitov, B. & Flusser, J. (2003) Image registration methods: A survey. Image and Vision
Computing, 21, 977-1000.
www.intechopen.com
ISBN 978-953-307-909-7
Hard cover, 452 pages
Publisher InTech
How to reference
In order to correctly reference this scholarly work, feel free to copy and paste the following:
Mehmet Serdar Guzel and Robert Bicker (2011). Vision Based Obstacle Avoidance Techniques, Recent
Advances in Mobile Robotics, Dr. Andon Topalov (Ed.), ISBN: 978-953-307-909-7, InTech, Available from:
http://www.intechopen.com/books/recent-advances-in-mobile-robotics/vision-based-obstacle-avoidancetechniques
InTech Europe
InTech China