Lidar-based parking space and parking stall detection method and system, and storage medium

CN117746669BActive Publication Date: 2026-08-21GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211113086.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2026-08-21
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

但是,受限于传感器的测距距离的限制,以及安装位置固定的限制,针对大角度斜列车位、墙角车位、狭窄车位等场景,系统无法有效地检测到斜列车位的关键信息,其对于斜列车位识别准确率较低

Benefits of technology

[0074] This invention provides a parking space detection method, system, and storage medium based on lidar. It utilizes lidar to obtain raw point cloud data containing environmental information, including height information. The point cloud is then preprocessed, ground point cloud is removed, and regions of interest are extracted, retaining the point cloud data of the target objects. After removing ground and suspended points, obstacle points are clustered to extract the 3D bounding box of the target vehicle, calculating the distance between adjacent target vehicles. Based on a preset available parking space threshold parameter, it determines whether there are available parking spaces between adjacent target vehicles and identifies the type of the available parking space. Through the established parking space space model, the four vertices of the available parking space relative to the vehicle's coordinate system are calculated and output, thus enabling accurate detection of parking spaces in parking scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117746669B_ABST
    Figure CN117746669B_ABST
Patent Text Reader

Abstract

The application discloses a kind of parking space parking stall detection methods based on laser radar, it includes: using vehicle-mounted laser radar sensor to collect the original point cloud information under parking scene, and extract the point cloud data of target object;Carry out clustering processing, obtain the clustering result of static target vehicle and the clustering result of obstacle target;The clustering result of static target vehicle is judged, at least one parking stall to be parked is determined, and the space information of each parking stall to be parked is obtained;According to space information, the four vertex coordinate information of the plane parking stall corresponding to each parking stall to be parked is obtained;According to the clustering result of obstacle target, determine the available parking stall in parking stall to be parked.The application also discloses corresponding system and storage medium.Implementation of the present application has the advantages of large recognition range, strong scene environment adaptability and accurate and fast identification when parking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic parking technology, and in particular to a spatial parking space detection method, system, and storage medium based on LiDAR (Light Detection and Ranging). Background Technology

[0002] Parking space detection is a crucial step in automated parking systems, and accurate and effective detection is fundamental to achieving automated parking. Currently, various solutions exist for parking space detection, but all have some shortcomings. The existing solutions are as follows:

[0003] The first approach is a purely vision-based solution using vehicle-mounted surround-view cameras. This method stitches together a panoramic top-down view from cameras around the vehicle, and then uses image processing and deep learning algorithms to identify parking line information within the image. However, this vision-based solution is susceptible to changes in lighting conditions and intensity, exhibiting significant errors in underground parking lots with strong light, low light, or ghosting effects, making it poorly adaptable.

[0004] The second method uses multiple ultrasonic sensors to detect parking spaces. By fitting the contour curve of the obstacle, the upper and lower edges of the detected parking space are determined, and compared with parameters such as the length, width, and turning radius of the vehicle waiting to park, to determine whether the detected parking space is usable, thus making a parking space decision. However, this method has a relatively short parking space detection distance (e.g., within 7m), and while it has a high detection rate for relatively regular horizontal / vertical parking spaces, its accuracy is lower for large-angle angled parking spaces.

[0005] The third method, which uses a vehicle-mounted surround-view camera and ultrasonic radars on both sides of the vehicle to fuse sensor information and locate available parking spaces, is currently the mainstream solution in parking scenarios. However, due to limitations in sensor ranging distance and fixed installation positions, the system cannot effectively detect key information about angled parking spaces, corner parking spaces, and narrow parking spaces, resulting in low accuracy in identifying angled parking spaces. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a parking space detection method, system and storage medium based on lidar, which has the advantages of large recognition range, strong adaptability to scene environment and accurate and fast recognition.

[0007] To address the aforementioned technical problems, as one aspect of the present invention, a parking space detection method based on lidar is provided, which includes at least the following steps:

[0008] The vehicle-mounted lidar sensor is used to collect raw point cloud information in the parking scene and convert it into three-dimensional point cloud data in the vehicle body coordinate system to obtain the point cloud data of the target object in the three-dimensional point cloud data.

[0009] Clustering processing is performed on the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets;

[0010] Using preset parking space threshold parameters, the clustering results of the static target vehicles are judged to determine at least one parking space to be parked, a corresponding parking space spatial model is established, and the spatial information of each parking space to be parked is obtained.

[0011] Based on the spatial information of each parking space, obtain the coordinate information of the four vertices of the corresponding planar parking space.

[0012] Based on the clustering results of the obstacle targets, parking spaces that are not affected by obstacles are identified as available parking spaces, and the corresponding coordinate information of the four vertices is output.

[0013] The step of acquiring the point cloud data of the target object further includes:

[0014] Invalid points in the 3D point cloud data are removed, and filtering is performed to filter out dangling points and noise points in the 3D point cloud data;

[0015] The filtered 3D point cloud data is segmented into ground, and the corresponding point cloud data of the ground is removed, while the point cloud data of the target object is retained;

[0016] Based on a pre-determined region of interest, the point cloud data of the target object is extracted, and the point cloud data of the target object within the region of interest is retained.

[0017] The step of clustering the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets further includes:

[0018] The point cloud data of the target objects in the region of interest are segmented and clustered according to different ranges of point cloud distance.

[0019] Different clustering parameter thresholds are used to perform Euclidean clustering on point cloud data of different ranges to obtain the clusters of target object point clouds within each range, and to obtain the three-dimensional bounding box results corresponding to each cluster; wherein, the clustering parameter thresholds include at least: cluster search radius threshold, minimum number of cluster points, and maximum number of point clusters.

[0020] The clustering results of each 3D bounding box are filtered based on the rectangularity and aspect ratio parameters to obtain the clustering results of static target vehicles and obstacle targets.

[0021] The step of judging the clustering results of the static target vehicles, determining at least one parking space, establishing a corresponding parking space spatial model, and calculating the spatial information of each parking space further includes:

[0022] The 3D bounding box clustering results of static target vehicles are sorted according to the ascending order of the x-coordinate. Two adjacent static target vehicles are selected in turn as the first reference target parking space data and the second reference target parking space data.

[0023] Based on the preset parking space type judgment principle, the parking space type of the target parking space between the first reference target parking space data and the second reference target parking space data is determined respectively;

[0024] Select the shortest distance calculation formula corresponding to the parking space type, calculate the shortest distance between the first reference parking space and the second reference parking space respectively, and save each distance value in the first reference target parking space data into the first reference parking space minimum distance set, and save each distance value in the second reference target parking space data into the second reference parking space minimum distance set;

[0025] The minimum distance result of the calculated first reference parking space minimum distance set and the second reference parking space minimum distance set is selected and compared with the preset parking space width threshold and / or length threshold parameters to determine whether it is an available parking space.

[0026] When a parking space is a waiting space, a corresponding spatial model of the waiting space is established based on the three-dimensional bounding box information of the first reference parking space and the second reference parking space, and the spatial information of the waiting space is calculated; the spatial information includes at least: the parking space type, center point coordinates, length, width and angle information of the waiting space.

[0027] The step of determining the parking space type between the first and second reference target parking space data according to the preset parking space type determination principle specifically includes:

[0028] Calculate the mean of the three-dimensional bounding box angles corresponding to the first reference target parking space data and the second reference target parking space data, and then compare them with 0°, 90°, 180°, and 270° to calculate the angle difference Δθ. If the value of the angle difference Δθ is greater than 20°, then the parking space between the two is determined to be an inclined parking space; otherwise, it is determined to be a horizontal / vertical parking space.

[0029] If the parking space is horizontal or vertical, the aspect ratio of the 3D bounding box is calculated. If the aspect ratio is greater than or equal to 1, the parking space is determined to be horizontal; if the aspect ratio is less than 1, the parking space is determined to be vertical.

[0030] The specific steps for calculating the shortest distance between the first reference parking space and the second reference parking space using the shortest distance calculation formula corresponding to the parking space type are as follows:

[0031] If the target parking space is a parallel parking space, the shortest distance (min_dist0) is calculated using the following formula:

[0032] min_dist0=(x1_center-x2_center)*boxOrientation-(L i +L j ) / 2

[0033] If the target parking space is a perpendicular or angled parking space, the shortest distance (min_dist) is calculated using the following formula:

[0034] min_dist=(x1_center-x2_center)*boxOrientation-(H i +H i ) / 2

[0035] in:

[0036] boxOrientation=min[abs(sin(boxorient_i)),abs(sin(boxorient_j))]

[0037] In the formula, boxorient_i represents the angle information of the 3D bounding box of the first reference parking space, boxorient_j represents the angle information of the 3D bounding box of the second reference parking space, abs() represents taking the absolute value, min[] represents taking the smaller of the two values; x1_center represents the x-coordinate of the center point of the first reference parking space, x2_center represents the x-coordinate of the center point of the second reference parking space, L i L is the length of the three-dimensional bounding box of the first reference parking space. j H is the length of the three-dimensional bounding box of the second reference parking space. i H is the width of the 3D bounding box of the first reference parking space. j The width of the three-dimensional bounding box for the second reference parking space.

[0038] The step of establishing a corresponding parking space space model based on the three-dimensional bounding box information of the first and second reference parking spaces, and calculating the spatial information of the parking space further includes:

[0039] Obtain the vehicle's width (widthCar), length (lengthCar), and the allowance (pSpace) on both sides of the parking space to be parked; obtain the center point coordinates (x1, y1, z1), length (x1Len), width (y1Len), and angle (boxOrient_i) of the 3D bounding box of the first reference parking space; obtain the center point coordinates (x2, y2, z2), length (x2Len), width (y2Len), and angle (boxOrient_j) of the 3D bounding box of the second reference parking space;

[0040] The y-value of the center point of the three-dimensional bounding box of the first reference parking space is determined as the y-coordinate of the center point of the 3D parking space to be parked.

[0041] The x-coordinate of the 3D center point of the parking space to be parked is determined using the following formula:

[0042] x = (x1 + x2 - dist1 + dist2) / 2

[0043] dist1=abs(length1*cos(boxOrient_i-β1))

[0044] dist2=abs(length2*cos(boxOrient_j-β2))

[0045]

[0046]

[0047] When the parking space is an angled or perpendicular parking space, the values ​​of β1 and β2 are calculated using the following formula:

[0048]

[0049]

[0050] When the parking space is a level parking space, the values ​​of β1 and β2 are calculated using the following formula:

[0051]

[0052]

[0053] In the formula, length1 is the length of the hypotenuse of the bottom rectangle of the three-dimensional bounding box of the first reference parking space, length2 is the length of the hypotenuse of the bottom rectangle of the three-dimensional bounding box of the first reference parking space, dist1 is the length of the space occupied by the first reference parking space along the x-axis, dist2 is the length of the space occupied by the second reference parking space along the x-axis, x is the coordinate of the center point x of the 3D frame of the parking space to be determined, β1 is the ratio of the length to the width of the three-dimensional bounding box of the first reference parking space, and β2 is the ratio of the length to the width of the three-dimensional bounding box of the second reference parking space.

[0054] The 3D length and width of the parking space to be parked are determined using the following method:

[0055] When the parking space is horizontal, its length is (min_dist-2*pSpace) and its width is widthCar; when the parking space is perpendicular, its length is lengthCar and its width is (min_dist-2*pSpace); when the parking space is angled, its length is lengthCar and its width is (min_dist-2*pSpace).

[0056] The angle θ of the 3D parking space to be parked is determined by the following method:

[0057] When the parking space is horizontal, its angle is 0°; when the parking space is perpendicular, its angle is 90°; when the parking space is angled, its angle is the angle value of the 3D bounding box corresponding to the more distant of the first and second reference parking spaces.

[0058] Specifically, the step of obtaining the coordinate information of the four vertices of the parking space corresponding to each parking space based on the spatial information of each parking space is as follows:

[0059] Taking the center point of the bottom rectangle of the parking space as the origin, the coordinates of the four vertices of the bottom rectangle can be calculated sequentially based on the information of the 3D bounding box. Let the coordinates of the center point of the bottom rectangle of the 3D bounding box of the parking space be (x, y), and the coordinates of one of the four vertices be (xCoord, yCoord). The coordinates of the corresponding vertices of the constructed 2D parking space are (xSlot, ySlot). Then, the parking space model described above is as follows:

[0060] xSlot=(xCoord-x)*cosθ-(yCoord-y)*sinθ+xySlot

[0061] =(yCoord-y)*cosθ+(xCoord-x)*sinθ+y

[0062] Based on the above formula, the information of the 3D parking space is converted into the coordinates of the four vertices of the 2D parking space.

[0063] The step of determining whether the spatial range of each parking space is affected by obstacles based on the clustering results of the obstacle targets, and identifying unaffected parking spaces as available parking spaces, specifically involves:

[0064] Determine whether there are any suspended obstacles or other types of obstacles within the spatial range of each parking space. If not, the parking space is determined as an available parking space.

[0065] If an obstacle exists, its outline information is obtained; based on the outline information of the obstacle, it is determined whether it affects the use of the parking space. If it does not affect the use of the parking space, the parking space is determined to be an available parking space; otherwise, the parking space is determined to be an unavailable parking space.

[0066] Accordingly, another aspect of the present invention also provides a parking space detection system based on lidar, which includes at least:

[0067] The point cloud data acquisition unit is used to collect raw point cloud information in a parking scenario using an onboard LiDAR sensor, and convert it into three-dimensional point cloud data in the vehicle body coordinate system, and acquire the point cloud data of the target object in the three-dimensional point cloud data.

[0068] Different target clustering processing units are used to perform clustering processing on the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets;

[0069] The parking space determination unit is used to judge the clustering results of the static target vehicles by using preset parking space width threshold and / or length threshold parameters, determine at least one parking space, establish a corresponding parking space spatial model, and obtain the spatial information of each parking space.

[0070] The planar information acquisition unit is used to obtain the coordinate information of the four vertices of the planar parking space corresponding to each parking space based on the spatial information of each parking space.

[0071] The available parking space determination unit is used to determine the parking spaces that are not affected by obstacles as available parking spaces based on the clustering results of the obstacle targets, and output the corresponding coordinate information of the four vertices.

[0072] Accordingly, another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned method.

[0073] Implementing the embodiments of the present invention has the following beneficial effects:

[0074] This invention provides a parking space detection method, system, and storage medium based on lidar. It utilizes lidar to obtain raw point cloud data containing environmental information, including height information. The point cloud is then preprocessed, ground point cloud is removed, and regions of interest are extracted, retaining the point cloud data of the target objects. After removing ground and suspended points, obstacle points are clustered to extract the 3D bounding box of the target vehicle, calculating the distance between adjacent target vehicles. Based on a preset available parking space threshold parameter, it determines whether there are available parking spaces between adjacent target vehicles and identifies the type of the available parking space. Through the established parking space space model, the four vertices of the available parking space relative to the vehicle's coordinate system are calculated and output, thus enabling accurate detection of parking spaces in parking scenarios.

[0075] Furthermore, this invention utilizes lidar, enabling a longer detection range in parking scenarios. This allows for the detection of parking spaces over a wide area (e.g., 30m), significantly reducing the time spent searching for available parking spaces. Simultaneously, it remains unaffected by changes in lighting conditions, functioning normally in bright light, low light, and ghosting environments. It also covers various types of parking spaces, effectively improving the success rate of parking space detection and facilitating subsequent APA path planning and enhancing driver parking efficiency.

[0076] Meanwhile, this invention employs a specific distance algorithm that can accurately identify various types of parking spaces and simultaneously cover multiple types of parking scenarios, including steeply angled parking spaces. It can accurately construct usable parking space information for various types of parking spaces and can be well applied to automatic parking scenarios, thereby effectively improving the success rate of parking space detection in parking scenarios and greatly avoiding the waste of parking space resources.

[0077] The embodiments of the present invention can also accurately detect barrier gate arms, suspended obstacles, etc., thereby improving parking safety. Attached Figure Description

[0078] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, obtaining other drawings based on these drawings without creative effort still falls within the scope of the present invention.

[0079] Figure 1This is a schematic diagram of the main flow of an embodiment of a parking space detection method based on lidar provided by the present invention;

[0080] Figure 2 for Figure 1 A schematic diagram of the 3D bounding box involved;

[0081] Figure 3 This invention relates to a projection diagram of a parking space.

[0082] Figure 4 This invention relates to an angled schematic diagram of a parking space.

[0083] Figure 5 This is a schematic diagram of a planar model of a parking space according to the present invention;

[0084] Figure 6 This is a schematic diagram of an embodiment of a parking space detection system based on lidar provided by the present invention. Detailed Implementation

[0085] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.

[0086] like Figure 1 The diagram shown illustrates the main flow of an embodiment of a parking space detection method based on lidar provided by the present invention; in conjunction with... Figures 2 to 5 As shown in this embodiment, the parking space detection method based on lidar is characterized by including at least the following steps:

[0087] Step S11: Use an onboard LiDAR sensor to collect raw point cloud information in a parking scenario and convert it into three-dimensional point cloud data in the vehicle body coordinate system to obtain the point cloud data of the target object in the three-dimensional point cloud data.

[0088] Specifically, the vehicle-mounted LiDAR sensor is used to collect the original point cloud information in the parking scenario, and the original point cloud information with the LiDAR coordinate system as the origin is converted into three-dimensional point cloud data (including x, y, z coordinates) in the vehicle body coordinate system.

[0089] Then, the 3D point cloud data is processed accordingly to obtain the point cloud data of the target object, specifically including:

[0090] Invalid points in the 3D point cloud data are removed, and filtering is performed to filter out dangling points and noise points in the 3D point cloud data;

[0091] The filtered 3D point cloud data is segmented into ground, and the corresponding point cloud data of the ground is removed, while the point cloud data of the target object is retained;

[0092] Based on a pre-determined region of interest (e.g., the 30-meter scanning range of a lidar), the point cloud data of the target object is extracted, and the point cloud data of the target object within the region of interest is retained.

[0093] Step S12: Perform clustering processing on the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets;

[0094] In a specific example, step S12 further includes:

[0095] The point cloud data of the target object in the region of interest is segmented and clustered according to different ranges of point cloud distance. For example, in one case, the point cloud information of the target object can be divided into 5 ranges: [0, 6m], [6m, 10m], [10m, 15m], [15m, 20m], and [20m, 30m]. It is understandable that dividing the data into different ranges can solve the problem of varying sparsity in laser point clouds.

[0096] Different clustering parameter thresholds are applied to point cloud data of different ranges to perform Euclidean clustering, obtaining the clusters of target object point clouds within each range, and obtaining the corresponding 3D bounding box (3DBoundingbox) result for each cluster. The clustering parameter thresholds include at least: a cluster search radius threshold (ClusterTolerance), a minimum number of clusters (MinClusterSize), and a maximum number of clusters (MaxClusterSize). By performing Euclidean clustering on point clouds of different ranges according to different threshold parameters, better clustering results can be achieved. The 3D bounding box (3DBoundingbox) can be generated using existing software.

[0097] The clustering results of each 3D bounding box are filtered based on the parameters of rectangularity and aspect ratio to obtain the clustering results of static target vehicles and obstacle targets. Specifically, the 3D bounding box clustering results of static target vehicles (with angle) can be filtered based on conditions such as rectangularity and aspect ratio, while the remaining 3D bounding box clustering results are the clustering results of obstacle targets.

[0098] Step S13: Using a preset parking space threshold parameter, judge the clustering results of the static target vehicles, determine at least one parking space to be parked, establish a corresponding parking space spatial model, and obtain the spatial information of each parking space to be parked.

[0099] In a specific example, step S13 further includes:

[0100] S130. Sort the 3D bounding box clustering results (with angle) of static target vehicles according to the rule of ascending x-coordinate, and select two adjacent static target vehicles in turn as the first reference target parking space data and the second reference target parking space data.

[0101] It is understandable that, in specific embodiments, a static target vehicle that is far from the vehicle itself can be designated as the first reference target parking space.

[0102] S131. Determine the parking space type of the target parking space between the first reference target parking space data and the second reference target parking space data according to the preset parking space type judgment principle; the parking space type includes three types: horizontal parking space, vertical parking space and angled parking space.

[0103] S132. Select the shortest distance calculation formula corresponding to the parking space type, calculate the shortest distance between the first reference parking space and the second reference parking space respectively, and save each distance value in the first reference target parking space data into the first reference parking space minimum distance set, and save each distance value in the second reference target parking space data into the second reference parking space minimum distance set.

[0104] S133. Select the minimum distance result of the calculated first reference parking space minimum distance set and the second reference parking space minimum distance set, and compare it with the preset parking space width threshold (WidthSlotLimit) and / or length threshold parameter (lengthSlotLimit) to determine whether it is an available parking space.

[0105] For local parking, when determining parking spaces for horizontal parking spaces, the distance threshold can be the preset length threshold parameter (lengthSlotLimit); when determining parking spaces for perpendicular and angled parking spaces, the distance threshold can be the preset width threshold parameter (WidthSlotLimit).

[0106] S134. When the space is a waiting parking space, a corresponding waiting parking space spatial model is established based on the three-dimensional bounding box information of the first reference parking space and the second reference parking space, and the spatial information of the waiting parking space is calculated; the spatial information includes at least: the parking space type, center point coordinates, length, width and angle information of the waiting parking space.

[0107] In one embodiment, step S131 can be implemented using the following steps:

[0108] S1310. Calculate the mean of the three-dimensional bounding box angles corresponding to the first reference target parking space data and the second reference target parking space data, and then compare them with 0°, 90°, 180°, and 270° to find the angle difference Δθ. If the value of the angle difference Δθ is all >20°, then determine that the parking space between the two is an inclined parking space; otherwise, determine it as a horizontal / vertical parking space.

[0109] S1311. If it is a horizontal / vertical parking space, then calculate the aspect ratio of the three-dimensional bounding box (i.e., the length along the x-axis / the width along the y-axis), denoted as K. If the aspect ratio K is greater than or equal to 1, then the parking space is determined to be a horizontal parking space; if the aspect ratio K is less than 1, then the parking space is determined to be a vertical parking space.

[0110] In a specific example, step S132, which involves selecting the shortest distance calculation formula corresponding to the parking space type and calculating the shortest distance between adjacent first and second reference parking spaces, specifically involves:

[0111] If the target parking space is a parallel parking space, the shortest distance (min_dist0) is calculated using the following formula:

[0112] min_dist0=(x1_center-x2_center)*boxOrientation-(L i +L j ) / 2

[0113] If the target parking space is a perpendicular or angled parking space, the shortest distance (min_dist) is calculated using the following formula:

[0114] min_dist=(x1_center-x2_center)*boxOrientation-(H i +H i ) / 2

[0115] in:

[0116] boxOrientation=min[abs(sin(boxorient_i)),abs(sin(boxorient_j))]

[0117] In the formula, boxorient_i represents the angle information of the 3D bounding box of the first reference parking space, boxorient_j represents the angle information of the 3D bounding box of the second reference parking space, abs() represents taking the absolute value, min[] represents taking the smaller of the two values; x1_center represents the x-coordinate of the center point of the first reference parking space, x2_center represents the x-coordinate of the center point of the second reference parking space, L i L is the length of the three-dimensional bounding box of the first reference parking space. j H is the length of the three-dimensional bounding box of the second reference parking space. i H is the width of the 3D bounding box of the first reference parking space. j The width of the three-dimensional bounding box of the second reference parking space. Figure 3 A schematic diagram of an irregular perpendicular parking space is shown; this can be used for further understanding.

[0118] The step of establishing a corresponding parking space space model based on the three-dimensional bounding box information of the first and second reference parking spaces, and calculating the spatial information of the parking space further includes:

[0119] Obtain the vehicle's width (widthCar), length (lengthCar), and the allowance (pSpace) on both sides of the parking space to be parked, all in meters. Determine the parking space type based on the parking space type of the first / second reference parking space. Obtain the center point coordinates (x1, y1, z1), length (x1Len), width (y1Len), and angle (boxOrient_i) of the 3D bounding box of the first reference parking space. Obtain the center point coordinates (x2, y2, z2), length (x2Len), width (y2Len), and angle (boxOrient_j) of the 3D bounding box of the second reference parking space.

[0120] The y-value of the center point of the three-dimensional bounding box of the first reference parking space is determined as the y-coordinate of the center point of the 3D parking space to be parked.

[0121] The x-coordinate of the 3D center point of the parking space to be parked is determined using the following formula:

[0122] x = (x1 + x2 - dist1 + dist2) / 2

[0123] dist1=abs(length1*cos(boxOrient_i-β1))

[0124] dist2=abs(length2*cos(boxOrient_j-β2))

[0125]

[0126]

[0127] Among them, when the parking space is an angled parking space or a perpendicular parking space (see reference) Figure 4 The values ​​of β1 and β2 are calculated using the following formula:

[0128]

[0129]

[0130] When the parking space is a level parking space, the values ​​of β1 and β2 are calculated using the following formula:

[0131]

[0132]

[0133] In the formula, length1 is the length of the hypotenuse of the bottom rectangle of the three-dimensional bounding box of the first reference parking space, length2 is the length of the hypotenuse of the bottom rectangle of the three-dimensional bounding box of the first reference parking space, dist1 is the length of the space occupied by the first reference parking space along the x-axis, dist2 is the length of the space occupied by the second reference parking space along the x-axis, x is the coordinate of the center point x of the 3D frame of the parking space to be determined, β1 is the ratio of the length to the width of the three-dimensional bounding box of the first reference parking space, and β2 is the ratio of the length to the width of the three-dimensional bounding box of the second reference parking space.

[0134] The 3D length and width of the parking space to be parked are determined using the following method:

[0135] When the parking space is horizontal, its length is (min_dist-2*pSpace) and its width is widthCar; when the parking space is perpendicular, its length is lengthCar and its width is (min_dist-2*pSpace); when the parking space is angled, its length is lengthCar and its width is (min_dist-2*pSpace).

[0136] The angle θ of the 3D parking space to be parked is determined by the following method:

[0137] When the parking space is horizontal, its angle is 0°; when the parking space is perpendicular, its angle is 90°; when the parking space is angled, its angle is the angle value of the 3D bounding box corresponding to the more distant of the first and second reference parking spaces.

[0138] Step S14: Based on the spatial information of each parking space, obtain the coordinate information of the four vertices of the corresponding planar parking space for each parking space.

[0139] In a specific example, step S14 is as follows:

[0140] Taking the center point of the bottom rectangle of the parking space as the origin, the coordinates of the four vertices of the bottom rectangle can be calculated sequentially based on the information of the 3D bounding box. Let the coordinates of the center point of the bottom rectangle of the 3D bounding box of the parking space be (x, y), and the coordinates of one of the four vertices be (xCoord, yCoord). The coordinates of the corresponding vertex of the constructed 2D parking space are (xSlot, ySlot). Then, the parking space model described above is as follows:

[0141] xSlot=(xCoord-x)*cosθ-(yCoord-y)*sinθ+xySlot

[0142] =(yCoord-y)*cosθ+(xCoord-x)*sinθ+y

[0143] According to the above formula, the information of the 3D parking space can be converted into the coordinates of the four vertices of the 2D parking space in a planar plane.

[0144] Step S15: Based on the clustering results of the obstacle targets, determine whether the spatial range of each parking space is affected by obstacles, determine the unaffected parking spaces as available parking spaces, and output the corresponding coordinate information of the four vertices.

[0145] In a specific example, step S15 further includes:

[0146] Determine whether there are any suspended obstacles or other types of obstacles within the spatial range of each parking space. If not, the parking space is determined to be a usable parking space. Specifically, the obstacles may be such as gate arms, electrical boxes, fire boxes, fire hydrants, etc.

[0147] If an obstacle exists, its outline information is obtained; based on the outline information of the obstacle, it is determined whether it affects the use of the parking space. If it does not affect the use of the parking space, the parking space is determined to be an available parking space; otherwise, the parking space is determined to be an unavailable parking space.

[0148] It is understood that the method provided by this invention can simultaneously detect multiple types of parking spaces, including steeply angled parking spaces. This solves the problem that when using ultrasonic radar for parking space detection, the detection rate is only high for relatively regular horizontal / vertical parking spaces, while the accuracy for steeply angled parking spaces is low.

[0149] Furthermore, this invention utilizes the shortest distance calculation formula corresponding to different parking space types to accurately calculate the shortest distance between two adjacent target vehicles for horizontal / vertical parking spaces at different angles (irregular horizontal / vertical parking spaces), thereby accurately calculating the width / length information of available parking spaces, which is beneficial for the successful construction of planar parking spaces in the subsequent process.

[0150] like Figure 6 The diagram shows a schematic representation of an embodiment of a parking space detection system based on lidar provided by the present invention. In this embodiment, the lidar-based parking space detection system 1 includes at least:

[0151] The point cloud data acquisition unit 11 is used to collect the original point cloud information in the parking scene using the vehicle-mounted lidar sensor, and convert it into three-dimensional point cloud data in the vehicle body coordinate system, and acquire the point cloud data of the target object in the three-dimensional point cloud data.

[0152] Different target clustering processing unit 12 is used to perform clustering processing on the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets;

[0153] The parking space determination unit 13 is used to judge the clustering results of the static target vehicles by using preset parking space width threshold and / or length threshold parameters, determine at least one parking space, establish a corresponding parking space spatial model, and obtain the spatial information of each parking space.

[0154] The planar information acquisition unit 14 is used to obtain the coordinate information of the four vertices of the planar parking space corresponding to each parking space based on the spatial information of each parking space.

[0155] The available parking space determination unit 15 is used to determine whether the spatial range of each parking space is affected by obstacles based on the clustering results of the obstacle targets, determine the unaffected parking spaces as available parking spaces, and output the corresponding four vertex coordinate information.

[0156] It is understood that, in this embodiment, the parking space detection system 1 based on lidar is used to implement the aforementioned... Figures 1 to 5 The described method; the specific functional details implemented by each unit can be found in the aforementioned description. Figure 1 The descriptions of steps S10 to S15 are provided below. For more details, please refer to and combine with the foregoing descriptions. Figures 1 to 5 The description is not traced back here.

[0157] Accordingly, in another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned... Figure 1 The steps of the described method. For more details, please refer to and combine with the foregoing descriptions. Figures 1 to 5 The description of that will not be repeated here.

[0158] Implementing the embodiments of the present invention has the following beneficial effects:

[0159] This invention provides a parking space detection method, system, and storage medium based on lidar. It utilizes lidar to obtain raw point cloud data containing environmental information, including height information. The point cloud is then preprocessed, ground point cloud is removed, and regions of interest are extracted, retaining the point cloud data of the target objects. After removing ground and suspended points, obstacle points are clustered to extract the 3D bounding box of the target vehicle, calculating the distance between adjacent target vehicles. Based on a preset available parking space threshold parameter, it determines whether there are available parking spaces between adjacent target vehicles and identifies the type of the available parking space. Through the established parking space space model, the four vertices of the available parking space relative to the vehicle's coordinate system are calculated and output, thus enabling accurate detection of parking spaces in parking scenarios.

[0160] Secondly, because this invention uses lidar, it has a longer detection range in parking scenarios, enabling the detection of parking spaces over a large area (e.g., 30m), which can greatly reduce the time spent searching for available parking spaces. At the same time, it has stronger scene adaptability, and can be unaffected by changes in lighting conditions, working normally under conditions such as strong light, low light, and ghosting, and covering parking scenarios with multiple types of parking spaces, thereby effectively improving the success rate of parking space detection in parking scenarios and improving the driver's parking efficiency.

[0161] Meanwhile, this invention employs a specific distance algorithm that can accurately identify various types of parking spaces. It can simultaneously cover multiple types of parking scenarios, including steeply angled parking spaces and irregular horizontal or vertical parking spaces. It can accurately construct usable parking space information for various types of parking spaces, making it well-suited for automatic parking scenarios. This effectively improves the success rate of parking space detection in parking scenarios and greatly avoids the waste of parking space resources.

[0162] In addition, embodiments of the present invention can also accurately detect barrier gates, suspended obstacles, etc., further improving parking safety.

[0163] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0165] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A parking space detection method based on lidar, characterized in that, It should include at least the following steps: The vehicle-mounted lidar sensor is used to collect raw point cloud information in the parking scene and convert it into three-dimensional point cloud data in the vehicle body coordinate system to obtain the point cloud data of the target object in the three-dimensional point cloud data. Clustering processing is performed on the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets; Using preset parking space threshold parameters, the clustering results of the static target vehicles are judged to determine at least one parking space to be parked, a corresponding parking space spatial model is established, and the spatial information of each parking space to be parked is obtained. Based on the spatial information of each parking space, the coordinate information of the four vertices of the corresponding planar parking space is obtained. Specifically, this includes: taking the center point of the bottom rectangle of the parking space model as the origin, calculating the coordinates of the four vertices of the bottom rectangle sequentially based on the information of the 3D bounding box. Let the coordinates of the center point of the bottom rectangle of the 3D bounding box of the parking space be (x, y), and the coordinates of one of the four vertices be (xCoord, yCoord). The coordinates of the corresponding vertices of the constructed 2D parking space are (xSlot, ySlot). Then, the parking space model is as follows: According to the above formula, the information of the 3D parking space is converted into the coordinates of the four vertices of the 2D parking space. θ is the angle of the parking space. The three-dimensional bounding box is obtained based on the vehicle's width, length, and the allowance on both sides of the parking space. The information of the three-dimensional bounding box includes the center point coordinates, length, width, and angle information. Based on the clustering results of the obstacle targets, parking spaces that are not affected by obstacles are identified as available parking spaces, and the corresponding coordinate information of the four vertices is output.

2. The method as described in claim 1, characterized in that, The step of acquiring the point cloud data of the target object in the three-dimensional point cloud data further includes: Invalid points in the 3D point cloud data are removed, and filtering is performed to filter out dangling points and noise points in the 3D point cloud data; The filtered 3D point cloud data is segmented into ground, and the corresponding point cloud data of the ground is removed, while the point cloud data of the target object is retained; Based on a pre-determined region of interest, extract the point cloud data of the target object from the point cloud data of the target object within the region of interest.

3. The method as described in claim 1, characterized in that, The step of clustering the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets further includes: The point cloud data of the target object is segmented according to different ranges of point cloud distance; Different clustering parameter thresholds are used to perform Euclidean clustering on point cloud data of different ranges to obtain the clustering of target object point clouds within each range, and to obtain the three-dimensional bounding box clustering result corresponding to each cluster; wherein, the clustering parameter thresholds include at least: clustering search radius threshold, minimum number of cluster points, and maximum number of cluster points. The clustering results of each 3D bounding box are filtered based on the rectangularity and aspect ratio parameters to obtain the clustering results of static target vehicles and obstacle targets.

4. The method as described in claims 1 to 3, characterized in that, The step of judging the clustering results of the static target vehicles, determining at least one parking space, establishing a corresponding parking space spatial model, and calculating the spatial information of each parking space further includes: The 3D bounding box clustering results of static target vehicles are sorted, and two adjacent static target vehicles are selected in turn as the first reference parking space data and the second reference parking space data. Based on the preset parking space type judgment principle, the parking space type of the target parking space between the first reference parking space data and the second reference parking space data is determined respectively; Select the shortest distance calculation formula corresponding to the parking space type, and calculate the shortest distance between the first reference parking space and the second reference parking space respectively; The shortest distance between the first reference parking space and the second reference parking space is compared with the preset width threshold and / or length threshold parameters of the parking space to determine whether it is an available parking space. When a parking space is a waiting space, a corresponding spatial model of the waiting space is established based on the three-dimensional bounding box information of the first reference parking space and the second reference parking space, and the spatial information of the waiting space is calculated; the spatial information includes at least: the parking space type, center point coordinates, length, width and angle information of the waiting space.

5. The method as described in claim 4, characterized in that, The step of determining the parking space type between the first reference parking space data and the second reference parking space data according to the preset parking space type determination principle specifically includes: Calculate the mean of the 3D bounding box angles corresponding to the first and second reference parking space data, and then compare them with 0°, 90°, 180°, and 270° to find the angle difference. , if the angle difference If the values ​​are all >20°, then the parking space between the two is determined to be an angled parking space; otherwise, it is determined to be a horizontal / vertical parking space. If the parking space is horizontal or vertical, the aspect ratio of the 3D bounding box is calculated. If the aspect ratio is greater than or equal to 1, the parking space is determined to be horizontal; if the aspect ratio is less than 1, the parking space is determined to be vertical.

6. The method as described in claim 5, characterized in that, The specific steps for selecting the shortest distance calculation formula corresponding to the parking space type and calculating the shortest distance between the first reference parking space and the second reference parking space are as follows: If the target parking space is a parallel parking space, the shortest distance is calculated using the following formula. : If the target parking space is a perpendicular or angled parking space, the shortest distance is calculated using the following formula. : in: In the formula, The angle information of the three-dimensional bounding box of the first reference parking space. The angle information of the three-dimensional bounding box of the second reference parking space. To take the absolute value, [ ] represents the smaller of the two values; Let x be the center point of the first reference parking space. Let x be the center point of the second reference parking space. The length of the three-dimensional bounding box of the first reference parking space. The length of the three-dimensional bounding box of the second reference parking space; The width of the three-dimensional bounding box of the first reference parking space. The width of the three-dimensional bounding box of the second reference parking space.

7. The method as described in claim 6, characterized in that, The step of establishing a corresponding parking space space model based on the three-dimensional bounding box information of the first and second reference parking spaces, and calculating the spatial information of the parking space further includes: Obtain the vehicle's width (widthCar), length (lengthCar), and the allowance (pSpace) on both sides of the parking space to be parked; obtain the center point coordinates (x1, y1, z1), length (x1Len), width (y1Len), and angle (boxOrient_i) of the 3D bounding box of the first reference parking space; obtain the center point coordinates (x2, y2, z2), length (x2Len), width (y2Len), and angle (boxOrient_j) of the 3D bounding box of the second reference parking space; The y-value of the center point of the three-dimensional bounding box of the first reference parking space is determined as the y-coordinate of the center point of the 3D parking space to be parked. The x-coordinate of the 3D center point of the parking space to be parked is determined using the following formula: When the parking space is an angled or perpendicular parking space, the following formula is used for calculation. and value: When the parking space is a level parking space, calculate using the following formula. and value: In the formula, The length of the hypotenuse of the bottom rectangle of the three-dimensional bounding box of the first reference parking space. The length of the hypotenuse of the bottom rectangle of the three-dimensional bounding box of the second reference parking space. The length of the first reference parking space along the x-axis that it occupies in the waiting parking space. The length of the second reference parking space along the x-axis that occupies the space of the waiting parking space. Let x be the coordinate of the center point of the 3D frame of the desired parking space. The ratio of the length to the width of the three-dimensional bounding box of the first reference parking space. The ratio of the length to the width of the three-dimensional bounding box of the second reference parking space; The 3D length and width of the parking space to be parked are determined using the following method: When the parking space is a level parking space, its length is Its width is widthCar; when the parking space is a perpendicular parking space, its length is lengthCar, and its width is... When the parking space is an angled parking space, its length is lengthCar and its width is... ; The angle of the 3D parking space to be parked is determined using the following method. : When the parking space is horizontal, its angle is 0°; when the parking space is perpendicular, its angle is 90°; when the parking space is angled, its angle is the angle value of the 3D bounding box corresponding to the more distant of the first and second reference parking spaces.

8. The method as described in claim 7, characterized in that, Based on the clustering results of the obstacle targets, the steps of identifying unaffected parking spaces as available parking spaces and outputting the corresponding four vertex coordinates are as follows: Determine whether there are any suspended obstacles or other types of obstacles within the spatial range of each parking space. If not, the parking space is determined as an available parking space. If an obstacle exists, its outline information is obtained; based on the outline information of the obstacle, it is determined whether it affects the use of the parking space. If it does not affect the use of the parking space, the parking space is determined to be an available parking space; otherwise, the parking space is determined to be an unavailable parking space.

9. A parking space detection system based on lidar, characterized in that, At least including: The point cloud data acquisition unit is used to collect raw point cloud information in a parking scenario using an onboard LiDAR sensor, and convert it into three-dimensional point cloud data in the vehicle body coordinate system, and acquire the point cloud data of the target object in the three-dimensional point cloud data. Different target clustering processing units are used to perform clustering processing on the point cloud information of the target objects to obtain the clustering results of static target vehicles and obstacle targets; The parking space determination unit is used to judge the clustering results of the static target vehicles by using preset parking space width threshold and / or length threshold parameters, determine at least one parking space, establish a corresponding parking space spatial model, and obtain the spatial information of each parking space. The planar information acquisition unit is used to obtain the coordinate information of the four vertices of the planar parking space corresponding to each parking space based on the spatial information of each parking space. Specifically, it includes: taking the center point of the bottom rectangle of the parking space space model as the origin of the coordinate system, setting the coordinates of the center point of the bottom rectangle of the 3D bounding box of the parking space as (x, y), and the coordinates of one of the four vertices as (xCoord, yCoord), and the coordinates of the corresponding constructed 2D parking space vertex as (xSlot, ySlot), then the parking space space model is as follows: According to the above formula, the information of the 3D parking space is converted into the coordinates of the four vertices of the 2D parking space. θ is the angle of the parking space. The three-dimensional bounding box is obtained based on the vehicle's width, length, and the allowance on both sides of the parking space. The information of the three-dimensional bounding box includes the center point coordinates, length, width, and angle information. The available parking space determination unit is used to determine the parking spaces that are not affected by obstacles as available parking spaces based on the clustering results of the obstacle targets, and output the corresponding coordinate information of the four vertices.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Auxiliary detection method of peripheral parking space based on 3D laser radar

    CN109031346A

  • Parking space fusion identification method and system for automatic parking

    CN113702983A

  • Parking space detection method based on 4D millimeter wave radar and image identification fusion

    CN114550142A