Page 37 - Krész, Miklós, and Andrej Brodnik (eds.). MATCOS-13. Proceedings of the 2013 Mini-Conference on Applied Theoretical Computer Science. Koper: University of Primorska Press, 2016.
P. 37
ure 3: Learning set of images with numerals in Figure 4: Testing set of speed limit traffic signs that
the standard font of Slovenian traffic signs. Each was used for the definition of the parameters and
numeral is saved in its own image. testing the performance of the traffic sign symbol
recognition program.
array where we keep only the pixels that lie on the numeral.
distances between pairs of bins at the same positions. We
After that there is the main part of the D2 shape func- use the 1-nearest neighbor method to classify the numerals
tion computation. We first check if we managed to find a in the image because we only have one sample per numeral
sufficient number of coordinate pairs from pixels positioned and one numeral represents one class.
on the numeral - if we did, we continue with the computa-
tion and if we did not, we abort the computation for the 4. RESULTS
recognition of the current region and continue with the next
one. The reason for this check is further insurance from the For the definition of the parameters and testing the perfor-
presence of noise - if we did not find a sufficient number mance of the traffic sign symbol recognition program, we
of coordinate pairs, then we can conclude that the detected acquired a testing set of 46 speed limit traffic signs. Figure
area is too small and consider it being noise. 4 shows this testing set of traffic signs. It contains images of
traffic signs taken under different conditions - different light-
Then we visit the first half of the array with randomly gen- ing, orientation of the sign, size of the sign, quality of the
erated x and y coordinates and in each step we compute the image etc. This difference between the conditions of each
Euclidean distance between a pixel in the first half of the image was achieved on purpose - to prove the robustness of
array and a corresponding pixel in the second half. When the program.
we are done with the computation, we sort the distances by
size and normalize them so they all have values from 0 to The procedure of defining the parameters was performed
1 - we do that by dividing every distance with the maxi- with the help of auxiliary functions and the final values of
mum distance obtained in the analyzed region. The latter is the parameters are saved in a configuration file. They are
necessary for the comparison of images with different sizes. as follow:
As a result we therefore return a matrix of these normalized
and sorted distances for each of the detected numerals. • number of randomly generated pixels for the D2 shape
function computation: 100000,
3.3 Learning and comparing the input image
with the learning set • percentage of randomly generated pixels that have to
lie on the symbol: 0.1 (10%),
Apart from the main function of the traffic sign symbol
recognition program, we use two more auxiliary functions • number of learning iterations for the images from the
to properly recognize the traffic sign - one for teaching the learning set: 5,
program on the images from the learning set and one for
the recognition of the input image using the images from • number of iterations of comparison between the input
the learning set. Figure 3 shows the learning data set. It image and images from the learning set: 10,
is important to note that the font for Slovenian traffic signs
is standardized which means that one sample per numeral • number of bins in distance histograms: 20.
is sufficient. We will describe the learning process and the
comparison in this Section. Once the parameters were defined, we ran the traffic sign
symbol recognition program on the testing set of traffic signs
For the learning, we go through the 10 images from the learn- to test the performance of the program. The final result is
ing set and for each of them we run the symbol recognition 42 of 46 accurately recognized speed limit traffic signs, which
code as many times as is defined by the input parameter is approximately a 91.3% accuracy.
and we then average the results. For the comparison of the
input image with the learning set, we repeat the recogni- 5. COMPARISON WITH STATISTICAL
tion multiple times so that we increase the probability of MOMENTS
an accurate recognition - we then return the result that was
recognized in most of the repetitions. It should be noted When developing the program for traffic sign recognition,
that we convert distances into histograms, which is needed we first tried using statistical moments as the recognition
because a direct comparison of distances would provide in- method. In particular, we used a combination of normalized
accurate results as the distance values are too specific. We central moments, which are invariant to the position as well
compare each bin of the distance histogram of the current as to the size of the object, and Hu moments, which are fur-
numeral on the input image with the histogram of the cur- ther invariant to rotation. The framework of the prototype
rent image from the learning set and compute the Euclidean is very similar to the program described in Section 3, and
the learning and testing sets of traffic sign images are the
m a t c o s -1 3 Proceedings of the 2013 Mini-Conference on Applied Theoretical Computer Science 37
Koper, Slovenia, 10-11 October
the standard font of Slovenian traffic signs. Each was used for the definition of the parameters and
numeral is saved in its own image. testing the performance of the traffic sign symbol
recognition program.
array where we keep only the pixels that lie on the numeral.
distances between pairs of bins at the same positions. We
After that there is the main part of the D2 shape func- use the 1-nearest neighbor method to classify the numerals
tion computation. We first check if we managed to find a in the image because we only have one sample per numeral
sufficient number of coordinate pairs from pixels positioned and one numeral represents one class.
on the numeral - if we did, we continue with the computa-
tion and if we did not, we abort the computation for the 4. RESULTS
recognition of the current region and continue with the next
one. The reason for this check is further insurance from the For the definition of the parameters and testing the perfor-
presence of noise - if we did not find a sufficient number mance of the traffic sign symbol recognition program, we
of coordinate pairs, then we can conclude that the detected acquired a testing set of 46 speed limit traffic signs. Figure
area is too small and consider it being noise. 4 shows this testing set of traffic signs. It contains images of
traffic signs taken under different conditions - different light-
Then we visit the first half of the array with randomly gen- ing, orientation of the sign, size of the sign, quality of the
erated x and y coordinates and in each step we compute the image etc. This difference between the conditions of each
Euclidean distance between a pixel in the first half of the image was achieved on purpose - to prove the robustness of
array and a corresponding pixel in the second half. When the program.
we are done with the computation, we sort the distances by
size and normalize them so they all have values from 0 to The procedure of defining the parameters was performed
1 - we do that by dividing every distance with the maxi- with the help of auxiliary functions and the final values of
mum distance obtained in the analyzed region. The latter is the parameters are saved in a configuration file. They are
necessary for the comparison of images with different sizes. as follow:
As a result we therefore return a matrix of these normalized
and sorted distances for each of the detected numerals. • number of randomly generated pixels for the D2 shape
function computation: 100000,
3.3 Learning and comparing the input image
with the learning set • percentage of randomly generated pixels that have to
lie on the symbol: 0.1 (10%),
Apart from the main function of the traffic sign symbol
recognition program, we use two more auxiliary functions • number of learning iterations for the images from the
to properly recognize the traffic sign - one for teaching the learning set: 5,
program on the images from the learning set and one for
the recognition of the input image using the images from • number of iterations of comparison between the input
the learning set. Figure 3 shows the learning data set. It image and images from the learning set: 10,
is important to note that the font for Slovenian traffic signs
is standardized which means that one sample per numeral • number of bins in distance histograms: 20.
is sufficient. We will describe the learning process and the
comparison in this Section. Once the parameters were defined, we ran the traffic sign
symbol recognition program on the testing set of traffic signs
For the learning, we go through the 10 images from the learn- to test the performance of the program. The final result is
ing set and for each of them we run the symbol recognition 42 of 46 accurately recognized speed limit traffic signs, which
code as many times as is defined by the input parameter is approximately a 91.3% accuracy.
and we then average the results. For the comparison of the
input image with the learning set, we repeat the recogni- 5. COMPARISON WITH STATISTICAL
tion multiple times so that we increase the probability of MOMENTS
an accurate recognition - we then return the result that was
recognized in most of the repetitions. It should be noted When developing the program for traffic sign recognition,
that we convert distances into histograms, which is needed we first tried using statistical moments as the recognition
because a direct comparison of distances would provide in- method. In particular, we used a combination of normalized
accurate results as the distance values are too specific. We central moments, which are invariant to the position as well
compare each bin of the distance histogram of the current as to the size of the object, and Hu moments, which are fur-
numeral on the input image with the histogram of the cur- ther invariant to rotation. The framework of the prototype
rent image from the learning set and compute the Euclidean is very similar to the program described in Section 3, and
the learning and testing sets of traffic sign images are the
m a t c o s -1 3 Proceedings of the 2013 Mini-Conference on Applied Theoretical Computer Science 37
Koper, Slovenia, 10-11 October