# Road Pavement Damage Detection Based on Local Minimum of Grayscale and Feature Fusion
## 2 Methods  
### Feature Points Based on Local Minimum of Grayscale  
Computer vision usually relies on the local analyses of feature points, such as corner, spot and edge, to achieve object recognition and image matching [23]. Therefore, there has to be enough feature points with high degree of discrimination, which can be  
Figure 1: Flow chart of the methodology used in this work.  
located clearly. In the image of road pavement, the grayscale values of cracks and caves are significantly less than those of normal pavement. Feature points based on the local minimum of grayscale can be used for block segmentation. To obtain the feature points with local minimum of grayscale, one should first calculate gradient of each pixel point and find the zero-gradient points with positive and negative gradient around them. In practical cases, some methods have been proposed to extract these feature points. For instance, the local minimum of grayscale is identified by two-dimensional gradients at four directions based on bidimensional empirical mode decomposition (BEMD) [24]. Moreover, a morphological grayscale reconstruction method was used to search for the local maximum of grayscale [25].  
In this work, we propose an improved method to obtain these feature points with local minimum of grayscale as follows. First, the pavement images are preprocessed via reversing the grayscale of each pixel point. Then, we search for the local maximum, namely the local minimum of grayscale, in all the image windows. In detail, an amplitude value of each image window is set to adjust various brightness by  
\[P_{\text{A}}=P_{\text{th}}\times(G_{\text{max}}-G_{\text{min}})+G_{\text{min}}, \tag{1}\]  
where \(P_{\text{th}}=0.1\) is the detection threshold value, and \(G_{\text{max}}\) and \(G_{\text{min}}\) are the maximum and minimum of grayscale in image window. Then, the first-order difference in all the pixel points is calculated, and all the points of zero first-order difference with opposite signs of first-order difference around them are selected. Among these picked points, we choose the points whose grayscale is larger than the amplitude \(P_{\text{A}}\) as peak points. Further, all the peak points are ordered by their grayscale, and a minimum distance \(P_{\text{dist}}=16\) is set to remove redundant peak points. These ordered peak points are taken in turn as a center of circle with radius \(P_{\text{dist}}\), and the remaining peak points in this circle are removed. So far, we obtain a few distant peak points, which are called local extremum points. Figure 2a,c show two typical pavement image windows of different brightness and cracks and the local extremum points obtained by our method.  
Next, feature points will be picked up from the local extremum points, based on the average and variance of grayscale in the neighborhood of these points. If the neighborhood of the \(i\)-th extremum points has the distribution of grayscale for \(N\) pixel points \(G_{i}(x,y)\), the average and variance of the neighborhood are  
\[E_{i}=\frac{1}{N}\sum_{(x,y)\in\{N\}}G_{i}(x,y) \tag{2}\]  
and  
\[\sigma_{i}=\sqrt{\frac{1}{N}\sum_{(x,y)\in\{N\}}(G_{i}(x,y)-E_{i})^{2}}. \tag{3}\]  
To filter noise from normal pavement, we only retain the points whose grayscale average \(E_{i}/E<95\%\) and \(\sigma_{i}>0.05\) as feature points (\(E\) is the average grayscale of the image window). Figure 2b,d show the feature points picked up from extremum points of (a)/(c). After removing these noise points, we order the feature points by their grayscale. Based on these feature points, image windows can be cut into several blocks. These feature blocks can then be used for image recognition or feature matching.