Parking Line Based SLAM Approach Using AVM/LiDAR Sensor Fusion for Rapid and Accurate Loop Closing and Parking Space Detection

Parking is a challenging task for autonomous vehicles and requires a centimeter level precision of distance measurement for safe parking at a destination to avoid collisions with nearby vehicles. In order to avoid collisions with parked vehicles while parking, real-time localization performance should be maintained even when loop closing occurs. This study proposes a simultaneous localization and mapping (SLAM) method, using around view monitor (AVM)/light detection and ranging (LiDAR) sensor fusion, that provides rapid loop closing performance. We extract the parking line features by utilizing the sensor fusion data for sparse feature-based pose graph optimization that boosts the loop closing speed. Hence, the proposed method can perform the loop closing within a few milliseconds to compensate for the accumulative errors even in a large-scale outdoor environment, which is much faster than other LiDAR-based SLAM algorithms. Therefore, it easily satisfies real-time localization performance. Furthermore, thanks to the parking line features, the proposed method can detect a parking space by utilizing the accumulated parking lines in the map. The experiment was performed in three outdoor parking lots to validate the localization performance and parking space detection performance. All of the proposed methods can be operated in real-time in a single-CPU environment.


Introduction
In recent years, autonomous driving technology has been developed rapidly. Many global companies, such as Google, GM, BMW, and Mercedes-Benz are investing heavily in research and development for the commercialization of autonomous vehicles by 2020, and they are aiming for fully autonomous driving by 2025 [1]. The autonomous parking system, which increases the convenience for the driver, is also being actively investigated [2]. Parking is a challenging task for autonomous vehicles. A centimeter level precision of distance measurement is necessary for parking safely at a destination to prevent collisions. Therefore, increasing research is being conducted on parking assist systems (PAS), which have been incorporated in commercial vehicles in recent years, as well as autonomous valet parking (AVP) systems that perform fully autonomous parking [3]. An AVP system is a completely driver-free parking system, in which an autonomous driving vehicle searches for a parking space and then parks itself without a driver's assistance. For an autonomous vehicle to perform accurate and safe parking by itself, precise and real-time localization technology must be available.
GPU. Moreover, these present the advantage of real-time performance. To the best of our knowledge, ours is the first study that utilizes the parking lines to achieve rapid and accurate localization in a parking lot. The remainder of the paper is organized as follows: Section 2 describes the process of integrating AVM/LiDAR sensors, the process of extracting the parking line feature, and the method of loop closing and detection of a parking space. Section 3 presents the experimental results and discussions. Finally, the paper is summarized and concluded in Section 4.

Proposed Method
This section describes the procedure of our proposed method. The overall algorithm architecture is shown in Figure 2. The processing pipeline (Supplemental Material) focuses mainly on extracting the parking line features because it is mandatory for accurate localization and mapping of the proposed SLAM method. First, the AVM and LiDAR sensor are fused as a point cloud and are preprocessed through the sensor fusion module. After the preprocessing process, the AVM data is transformed into a binarized image, and the LiDAR data is transformed into a ground-removed point cloud such as in Figure 2b. Secondly, the parking line feature extraction module filters the AVM obstacle data by using the LiDAR data in order to extract a parking line feature. Then, it registers the sensor fusion data in the map as shown in Figure 2d Figure 3 shows that the process of sensor fusion. The AVM sensor data has an image data format of 640 × 480 pixels and is converted to a point cloud of size 21.2 × 13.8 m. The actual distance of the AVM image was measured empirically by putting the traffic cones at the edge of the image as shown in Figure 3a. The size of the AVM sensor, 21.2 × 13.8 m, is a specific value and can be varied depending on the sensor configuration. The LiDAR data has a 3D point cloud data format of [x, y, z].

AVM and LiDAR Sensor Fusion
To maintain an identical dimension to the LiDAR sensor, the AVM data is converted into [x, y, 0] format. The converted AVM data is aligned with the LiDAR data based on the LiDAR coordinate system such as in Figure 3b. Axis alignment was performed manually and fifty samples of AVM/LiDAR sensor data were used for accuracy. Additional preprocessing algorithms are executed on the sensor fusion data to extract a parking line feature. First, the adaptive binarization algorithm is applied to the AVM data in order to obtain the parking line markings in the parking lot. Then, the LiDAR data is transformed into a ground-removed point cloud data by applying Autoware's space filter [18] as shown in Figure 3c.
The region of interest (ROI) should be set because the distortion of the AVM image hinders the parking line feature extraction process. Thus, the ROI of 0.7 × 2.8 m is empirically set to the area, and only data within this area is used.

Parking Line Feature Extraction
As the parking line feature affects both the loop closing module and the parking space detection module, an accurate parking line feature extraction is essential. This section describes the method for effectively extracting the parking line features with LiDAR-based filtering in a typical urban parking lot environment.

Point Cloud Registration and LiDAR-based Filtering
The sensor fusion data is registered in the map together with the odometry generated using the laser odometry and mapping (LOAM) algorithm. The LOAM is a SLAM algorithm that has an average travel error of 0.59% per meter and a rotation error of 0.0014% ( • /m) over an 800 m run on the KITTI dataset [8]. When all the 64 channels of data are used as the input for the LOAM, real-time odometry cannot be achieved owing to the computational overload. To maintain the real-time performance, only the 16 channels of the Velodyne sensor data are used as the input.
As the AVM data contains not only the parking lines but also the other binarized data as shown in Figure 4a, the other binarized data should be filtered to extract the parking line features. Hence, the LiDAR data are registered simultaneously with the AVM data to remove the other binarized data from the map. The process of filtering is as follows: 1. Given the LiDAR data, apply the Euclidean clustering algorithm to develop each vehicle cluster. 2. For each vehicle cluster, apply the convex hull algorithm to obtain the boundary points of each cluster. 3. Generate the convex polygons from each convex cluster, as shown in Figure 4c. 4. Then, the AVM data present within the convex polygon are determined as the outliers and erased from the map, as shown in Figure 4d.
Eventually, the LiDAR data is not only used to measure the closest distance but also to filter out the noise data as shown in Figure 4. Both can be possible because of the AVM/LiDAR sensor fusion.

Parking Line Feature Extraction
After acquiring filtered point clouds, we should extract the parking line features. To extract the parking line features exclusively, the registered data is divided into areas of 1.5 × 1.5 m considering the size of one parking space, as shown in Figure 5a. The detailed process is as follows: 1. For each area, apply the Euclidean clustering algorithm to cluster the adjacent data. 2. Apply principal component analysis (PCA) to each cluster to obtain the main axis of the cluster.
The main axis is used to obtain the major direction of the parking line. 3. Obtain the data distribution of each cluster along the main axis, as shown in Figure 5c. The data distribution is represented as a histogram.
In order to distinguish the parking line feature from the data in the histogram, we utilized two statistical approaches: the characteristic of the maximum number of scanned points and the kurtosis of the data distribution. First, the method of the characteristic of the maximum number of scanned points is presented in Figure 6. In the case shown in Figure 6a, the number of scanned points at a certain distance that contains the parking line data tends to be larger than that of the other distance. Here, the maximum number of scanned points of the distance tends to be larger than the sum of the mean µ and two times the standard deviation 2σ. Then, the data corresponding to the distance is obtained as a parking line feature. In contrast, in Figure 6b, the maximum number of scanned points tends to be equal to or smaller than µ + 2σ. Then, this data distribution is considered as an outlier, and no corresponding data is extracted as a parking line feature. Secondly, kurtosis is also used as a criterion to extract parking line features. Kurtosis is a statistic component that indicates the data's sharpness. Kurtosis of the normal distribution is three. When D is a set of data, kurtosis can be obtained as follows: where µ is the mean of the data and σ is the standard deviation. E(D 3 ) and E(D 4 ) represent the third and fourth moments of the data, respectively. As the data distribution of the parking line features is relatively sharper than the other data distribution, kurtosis tends to be higher than that of the normal distribution. Eventually, the histogram satisfying max(D) > µ + 2σ and kur(D) > 3 is regarded as a parking line feature, and the data of the corresponding max(D) is obtained as a parking line feature.

Parking Line Feature Based Loop Closure
After extracting the parking line features, they are registered in the map as candidates for the loop closure method. As the parking line has a simple repetitive pattern that is likely to fail to identify a correct loop, we also used the point cloud of the parked vehicles with the parking line features, as shown in Figure 7. The detailed procedure of the loop closure module is as follows: (i) Register the parking line feature in the map as a candidate for loop closing along the LiDAR odometry. (ii) When the vehicle revisits a place, the loop closure module attempts to detect a loop inside the distance threshold 5 m. (iii) When a loop is detected, the loop closure module attempts to match the separated parking line features by using the generalized iterative closest point (GICP) [19]. (iv) If the matching is successful, the relative pose calculated by the GICP is passed to the general graph optimization (g2o) module to create a loop [20]. The proposed method compensates for the accumulative error by optimizing the following error function: ( where x i implies the six degree of freedom (DOF) pose of the vehicle at the i-th node and is defined as follows: x = x 1 · · · x i · · · x n T represents the vector of n vehicle poses. z i,i+1 implies the six DOF relative pose between two temporal nodes generated by the LiDAR odometry module. z i,j implies the six DOF relative pose between two non-temporal nodes calculated by the GICP method. The detailed definition of z (·,·) is as follows: R represents the rotation matrix and t represents the translation vector.ẑ(·, ·) represents the expected measurement of two nodes, and Σ (·,·) represents the covariance matrix between two nodes. Finally, e 2 Σ = e T Σ −1 e represents the squared Mahalanobis distance when the covariance matrix is Σ. The illustration of the pose graph SLAM is shown in Figure 7. The black circle and solid line represent the vehicle pose (node) and the constraint (edge), respectively.

Parking Space Detection
The accumulated parking line features in the map are also utilized to detect parking spaces. As the size of the parking space is already determined by the Parking Act, we consider that the size parameter of the parking space is fixed. We assume that the parking spaces in one parking zone share the long-connected line. We proposed the fast and accurate method to detect the parking spaces per each parking zone by utilizing the above assumption.
We categorized the parking line features into two: main line and support line, as shown in Figure 8a. We assume that one parking zone contains a single main line and several support lines perpendicular to the main line. The main line is defined as the long-connected line between each parking space. The support lines are defined as the vertical lines from the main line. In this study, we assumed that the parking lines are rectangular. Thus, we first extract the main line and then sequentially extract the support lines, which are perpendicular to the main line.

Main Line Extraction
The process of extracting the main line is as follows: (i) Apply the region growing cluster algorithm to the parking line features to cluster the parking lines per each separated parking zone. (ii) For each clustered data, apply the PCA again to obtain the major direction of the main line, as shown in Figure 8b. (iii) Obtain the data distribution along the major direction of data, and represent it as a histogram, as shown in Figure 8c.
As the main line has a long tail in a certain direction, the main line can be extracted by returning the distance having the maximum number of scanned points in the histogram. The extracted main line is shown in Figure 8d.

Support Line Extraction
Finally, the location of the support line perpendicular to the main line should be estimated to detect a parking space. The optimal position of the support line can be obtained by optimizing the error using the least squares method, as shown in Figure 9. The following least squares equation can be used to determine the optimal position of the support line: where a represents the slope of the support line perpendicular to the main line and b j represents the intersection of the main line and support line. p i = [x i y i ] T represents a point of a parking line feature. B is the set of b values within the range not exceeding the length of the main line, and P is the set of points located on the main line. As Equation (5) is a linear regression, a closed-form solution exists. a is determined when the main line is determined because the support line is perpendicular to the main line. Therefore, the optimal solution of the b j , b j+1 can be obtained as follows: whereȳ represents the average of all y i andx represents the average of all x i . We determine the optimal location of the support line with the minimum error by solving Equation (6). When the main line and support line are extracted, the parking spaces can be detected as a combination of these lines, as shown in Figure 8a. Moreover, the occupancy of the parking space can be determined without complex processing. If a convex polygon is present inside a parking space, this parking space is determined as an occupied parking space. Otherwise, it is determined as a vacant parking space.

Experiments and Results
The experiment was carried out for both SLAM localization performance and parking space detection performance. For the experiments, the autonomous vehicle of Seoul National University Dynamic Robotic Systems (DYROS) Laboratory (shown in Figure 10) was used. The autonomous vehicle platform consisted of a single Velodyne HDL-64E S2 sensor, four AVM cameras, and an X11 RTK GPS sensor. The Velodyne sensor was mounted on the top center of the vehicle, and the AVM cameras were mounted on the front, left, right, and rear of the vehicle. The GPS sensor was mounted behind the Velodyne sensor.
The experiments were conducted in three outdoor parking lots of the Advanced Institute of Convergence Technology located in Gwanggyo-dong, Suwon city ( Figure 11). The vehicle moved at an average speed of 8 (km/h) in the parking lot. The PC used in the experiment was an on-board PC (Intel i7-8700, 16 GB of RAM) mounted on the vehicle. Real-time performance was achieved by using a CPU without a GPU. In addition, a robotic operating system (ROS) [21] was used for algorithm development and visualization.
For evaluating the SLAM localization performance, X91 RTK GPS was used as the ground truth. The X91 GPS has an error of approximately 20 (mm) in the fixed state. The results are compared only in the fixed state for accurate experimental results. The absolute translation error (ATE) is used as a performance measuring criterion [22], as shown in Figure 12a. The detailed meaning of the ATE with reference to [22] is as follows: where p i ,p i represent the i-th point of the ground truth and the estimated trajectory, respectively. ∆p i , ∆R i represent the i-th position error and rotation error, respectively.   The detection rate of parking spaces is verified using recall and precision indicators. The accuracy of parking space estimation was verified by comparing the distance error and angular error of the intersection between the actual parking space and the estimated parking space, as shown in Figure 12c.

Parking Line Based SLAM Trajectory Evaluation
For evaluating the localization performance of the proposed SLAM, experiments were conducted on parking lot 1 (PL1), PL2 and PL3. We also conducted experiments using LiDAR sensor-based SLAM, Cartographer [11], and LOAM [6] in order to compare the performance of the proposed method. Cartographer w/ and w/o loop closing (LC) were used for the experiment to compare the effects of loop closure. The ATE [22], which signifies the Euclidean distance between the ground truth data and estimated trajectory, was used, as shown in Figure 12a. Table 1    In PL2-1, the proposed method obtained the smallest RMSE 0.941 m and smallest standard deviation 0.455 m at a total path length of 413.08 m. Moreover, the maximum error of 3.432 m was obtained, which is marginally smaller than the 3.459 m of Cartographer w/LC. However, Cartographer w/LC obtained the smallest mean, median, and minimum errors (0.905 m, 0.853 m, and 0.064 m, respectively).

SLAM Method Case Max (m) Mean (m) Median (m) Min (m) STD (m) RMSE (m)
In the case of Cartographer w/o LC and LOAM without the loop closure process, owing to the accumulative error over time, the maximum errors obtained relatively were large: 3.411 m and 3.814 m in PL1 and 4.386 m and 4.384 m in PL2-1, respectively.
To verify the real-time performance of the proposed SLAM, we compared our result with that of Cartographer W/ Loop Closing to demonstrate the improvement in the computational time. Table 2     In the case of (c,g,h), the timestamp matching occurs sparsely, and the path appears relatively sharp.

Parking Space Detection Performance
The detailed meaning of recall and precision in parking space recognition with reference to [16] is explained in detail as follows: where true positive (TP) implies the number of correctly detected parking spaces, false negative (FN) implies the number of missed parking spaces, and false positive (FP) implies the number of incorrectly detected parking spaces. Figure 12b shows the significance of TP, FP, and FN in our results in detail. Table 3 presents the results of the parking space detection experiments performed at the two parking lots by using the proposed method. The results are the average of five repeated experiments. To ensure diversity of results, the experiments were carried out both in the case of parking spaces being mostly occupied and in the case of being mostly vacant. In PL1/1, which is a case of fully occupied parking spaces, distinct parking line features could not be extracted owing to the parked vehicle data. A recall of 97.6% and precision of 94.7% were obtained. These values are relatively lower than the recall (97.9%) and precision (97.4%) for PL1/2, which is a case of mostly vacant parking spaces. Similarly, in PL2/1, which is a case of almost occupied parking spaces, a recall of 97.0% and precision of 96.7% were obtained. These are lower than the recall (98.6%) and precision (96.9%) for PL2/2, which is a case of mostly vacant parking spaces. PL1/3 and PL2/3, which are cases of mostly vacant parking spaces, exhibited the highest detection performance, with recalls of 98.1% and 98.8%, and precisions of 97.6% and 97.4% respectively. Therefore, the recall and precision performance are relatively high in the case of vacant parking space detection. It is considered that it would be effective in practical parking scenarios.

Accuracy of Estimated Parking Space
The accuracy of the estimated parking space was validated by the distance error and angle error between the intersection of the actual parking line and the estimated parking line, as shown in Figure 12c. The intersection represents a cross point between the main line and support line in the parking line. The estimated parking space has been verified only within the ROI area because the AVM sensor data has been used only inside the ROI area.
The experiments were conducted by randomly selecting twenty of the estimated parking spaces and calculating the distance error and angle error. The distance error e t of the two intersections was calculated from the Euclidean distance between the actual intersection and estimated intersection, and the angle error e θ was calculated from the angle difference between the actual parking line and estimated parking line.
p real represents the actual intersection in the ROI area, and p est represents the estimated intersection. In addition, v real represents the vector in the direction of the parking line at the position p real , and v est represents the vector in the direction of the parking line at the position p est . The experimental results reveal that the maximum and minimum distance errors obtained were 0.073 m and 0.057 m, respectively, for PL1; and 0.065 m and 0.045 m, respectively, for PL2 (where the parking lines are relatively distinct). The maximum and minimum angular errors obtained were 0.056 rad and 0.032 rad, respectively, for PL1; and 0.058 rad and 0.038 rad, respectively, for PL2.

Discussion
In the case of the localization, the proposed method was more accurate than LOAM [6] used as a front-end of our method with respect to the ATE even when the autonomous vehicle searched the parking spaces for a long time. Compared to the LOAM, the average RMSE 0.75 m and maximum error 1.1 m were improved. In practical parking scenarios, precision at the centimeter level is mandatory. Therefore, the proposed method is more suitable for a parking scenario than LOAM.
Comparing the performance of the proposed method with Cartographer [11] w/loop closing, there was no remarkable improvement in the accuracy aspect. However, Cartographer consumed over 1.3 s of the maximum computational time to perform the loop closing, whereas the proposed method consumed approximately 0.04 s. The real-time SLAM performance is crucial to achieve parking without colliding with the vehicle parked nearby. Moreover, Cartographer also requires an additional recognition algorithm to detect the parking space. This is because the mapping process of Cartographer was not designed to detect parking spaces. The proposed method is capable of detecting parking spaces by utilizing the accumulated parking lines in the map from the mapping process. Moreover, the proposed method operates in real-time in a single-CPU environment.
In the case of the parking space detection experiment, the average recall and precision obtained were over 97%, which can be considered high. However, the remaining 3% has to be overcome. In order to achieve more reliable performance, the major reasons of the performance degradation need to be discussed. Figure 15 shows the two main factors impacting performance degradation. As shown in Figure 15, the performance deteriorated significantly when the parking lines were concealed by vehicles and when there were shadows. To improve the recall performance (Figure 15a), a method of predicting the parking space using probability can be considered. The prediction of parking spaces is represented as the probability of actual availability. Moreover, the probability is increased when an actual parking space is available in the adjoining area. In addition, a method that is not affected by outliers can be considered to improve the precision performance (Figure 15b). With the recent developments in deep learning technology, we can train a neural network model that is less influenced by shadows. The precision performance could be increased by utilizing this approach.

Conclusions
In this study, we propose a parking line-based SLAM approach using AVM/LiDAR sensor fusion for rapid and accurate loop closing and parking space detection. The parking line features are extracted by using the principal component analysis (PCA) and histogram analysis after LiDAR-based filtering and are used for both the localization and mapping process. The parking line-based rapid loop closure method is proposed for accurate localization in the parking lot.
The experimental results reveal that the accuracy of the proposed SLAM was higher than those of two LiDAR-based SLAM algorithms. Moreover, the computational time for loop closing is significantly shorter than that of the Cartographer SLAM algorithm, and real-time performance can be achieved.
For the mapping aspect, the accumulated parking line features in the map are classified as either the main line or support line to detect parking spaces. Then, the parking space is detected as a combination of the main line and support line. The experiments reveal that the average recall and precision are 98% and 97%, respectively. Furthermore, the average distance error and rotation error of the estimated parking space are 0.05 m and 0.03 rad, respectively.
The proposed method presents the limitation that only data within the region of interest (ROI) can be measured so dynamic obstacles cannot be detected. However, as we mentioned in the section concerning obstacle filtering, we can utilize the LiDAR data to measure the closest distance to a dynamic obstacle by generating convex polygons. Moreover, the proposed method works only where there are parking lines in the parking lot, and it considers only the rectangle-shaped parking spaces. Our future work is aimed at developing a parking space detection method for parking spaces of various shapes.