# Accurate and Detailed Transversal Road Section Characteristics Extraction Using Laser Scanner
## 2 Algorithm
### Road Boundaries Detection Functions  
The determination of the limits of the road is of interest for two main reasons. On the one hand, this calculation allows delimiting the area of interest for subsequent operations, such as the detection of obstacles [35], for example. On the other hand, in some roads, especially in urban areas, external lanes are not delimited by lines on one side, but their boundary is the curb that separates the road from the sidewalk. Initially, two methods are proposed that make use of the geometric characteristics that suppose the end of the roadway. Method I: Study of the variations in the detection of each layer of the laser scanner. The intersection of each layer of the laser scanner with the plane of the road causes a roughly circular or elliptical section, depending on the relative inclinations, and may become other conics such as hyperbolas or parabolas, although these special cases are not relevant for this paper. The presence of the sidewalk at a height which is greater than the roadway involves cuts at different heights, so that, at the position of the curb, gradients occur at the Y (lateral) and Z (vertical) coordinates, which are significantly greater than those detected on the roadway (Figure 2). Figure 1: Flowchart for the extraction of the transversal characteristics of the road. Figure 2: Illustration for Method I for the detection of roadway boundaries. In this way, laser scanner spots are studied in both dimensions, and the points where both gradient levels are higher than preset thresholds are detected. These thresholds have been adjusted using practical data from several scenarios, firstly using ideally simulated environments with typical dimensions, and then with practical data. Subsequently, the DBSCAN clustering function is applied in order to group all the points belonging to the curb and eliminate potential false detections, for example, because of vertical elements in the vicinity of the road. This process provides a set of points that distinguish the roadway from the surroundings because of the abrupt changes detected in curves detected by each layer of the laser scanner. Then, in order to eliminate other false points that do not belong to the road, we proceed to adjust the points set to a plane using the M-estimator algorithm SAmple Consensus (MSAC), a variant of the RANdom algorithm SAmple Consensus (RAMSAC). Method II: Study of the separation between intersecting sections of consecutive laser scanner layers  
This method is based on [27]. Considering the intersections of the layers of the laser scanner with the ground surface, the radius of the circumferences (assuming perpendicularity between the vertical axis of the laser scanner and the ground) depends on the height, so considering that the roadway is not in the same vertical dimension as the adjacent zones, a gradient in the radius of said intersection curves can be expected. It should be noted that both methods are based on the same concept (heights differences), but they provide quite different results, as practical tests demonstrate. Figure 3 shows an example of the pavement-sidewalk transition and how the radius difference \(\Delta r_{i}\) of the detection circles between two consecutive layers varies. Although the curb could be identified as the zones of greater gradients, it has been shown that there are several cases where this solution induces errors in the detection of them, because of the presence of other obstacles near the curbs or the path boundaries; this fact inhibits the identification of those boundaries (there are multiple candidates). The solution proposed in the method is to try to identify areas with constant radius differences within a predefined tolerance, which allows determining the roadway area.