## 2 Digital Image Processing
### Crack Extraction
#### 2.2.1 Non/Crack Image Filtering  
Because in the actual detection, most of the pavement to be treated is damage-free, if the cracks in these pictures are detected directly, it will cause unnecessary errors and affect the speed of batch detection. Therefore, before crack detection, high-frequency features are used to screen damage-free images. 1. Zero intersection detection based on high frequency characteristics of cracksIn the image, cracks belong to grayscale abrupt edges, and their grayscale values show a step-like change, which can be considered high-frequency signals. Therefore, this high-frequency feature can be defined as a characteristic of cracks. The high-frequency features of cracks can be well expressed by edge detection [13; 14], and an improved Gaussian Laplacian operator is proposed. The core idea of the Gaussian Laplacian operator [15; 16] is to combine the Laplacian operator and the Gaussian smoothing filter to detect the edge of the image. For the pavement crack image, the Gaussian smoothing filter can effectively suppress the impact noise and other signals, which plays a good auxiliary role in the expression of low-frequency information of the crack-free image. The main principle is shown in Formula (8):  
\[\left\{ \begin{array}{l}F(x,y)=\
abla^{2}[G(x,y)*f(x,y)]=\
abla^{2}G(x,y)*f(x, y)\\ \
abla^{2}G(x,y)=\frac{1}{\pi\sigma^{2}}(\frac{x^{2}+y^{2}}{2\sigma^{2}}-1)e^{ \frac{x^{2}+y^{2}}{2\sigma^{2}}}\end{array} \right. \tag{8}\]  
where \(*\) is a convolution operation [17; 18], \(F(x,y)\) is the image obtained after convolution processing, \(f(x,y)\) is the original image. Setting \(k=\frac{1}{2\pi\sigma^{2}}\), \(\
abla^{2}G(x,y)\) can be separated into two filters \(h_{1}\), \(h_{2}\). The above equation can be further improved, as shown in Formula (9):  
\[F(x,y)=[h_{1}(x)h_{2}(y)+h_{2}(x)h_{2}(y)]\otimes f(x,y) \tag{9}\]  
Because the crack has no fixed direction, a multi-directional convolution template is used to ensure that the edge information in all directions can be effectively detected. The steps are: \(f(x,y)\) takes the convolution templates of horizontal and vertical, inclined at 45 degrees and inclined 135 degrees for operation, and the results of each template operation are summed. As shown in Formula (10):  
\[\left\{ \begin{array}{l}d[i](x,y)=f(x+a,y+b)\otimes h_{1}(x)\\ D[i](x,y)=d(x+c,y+d)\otimes h_{3-i}(x)\end{array} \right. \tag{10}\]  
where \(i=[1,2]\); by finding \(d[i]\), the convolution calculation result can be obtained by the value of \(F(x,y)=\sum\limits_{i=1}^{2}D[i]\). Taking the template in the horizontal and vertical directions: \(a=d=0\), \(c=b\), \(b\in[-8.5\sigma/2,8.5\sigma/2]\). Taking the \(45^{\circ}\) and \(135^{\circ}\) formwork: \(a=c=d=-b\), \(b\in[-8.5\sigma/2,8.5\sigma/2]\). By summing the convolution results of the four templates, the high-frequency information of each main direction can be obtained, and then the enhanced convolution map can be obtained. After convolution processing, the high-frequency signals (cracks and other edges) of the image appear as zero intersections. (2) Damage free image judgment  
Considering that some zebra crossings and road signs have strong edge characteristics, but their edges have regular shape and direction characteristics, they can be removed according to the length-width ratio of their edge areas. The basic discrimination formula is shown in Formula (11):  
\[V[k]=\frac{L[k]}{W[k]} \tag{11}\]  
Among them, \(V[k]\) is the aspect ratio of the current connected domain, \(L[k]\) is the length of connected domain, and \(W[k]\) is connected domain width. The judgment steps are as follows:  
1. Calculate the length and width of each connected domain, such as \(L[k]>4 col/5\) or \(W[k]>4/5 row\) (image size is \(row\times col\)), and continue to judge;
2. Calculate the \(V[k]\) value. If satisfied by \(V[k]>10\) or \(V[k]<0.1\), determine that it is a landmark edge, and delete the entire connection;
3.