# Vision-Based Pavement Marking Detection and Condition Assessment--A Case Study
## 3 Vision-Based Line Marking Detection and Condition Assessment
### Classification and Condition Assessment  
Table 1 lists the common categories of longitudinal line markings, as specified in the Australian Standards [44]. A few categories, i.e., edge line, single barrier line, lane line and transition line, convey different instructing messages to road users, yet have a similar pattern, i.e., a continuous single line. Markings with different functional semantics require additional inferences and reasoning to distinguish them. Therefore, such marking are allocated to a single code for classification. In addition, a special category, i.e., audio-tactile marking, is also targeted for detection. These markings are designed to provide warnings to drivers who might drift from the traffic lane and prevent potential hazardous situations. They are normally associated with edge lines and center lines, thus, their presence is separately identified for individual line markings.  
Numeric features of individual line markings, i.e., width along the way, were obtained for classification and condition measurement. A width list is generated by counting the number of pixels at each position on the longitudinal direction. By analyzing the width lists statistically and determining their spatial distributions, a threshold-based method can be developed for line marking classification. The detection and classification of line marking types can be further supported by information on both the color and position. To illustrate, yellow line markings at the center of road pavement are mostly barrier lines, while those located near the boundaries are likely to be edge lines. An alternative option for efficient and accurate categorization is to use deep learning algorithms. An image dataset, including either pavement images with markings labelled correspondingly or individual marking images structured as in Figure 5, should be created. A separate category for classification is the curb, which in some cases co-exist with--or even replace--edge lines, and thus, should be identified separately.  
On top of the detection, the condition of identified markings can be assessed in terms of the worn percentage. Based on the pixel-wise extraction of line markings and their width lists, the length of worn marking segments is calculated. A threshold for width is pre-defined in order to determine whether the marking at certain position is worn or not. Then, the worn percentage of an individual line marking in the image space can be estimated according to Formula (1). The formula is expressed as follows:  
\[\text{Worm percentage}=\frac{\sum_{\text{i}=1}^{\text{N}}\text{l}_{\text{i}} }{\sum_{\text{i}=1}^{\text{N}}\text{L}_{\text{i}}}\times 100\% \tag{1}\]  
where N represents the total number of strips that the targeted line marking contains in the region of interest; l\({}_{\text{i}}\) represents the length of marking within the i\({}^{\text{th}}\) strip that is determined as worn (i.e., this segment has a smaller width than the pre-defined threshold); L\({}_{\text{i}}\) is the total length of each marking strip. For continuous line markings, such as edge lines and barrier lines, Formula (1) can be further simplified, as expressed in Formula (2).  
\[\text{Worm percentage}=\frac{1}{\text{L}}\times 100\% \tag{2}\]  
where L is the total length of the targeted marking in the region of interest and l is the length of worn segment.  
To finalize the regional worn condition measurement, the worn percentage estimated in single image frame is averaged over a road section and can be used for managerial operations.