Added citations

This commit is contained in:
2018-08-08 10:34:15 +02:00
parent 13b230397a
commit 56be83152a
6 changed files with 149 additions and 79 deletions

View File

@@ -2,24 +2,25 @@
The very first task that needed to be accomplished was to detect the ball,
which is uniformly red-colored and measures about 6 cm in diameter. We decided
to use a popular algorithm based on color segmentation. The idea behind this
algorithm is to find the biggest red area in the image and assume that this is
the ball. First, the desired color needs to be defined as an interval of HSV
(Hue-Saturation-Value) values. After that, the image itself needs to be
transformed into HSV colorspace, so that the regions of interest can be
extracted into a \textit{binary mask}. The contours of the regions can then be
identified in a mask, and the areas of the regions can be calculated using the
routines from the OpenCV library. The center and the radius of the region with
the largest area are then determined and are assumed to be the center and the
radius of the ball.
to use a popular algorithm based on color segmentation \cite{ball-detect}. The
idea behind this algorithm is to find the biggest red area in the image and
assume that this is the ball. First, the desired color needs to be defined as
an interval of HSV (Hue-Saturation-Value) values. After that, the image itself
needs to be transformed into HSV colorspace, so that the regions of interest
can be extracted into a \textit{binary mask}. The contours of the regions can
then be identified in a mask \cite{contours}, and the areas of the regions can
be calculated using the routines from the OpenCV library. The center and the
radius of the region with the largest area are then determined and are assumed
to be the center and the radius of the ball.
It is often recommended to eliminate the noise in the binary mask by applying a
sequence of \textit{erosions} and \textit{dilations}, but we found, that for
the task of finding the \textit{biggest} area the noise doesn't present a
problem, whereas performing erosions may completely delete the image of the
ball, if it is relatively far from the robot and the camera resolution is low.
For this reason it was decided not to process the binary mask with erosions and
dilations, which allowed us to detect the ball even over long distances.
It is sometimes recommended \cite{ball-detect} to eliminate the noise in the
binary mask by applying a sequence of \textit{erosions} and \textit{dilations},
but we found, that for the task of finding the \textit{biggest} area the noise
doesn't present a problem, whereas performing erosions may completely delete
the image of the ball, if it is relatively far from the robot and the camera
resolution is low. For this reason it was decided not to process the binary
mask with erosions and dilations, which allowed us to detect the ball even over
long distances.
The advantages of the presented algorithm are its speed and simplicity. The
major downside is that the careful color calibration is required for the
@@ -61,20 +62,21 @@ The scoring function calculates, how different are the properties of the
candidates are from the properties, an idealized goal contour is expected to
have. The evaluation is happening based on two properties. The first property
is based on the observation, that the area of the goal contour is much smaller
than the area of its \textit{enclosing convex hull}. The second observation is
that all points of the goal contour must lie close to the enclosing convex
hull. The mathematical formulation of the scoring function looks like the
following \todo{mathematical formulation}:
than the area of its \textit{enclosing convex hull} \cite{convex-hull}. The
second observation is that all points of the goal contour must lie close to the
enclosing convex hull. The mathematical formulation of the scoring function
looks like the following \todo{mathematical formulation}:
The contour, that minimizes the scoring function, while keeping its value under
a certain threshold is considered the goal. If no contour scores below the
threshold, then the algorithm assumes that no goal was found. Our tests have
shown, that when the white color is calibrated correctly, the algorithm can
detect the goal almost without mistakes, when the goal is present in the image.
The downside of this algorithm, is that in some cases the field lines might
appear the same properties, that the goal contour is expected to have,
therefore the field lines can be mistaken for the goal. We will describe, how
we dealt with this problem, in the following section.
threshold, then the algorithm assumes that no goal was found.
Our tests have shown, that when the white color is calibrated correctly, the
algorithm can detect the goal almost without mistakes, when the goal is present
in the image. The downside of this algorithm, is that in some cases the field
lines might appear the same properties, that the goal contour is expected to
have, therefore the field lines can be mistaken for the goal. We will describe,
how we dealt with this problem, in the following section.
\section{Field detection}