# Real-Time Traffic Sign Detection and Recognition Method Based on Simplified Gabor Wavelets and CNNs
## 4 Traffic Sign Detection
### Simplified Gabor Wavelet Model
We synthesized the eight filtering maps into one map, denoted as \(\phi^{\prime\prime}_{\omega,\theta}(x,y)\), by finding the maximum value of the eight filtered map at each pixel with Equation (6), where \(i=0,1\) and \(j=0,1,2,3\):  
\[\phi^{\prime\prime}_{\omega,\theta}(x,y)=\max\Bigl{\{}\phi^{\prime}_{\omega_{ i},\theta_{j}}(x,y),i=0,1\text{ and }j=0,1,2,3\Bigr{\}} \tag{6}\]  
Orientation selection involved adopting an equal half plane angle selection method, which meant that \(\theta_{j}\) belonged to \((0,\pi)\) instead of \((0,\,2\pi)\), because the filters' cores had the same edge extraction capacity in the opposite direction, which allowed the filtering time to be reduced to half of the original. As the direction of the simplified Gabor kernel was divided into the two-dimensional plane in the same step, it balanced every orientation and robustness to several factors, such as translation and rotation. This algorithm is invariant to translation, because it does not depend on the position of the appearance of the blob in the scene. The output feature \(\phi^{\prime}_{\omega_{i},\theta_{j}}(x,y)\) is the result of convoluting the image (\(\mathrm{I}(x,y)\)) with the simplified Gabor filter, and its pattern is dependent on the two parameters: \(\theta\) and \(\omega\). As the edges are the local feature in the image, the purpose of convolution is to extract the local features of the image, so the size of the convolution kernel should be sufficiently small. In our approach, the best window size was \(5\times 5\) throughout the experiments. The purpose of simplified Gabor preprocessing was to strengthen the edge, but there are many algorithms for edge enhancement, such as the Canny algorithm and the TGW algorithm with specific parameters, etc. In the following text, we analyze and compare the computational complexities of the three different edge-detection algorithms: The Canny algorithm, TGWs, and SGW. In our context, the computation of an algorithm refers to the number of real additions and real multiplications required for edge detection. The number of additions does not count the operations required for generating the pixel coordinates in our analysis. As FFT was employed for TGW-based edge detection, we assumed that the image size was a power of two. For the SGW-based and the Canny algorithms, the image could be any size. The SGW features at any pixel position were able to be computed individually and efficiently. From Table 1, it is seen that the SGW-based approach achieved the best computational effect, compared to the Canny and traditional Gabor wavelet methods. The orientation number and scale of the traditional Gabor wavelet and simplified Gabor wavelet methods were two and four, respectively. Although the SGW was a little faster than the Canny, the output of the Canny algorithm was a binary image, which would cause a lot of image information loss, and could not ensure sufficient detection and classification performances. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithms** & **No. of Additions** & **No. of Multiplications** \\ \hline Canny & \(40N^{2}\) & \(17N^{2}\) \\ TGW & \(48N^{2}\log_{2}N^{2}+16N^{2}\) & \(32N^{2}\log_{2}N^{2}+32N^{2}\) \\ SGW & \(18N^{2}\) & \(16N^{2}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the computational complexities of edge-detection algorithms of the Canny, traditional Gabor wavelet (TGW), and simplified Gabor wavelet SGW algorithms [30]. The eight SGW filter kernels are shown in Figure 3. The first and second rows of Figure 4 show the example of the speed limit 60 sign, convoluted by SGW with the eight SGW filter kernels. The image (o) in the third row shows the result of synthesizing the eight filtering maps into one map by finding the maximum value of eight filtered maps at each pixel with Equation (6). As shown in image (a) to image (h) in Figure 4, the orientation of the edge of the traffic sign that coincided with the SGW filter was obviously strengthened.