## 1 Introduction  
Automatic parking space detection is a crucial technical challenge in the fields of autonomous driving systems, surveying and mapping, security monitoring, and urban traffic management, as illustrated in Figure 1. Parking space recognition is used for automatic parking in Figure 1a and for parking lot mapping in Figure 1b. Additionally, autonomous driving systems require reliable parking space recognition and annotation capabilities to enable Automated Valet Parking (AVP) and enhance driving safety. AVP is a future vision for fully automated autonomous vehicles [1]. Parking space recognition is essential for guiding vehicles to park smoothly and accurately in Automatic Parking Assist Systems (APAS). In parking space recognition, challenges such as complex environments, parking space diversity, sensor limitations, and computational complexity place high demands on algorithm robustness. For instance, in dynamic and complex settings, lighting conditions can vary significantly over time and with weather changes [4], leading to issues like shadows, glare, and low light at night, which can cause recognition errors or failures due to the limitations of visual sensors. Moreover, parking lots feature various parking spaces (such as parallel, perpendicular, and angled parking spaces) [5, 6, 7]. Therefore, parking space recognition algorithms must be capable of handling multiple types of parking spaces in real time. In the field of parking space recognition for autonomous driving, onboard cameras have become the primary environmental perception device due to their cost advantage. Consequently, current methods for identifying and annotating parking spaces generally rely on image vision [8]. These methods include straight-line extraction for parallel and perpendicular parking spaces, corner detection for angled parking spaces, and deep learning techniques [5, 6, 7, 9, 10, 11]. However, image vision is significantly affected by conditions such as heavy rain, fog, darkness, and varying light levels, which restrict its effectiveness in target recognition. In contrast, three-dimensional (3D) point cloud [12] offers significant advantages. Lidar-based 3D point cloud vision is highly resistant to interference from light sources and shadows and can provide exceptionally accurate 3D poses, delivering rich information for environmental perception. As hardware manufacturing technology advances, the cost of Lidar is expected to decrease further, potentially revitalizing environmental perception methods that rely on laser-based vision. However, pure Lidar data has limitations in localization, particularly in complex and unknown environments, where cumulative errors can compromise its accuracy. If the integration accuracy of the IMU and Lidar is low, the resulting point cloud map may exhibit deviations that are amplified during the point cloud mapping process. This can lead to inaccurate boundary recognition of parking spaces, ultimately impacting the effectiveness of automatic annotation. The IMU (Inertial Measurement Unit) provides short-term accurate pose estimation by measuring the carrier's acceleration and angular velocity. Still, it is susceptible to disturbances from temperature changes, vibrations, and electromagnetic fields. To overcome these challenges, tightly coupling Lidar and IMU allows for leveraging both strengths, achieving high-precision and robust automatic parking space labeling. In this approach, we integrate the IMU with Lidar's high-precision pose detection, tightly couple the two, and use the IMU to compensate for Lidar's pose. Based on this compensated pose, we calculate the vehicle's Lidar odometry in unknown environments, localize and map parking scenes using the Lidar data, and ultimately achieve automatic parking space labeling. Figure 1: Example of parking space recognition. (**a**) Parking space corner points detection and parking space feature extraction for automatic valet parking [2]; (**b**) Parking space recognition and parking lot mapping based on Lidar [3].