Traffic sign detection based on Haar and adaBoost classifier

Intelligent transportation system is a hot issue in the field of computer vision. Traffic sign detection is an important part of intelligent transportation system. A traffic sign detection algorithm based on Haar feature and AdaBoost algorithm is proposed in this paper. Firstly, Haar features are extracted from the positive and negative samples of the training set, and then these features are used to train the AdaBoost cascade classifier. Finally, the Haar features are extracted from the test image, and the possible traffic signs in the image are detected, the experimental results show that the method can achieve good detection effect, and provide a new idea for the detection of traffic signs.


Introduction
Traffic sign recognition (TSR) is a kind of traffic sign recognition system, which uses computer vision technology to collect the image of traffic signs, and then detect and recognize the traffic sign image. Finally, the obtained traffic sign information is returned to the driver, so as to enhance the driving assistance function of traffic vehicles. This system can effectively help the driver to know the road conditions in front, and improve the safety rate of traffic travel. At present, the detection of traffic signs is mainly divided into the detection based on color or shape information and the detection based on deep learning [1]. Traffic sign detection based on color space can be divided into RGB space and HSV space. This method can detect candidate regions quickly and efficiently, but they are vulnerable to illumination [2].Detection method based on shape uses the particularity of the shape of traffic signs to detect their edges, but when the traffic signs are blurred or occluded, the accuracy of the algorithm will decline [3]. With the rapid development of deep learning, image detection and recognition algorithm based on neural network has gradually been widely concerned by scholars [4]. Ciresan et al [5] used the deep network to detect and recognize traffic signs, and achieved better results, but because of the gradient descent method, the training time is too long and the practicability is poor.
A traffic sign detection method based on Haar feature and AdaBoost classifier is proposed in this paper. The Haar features of positive and negative samples are extracted by using integration method, and then the weak classifier is constructed by using these features, and the strong classifier is constructed by AdaBoost. Finally, the trained classifier is used to detect the traffic signs in the real image.

Haar features
Haar feature is a kind of rectangular feature proposed by Papageorgiou et al [6]. It is defined as the difference of the sum of gray values of pixels in adjacent regions in the image. That is, the sum of pixels in the white area minus the sum of pixels in the black area, which reflects the gradient change from the white region to the black region. Lienhart et al. [7] further extended the Haar rectangular feature library to 15 feature sets, as shown in Figure 1   weight   . In order to compute Haar features, a large number of windows need to be scanned. Such will reduce the speed of training and detection. In order to ensure the real-time requirement, the integral image method can be used to quickly calculate the eigenvalues of the rectangle.
The integral image value at a point ( , ) x y in image ( , ) I x y is defined as follows: Where ( ', ') I x y represents the gray pixel value at the ( ', ') x y position of the image. After getting the integral graph, Haar eigenvalues can be calculated. for feature template x2, as shown in Figure 2, the gray values of regions A and B can be expressed as SAT i j is the pixel of rectangular block A and i j respectively. Then the eigenvalues is as follows (4) The introduction of integral graph, the eigenvalue calculation of rectangular block is independent of the image coordinate, and the eigenvalue can be obtained by the four endpoint coordinates of the rectangle, which greatly improves the calculation speed.

AdaBoost classifier
AdaBoost is a kind of boosting algorithm, which was proposed by Freund [8]. It can train different weak classifiers for the same sample set, and then integrate them by weight to get a strong classifier. The algorithm is as follows: Suppose the training sample set is: ⑤ The sample weights are updated according to the optimal weak classifier; Step 3: Building strong classifiers From the training steps of the algorithm, we can see that each sample is given the same weight initially, and then the weights are updated every iteration, which improves the weight of the wrong classification samples and reduces the weight of the correct classification samples. According to the new sample data, a new weak classifier is obtained. Finally, the weak classifiers are integrated into strong classifiers by weighting

Traffic sign detection based on Haar feature and AdaBoost classifier
Haar features can better describe the structure and edge features of traffic signs, AdaBoost classifier can form a strong classifier by constantly self-adjusting when the sample database is not ideal. Therefore, an traffic sign detection method based on Haar feature and AdaBoost classifier is proposed in this paper.
During training, Haar features are extracted from positive samples and negative samples respectively, and then are sent to AdaBoost classifier for training to obtain the classification model. During detection, Haar features are extracted from each frame of the video, and then is sent to AdaBoost classifier for detection, finally, the detected traffic signal area is labeled. The algorithm block diagram is shown in Figure 3.  As can be seen from Figure 4 and Figure 5, The method proposed in this paper can effectively detect the traffic signs in the image, and can achieve multi-target detection. This is because Haar features can better describe the image edge, texture and line features. Table 1 shows detection time of some traffic signs using our proposed algorithm. It can be seen from the Table 1 that the detection time is within 0.2 seconds, which can ensure the real-time detection. This is because the integral image method is used in the calculation of Haar features, which speeds up the calculation of features.  Table 2 shows the comparison results between our algorithm and reference [9]. It can be seen from the Table 2 that our algorithm is more efficient. This is because each strong classifier of cascade classifier can obtain almost all traffic sign samples and a large number of non traffic sign samples. Although it takes a lot of time to detect traffic signs, it reduces the overall calculation time. average detection time 0.1213s 4.4654s

Conclusions
The traffic sign detection algorithm based on Haar feature and AdaBoost proposed in this paper can effectively detect the traffic signs in the image, and can achieve multi-target detection. No matter what the traffic environment and traffic signs, the better results can be achieved.