Idle parking space generation method and vehicle

By generating a set of vehicle detection boxes, identifying the coordinates, orientation angle, and size of the detection boxes, calculating the actual distance, and clustering the detection boxes into a detection box cluster, and combining global and local features to generate vacant parking spaces, the accuracy and scene adaptability issues of vacant parking space generation in automatic parking are solved, achieving more efficient parking space recognition and generation.

CN122176952APending Publication Date: 2026-06-09GUANGZHOU AUTOMOBILE GROUP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU AUTOMOBILE GROUP CO LTD
Filing Date
2026-03-02
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing automatic parking technologies have poor accuracy in generating available parking spaces and insufficient adaptability to different scenarios, leading to frequent misjudgments and missed judgments of parking spaces, which affects parking efficiency and reliability.

Method used

By generating a set of vehicle detection boxes, identifying the coordinates, orientation angle, and size of the detection boxes, calculating the actual distance, and clustering the detection boxes into a detection box cluster, vacant parking spaces are generated by combining global and local features. Interference data is filtered out using timestamps, the triggering conditions for parking space generation are verified, and the orientation and available space of the parking spaces are determined.

Benefits of technology

It improves the accuracy and reliability of generating available parking spaces, enhances scene adaptability, reduces false parking spaces and misidentification, and meets the actual needs of automatic parking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176952A_ABST
    Figure CN122176952A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of automatic parking, in particular to a free parking space generation method and a vehicle. The method comprises the following steps: generating a motor vehicle bounding box set in a target area according to visual sensing data of the vehicle; identifying the coordinates, orientation angle and size of the bounding boxes in the motor vehicle bounding box set; calculating the actual distance between the motor vehicle bounding boxes according to the coordinates, clustering all the motor vehicle bounding boxes into at least one bounding box cluster according to the actual distance; and generating a free parking space according to the orientation angle of all the motor vehicle bounding boxes in the target area and the orientation angle, coordinates and size of all the motor vehicle bounding boxes in the bounding box cluster. Thus, the problems of false parking space release, unreasonable orientation and easy interference during automatic parking in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automatic parking technology, and in particular to a method for generating vacant parking spaces and a vehicle. Background Technology

[0002] Automated parking relies on precise parking space detection technology, but these technologies all have limitations such as poor scene adaptability, insufficient accuracy, or lack of scene understanding, leading to frequent misjudgments and missed judgments of parking spaces, affecting parking efficiency and reliability, and making it difficult to meet the requirements of automated parking for accurate parking space detection and scene adaptability. Summary of the Invention

[0003] This application provides a method and vehicle for generating vacant parking spaces to solve the problems in related technologies, such as the susceptibility to interference during the generation of vacant parking spaces in automatic parking systems, which leads to poor accuracy in generating vacant parking spaces.

[0004] The first aspect of this application provides a method for generating vacant parking spaces, comprising the following steps: generating a set of vehicle detection frames within a target area based on vehicle visual perception data; identifying the coordinates, orientation angles, and dimensions of the vehicle detection frames in the set; calculating the actual distance between the vehicle detection frames based on the coordinates; clustering all vehicle detection frames into at least one detection frame cluster based on the actual distances; and generating vacant parking spaces based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles, coordinates, and dimensions of all vehicle detection frames within the detection frame cluster.

[0005] Based on the aforementioned technical means, this embodiment generates a set of vehicle detection frames within a target area based on the vehicle's visual perception data. It identifies the coordinates, orientation angles, and dimensions of each vehicle detection frame, calculates the actual distance between them based on the coordinates, and clusters all vehicle detection frames into at least one detection frame cluster based on these actual distances. Then, based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles, coordinates, and dimensions of all vehicle detection frames within each detection frame cluster, it generates available parking spaces. This avoids the shortcomings of insufficient scene understanding in related technologies, balancing the overall scene coordination with the accuracy of local area analysis. This improves the accuracy and reliability of the generated available parking spaces, better adapting to the diverse scenario requirements in automatic parking processes.

[0006] Optionally, an vacant parking space is generated based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles, coordinates, and dimensions of all vehicle detection frames within the detection frame cluster. This includes: calculating the orientation angle of the vacant parking space based on the orientation angles of all vehicle detection frames within the target area and the orientation angles of all vehicle detection frames within the detection frame cluster; calculating the available space within the target area based on the orientation angle of the vacant parking space and the coordinates and dimensions of all vehicle detection frames within the detection frame cluster; and generating the vacant parking space based on the available space and the orientation angle of the vacant parking space.

[0007] Based on the aforementioned technical means, this embodiment of the application determines the parking space orientation angle by combining global and local orientation angles, calculates the available space based on the coordinates and dimensions of the detection box cluster, and finally generates vacant parking spaces based on the available space and the parking space orientation angle, thus achieving accurate generation of parking spaces under visual perception. It can fully combine global scene and local area features, improve the rationality of parking space orientation judgment and the accuracy of available space calculation, reduce false parking spaces and misidentification, enhance the reliability of vacant parking space generation and scene adaptability, and better meet the actual usage needs of automatic parking.

[0008] Optionally, the orientation angle of the vacant parking space is calculated based on the orientation angles of all vehicle detection frames within the target area and the orientation angles of all vehicle detection frames within the detection frame cluster. This includes: calculating a first angle distribution based on the orientation angles of all vehicle detection frames within the target area; calculating a second angle distribution based on the orientation angles of all vehicle detection frames within the detection frame cluster; and determining the orientation angle of the vacant parking space based on the first angle distribution and the second angle distribution.

[0009] Based on the aforementioned technical means, in calculating the orientation angle of an vacant parking space, this embodiment first extracts the orientation angles of all vehicle detection frames within the target area to generate a first angle distribution, and the orientation angles of vehicle detection frames within each detection frame cluster to generate a second angle distribution. Then, based on the fusion analysis of the first and second angle distributions, the orientation angle of the vacant parking space is accurately determined. Combining the coordinates and size parameters of the vehicle detection frames within the detection frame cluster, the available space within the target area is further calculated. This dual verification of global and local angle distributions improves the accuracy of parking space orientation angle judgment and available space calculation, solving the problems of poor scene adaptability and easy misjudgment in related technologies.

[0010] Optionally, determining the orientation angle of an vacant parking space based on the first angular distribution and the second angular distribution includes: extracting the proportion of the orientation angle within each angular interval in the first angular distribution; if the proportion of the orientation angle within all angular intervals is less than or equal to a proportion threshold, then calculating the average value of the orientation angles within the detection box cluster based on the second angular distribution, and determining the orientation angle of the vacant parking space based on the average value of the orientation angles within the detection box cluster; if the proportion of the orientation angle within the angular interval is greater than a proportion threshold, then determining a reference orientation angle based on the orientation corresponding to the angular interval, and determining the orientation angle of the vacant parking space based on the second angular distribution and the reference orientation.

[0011] Based on the aforementioned technical means, in determining the orientation angle of an vacant parking space in this embodiment, the proportion of the orientation angle within each angle interval of the first angle distribution is first extracted and compared with a preset proportion threshold. When the proportion of the orientation angle in all angle intervals is less than or equal to the proportion threshold, the system determines the orientation angle of the vacant parking space based on the average orientation angle within the cluster calculated by the second angle distribution. When the proportion of the orientation angle in a certain angle interval is greater than the proportion threshold, the orientation corresponding to that interval is used as a reference orientation angle, and further analysis is performed in conjunction with the second angle distribution to determine the parking space orientation angle. This method uses the first angle distribution to grasp the overall vehicle parking trend within the target area and the second angle distribution to refine the parking details of local clusters, avoiding the one-sidedness of single-dimensional feature judgment and significantly improving the accuracy and reliability of parking space orientation angle recognition under different vehicle distribution scenarios.

[0012] Optionally, determining the orientation angle of an vacant parking space based on the second angular distribution and the reference orientation angle includes: calculating the standard deviation of the orientation angles within the detection frame cluster based on the second angular distribution; calculating the angular deviation between the average value of the orientation angles within the detection frame cluster and the reference orientation angle; and determining the orientation angle of the vacant parking space based on the standard deviation and angular deviation of the orientation angles within the detection frame cluster.

[0013] Based on the aforementioned technical means, in determining the orientation angle of an vacant parking space by combining the second angular distribution and the reference orientation angle, this embodiment first calculates the standard deviation and average value of the orientation angles within the cluster using the second angular distribution, and then calculates the angular deviation between the average value and the reference orientation angle. Subsequently, it comprehensively judges the orientation angle of the vacant parking space based on the standard deviation and angular deviation of the orientation angles within the cluster. This method uses dual verification of the dispersion (standard deviation) and deviation of the local orientation angles. It not only relies on the reference orientation angle to control the overall direction of vehicle parking in the target area, but also ensures the accuracy of the judgment through quantitative analysis of local cluster features, reducing the risk of misjudgment caused by fluctuations in local vehicle orientation, and further improving the accuracy of parking space orientation angle recognition.

[0014] Optionally, the available space within the target area is calculated based on the orientation angle of the vacant parking space and the coordinates and dimensions of all vehicle detection frames within the detection frame cluster. This includes: determining the target edge of the vehicle detection frame based on the orientation angle of the vacant parking space; calculating the edge coordinates of the target edge based on the coordinates and dimensions of the vehicle detection frame; calculating the actual gap between adjacent vehicle detection frames based on the edge coordinates of their respective target edges; and determining the available space based on the actual gap.

[0015] Based on the aforementioned technical means, this application embodiment employs a progressive calculation logic of determining the edge by orientation, calculating parameters by coordinates, and determining the space by gap when calculating the available space within the target area: First, based on the determined orientation angle of the vacant parking space, the target edge of the vehicle detection frame used for calculating the gap is identified; then, combined with the coordinates and dimensions of the detection frame, the specific edge coordinates of the target edge of each detection frame are accurately calculated; finally, based on the edge coordinates of the target edges of adjacent vehicle detection frames, the actual gap between adjacent detection frames is calculated, and then, combined with the preset standard parking space size requirements, the portion that meets the conditions is selected from the actual gap as available space. This calculation method closely integrates with the key edges of the parking space orientation adaptation detection frame, ensuring the accuracy of the available space calculation through the dual guarantee of coordinate quantification and gap selection, providing reliable data support for the subsequent generation of vacant parking spaces that meet actual parking needs.

[0016] Optionally, before calculating the parking space orientation angle of the vacant parking space based on the orientation angles of all vehicle detection frames within the target area and the orientation angles of all vehicle detection frames within the detection frame cluster, the method further includes: identifying the timestamps of vehicle detection frames in the vehicle detection frame set; calculating the existence duration of vehicle detection frames based on their timestamps; and filtering at least one of the vehicle detection frames and the detection frame cluster based on their existence duration.

[0017] Based on the aforementioned technical means, this embodiment of the application employs a timestamp-driven existence duration filtering mechanism to preprocess the data before calculating the orientation angle of vacant parking spaces: First, the timestamp of each detection frame in the vehicle detection frame set is identified; then, the existence duration of each detection frame within the target area is calculated based on the timestamp; finally, at least one of the vehicle detection frames and detection frame clusters is filtered based on the existence duration, eliminating interfering detection frames and unstable clusters caused by temporary passing or short stops. This preprocessing method effectively eliminates dynamic interference data through time-dimensional feature filtering, ensuring the stability and reliability of the detection frame data upon which the subsequent orientation angle calculation relies, thus laying a data foundation for accurately determining the parking space orientation angle.

[0018] Optionally, filtering at least one of the vehicle detection frames and the detection frame cluster based on the existence duration includes: filtering vehicle detection frames with a survival duration less than a first preset duration; counting a first number of vehicle detection frames in the detection frame cluster with a survival duration less than a second preset duration; calculating a quantity ratio based on the first number and a second number of all vehicle detection frames in the detection frame cluster, wherein the first preset duration is greater than the second preset duration; and filtering the detection frame cluster based on the quantity ratio.

[0019] Based on the aforementioned technical means, this embodiment of the application employs a layered and progressive duration-based filtering strategy when filtering vehicle detection frames and detection frame clusters according to their existence duration: First, it directly filters vehicle detection frames with a survival duration less than a first preset duration, eliminating temporarily appearing interfering detection targets; then, for each detection frame cluster, it counts the first number of vehicle detection frames with a survival duration less than a second preset duration, and then calculates the ratio based on the second number of all vehicle detection frames in that cluster; finally, based on a preset ratio standard, it filters out detection frame clusters that do not meet the stability standard. This layered filtering mechanism, by first eliminating individual interfering detection frames and then filtering unstable clusters, ensures from the data source that the detection frame clusters upon which subsequent orientation angle calculations and available space analysis rely have sufficient stability. This avoids interference from invalid data with the calculation results, reduces redundant calculations, improves system operating efficiency, and lays a solid data foundation for accurately generating vacant parking spaces.

[0020] Optionally, before generating an vacant parking space based on available space and the orientation angle of the vacant parking space, the method further includes: identifying a second number of vehicle detection frames in the vehicle detection frame set; if the second number is greater than or equal to a first number threshold, obtaining the area of ​​the detection frame cluster and a third number of vehicles in the detection frame cluster; calculating the density of vehicle detection frames within the detection frame cluster based on the third number and the area of ​​the detection frame cluster; and if the third number is greater than or equal to the second number threshold and the density of vehicle detection frames is greater than or equal to a density threshold, triggering the vacant parking space generation process.

[0021] Based on the aforementioned technical means, this embodiment of the application first verifies the second number of global vehicle detection frames before generating vacant parking spaces. If the second number reaches a first threshold, the area of ​​the detection frame cluster and the third number of vehicle detection frames within the cluster are then obtained. The cluster density is calculated using the third number and the cluster area. The vacant parking space generation process is only triggered when the third number reaches the second threshold and the density reaches the density threshold. By verifying the global number and local number and density, false parking space generation or invalid calculations caused by insufficient global vehicle numbers or scattered local vehicle distribution are effectively avoided. This improves the accuracy and reliability of vacant parking space generation, reduces system resource waste, and further avoids interference factors, ensuring that the generated vacant parking spaces meet the actual needs of automatic parking scenarios, thus enhancing the practicality and adaptability of the method.

[0022] A second aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the vacant parking space generation method as described in the above embodiments.

[0023] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0024] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0025] Figure 1 This is a flowchart of a method for generating vacant parking spaces according to an embodiment of this application; Figure 2 This is a schematic diagram of cluster partitioning provided according to an embodiment of this application; Figure 3 This is a flowchart of global and local feature extraction according to embodiments of this application; Figure 4 This is a flowchart illustrating the parking space triggering condition determination process according to an embodiment of this application. Figure 5 This is a flowchart of a method for generating vacant parking spaces according to another embodiment of this application; Figure 6 This is a structural schematic diagram of a vehicle provided according to an embodiment of this application. Detailed Implementation

[0026] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0027] In related technologies, there are various algorithms for vacant parking spaces in automatic parking systems, mainly divided into three categories. However, these technologies still have shortcomings in practical applications, as detailed below: (1) Ultrasonic radar related technologies: These technologies determine parking spaces by changing the echo distance value. Some technologies combine environmental map correction to improve obstacle detection. However, they still rely on the characteristics of ultrasonic sensors, which have prominent limitations. They cannot adapt to angled parking scenarios, have low depth detection accuracy for vertical parking spaces, and release parking spaces "equally" for all obstacles. They cannot construct parking spaces in the space directly in front or in slightly distant locations. Furthermore, parking spaces are only released after the vehicle has driven a certain distance, resulting in poor scene coverage.

[0028] (2) Obstacle point and point cloud related technologies: including fitting features based on the distribution of discrete obstacle points, and constructing parking spaces by calculating target parameters through projection points with point cloud data as a reference. These technologies have poor robustness. The detection of obstacle grounding points is easily affected by environmental factors such as occlusion and lighting. The offset or missed detection of some points will directly affect subsequent analysis and parking space construction. At the same time, the accuracy of projection points is not adaptable enough, and the accuracy and pose of parking spaces are easily affected by slight data offsets.

[0029] (3) Visual detection related technologies: Based on the vehicle target detection box, parking spaces can be constructed by combining the vehicle parking angle or image instance segmentation results. Various parking spaces can be generated without relying on the vehicle's posture at close range. It performs better in terms of release timing, depth accuracy, and orientation judgment, but there are still obvious shortcomings. Relying solely on the association relationship of the vehicle detection box or instance area information, it lacks the ability to understand the overall scene, which may generate parking space types that do not meet actual needs, or even erroneously trigger parking space release in non-parking scenarios.

[0030] As a result, the relevant technologies have significant shortcomings in terms of the accuracy of automatic parking space detection, the range of adaptability to complex scenarios, and the ability to make intelligent judgments, making it difficult to meet the diverse needs of actual parking scenarios.

[0031] The following describes a method for generating vacant parking spaces and a vehicle according to embodiments of this application, with reference to the accompanying drawings. Addressing the problems of false parking space releases, unreasonable orientations, and susceptibility to interference mentioned in the background art, this application provides a visual vacant parking space generation method based on global constraints and local features. This method, based on visual OD (Object Detection) to construct vacant parking spaces, solves the problem of understanding parking scenarios and can meet users' needs for parking space type, tilt angle, and orientation required in actual scenarios. In this method, firstly, global and local features of the vehicle's OD are extracted, and multiple local clusters are reasonably divided; then, the triggering conditions for parking space construction are verified by filtering through global quantity and local density; next, the parking space orientation is determined, including the global mainstream orientation and local continuity; then, the dynamic stability of the OD box is verified by the proportion of ODs that persist continuously within a certain period; finally, based on the results obtained from the preceding steps, after determining whether to construct, the parking space orientation type, and available space, a visual vacant parking space is constructed. This application can improve the accuracy of vacant parking space construction, provide parking space type and orientation that meet actual needs, and enhance the anti-interference capability of vacant parking space construction. This invention solves a series of problems in related technologies, such as false parking space release, unreasonable orientation, and susceptibility to interference, and significantly improves the accuracy and robustness of the automatic parking system in detecting available parking spaces, which has important practical significance and application value.

[0032] Specifically, Figure 1 This is a flowchart illustrating a method for generating vacant parking spaces provided in an embodiment of this application.

[0033] like Figure 1 As shown, the method for generating vacant parking spaces includes the following steps: In step S101, a set of vehicle detection frames within the display area is generated based on the vehicle's visual perception data.

[0034] It is understood that this embodiment of the application uses the vehicle's visual perception data as input to generate a set of vehicle detection frames within the display area. Converting the environmental information captured by visual perception into vehicle detection frame data clarifies the target object for subsequent parking space analysis and focuses on the effective range related to parking by defining the display area, avoiding interference from irrelevant data areas. This provides fundamental data support for subsequent processes such as extracting global and local features, verifying parking space generation trigger conditions, and determining parking space orientation, ensuring reliable data support for subsequent stages from the source and guaranteeing the accuracy of subsequent parking space generation.

[0035] It should be noted that the input data in this embodiment is a collection of vehicle OD frames detected by a visual sensor, which may include the coordinates of each frame. Orientation angle ,width ,high timestamp This information provides the basic data dimensions for subsequent feature extraction and cluster analysis.

[0036] In step S102, the coordinates, orientation angle, and size of the vehicle detection frames in the vehicle detection frame set are identified.

[0037] It is understood that this embodiment of the application is based on the set of vehicle detection frames generated in step S101, and obtains global features within the display area through integrated calculation. These global features cover the feature data of all vehicle detection frames within the display area. This achieves a comprehensive summary of vehicle information within the display area, integrating scattered individual detection frame data into unified global features. This not only provides a macroscopic understanding of the overall distribution of vehicles within the display area, but also provides complete data support for subsequent judgments based on global quantity, global mainstream orientation, etc., avoiding analytical biases caused by data fragmentation, and ensuring the comprehensiveness and reliability of subsequent parking space generation-related decisions from an overall perspective.

[0038] It should be noted that the feature data mainly includes the total number of vehicle detection frames, orientation angle distribution, survival time and size distribution within the target area, and only applies to valid detection frames, representing a global summary statistical result.

[0039] Specifically, the global feature calculation process is as follows: count the total number of OD boxes for motor vehicle categories within the target area; calculate the distribution of the orientation angles of all OD boxes and their proportion in each interval; count the distribution of the width and height dimensions of all OD boxes; and record the duration of each OD box from the first frame detection to the current frame.

[0040] In step S103, the actual distance between the vehicle detection frames is calculated based on the coordinates.

[0041] It is understood that the embodiments of this application calculate the actual distance between vehicle detection frames by coordinate calculation. Based on the coordinates of the geometric center point of the detection frame, combined with the mapping relationship between image pixels and real physical scale, the actual distance between vehicle detection frames is calculated.

[0042] It should be noted that DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is an algorithm used to divide local clusters. Based on the spatial distance and distribution density of vehicle detection boxes, it aggregates detection boxes that are close in distance and meet the density standard into independent sub-regions, while filtering out scattered noise points, i.e. isolated vehicle detection boxes, to provide accurate clustering units for subsequent local feature extraction.

[0043] For example, the local clustering uses the DBSCAN clustering algorithm, with the spatial distance between vehicle detection boxes <= 5m as the clustering threshold parameter. The global OD boxes are divided into multiple local clusters (C1, C2, ..., Ck), each containing m OD boxes. The clustering is illustrated below. Figure 2 As shown.

[0044] The above steps complete the extraction of global and local features, such as Figure 3 As shown, this embodiment of the application can analyze the vehicle OD boxes in the target area after receiving the results of front-end visual target detection. When the overall number of vehicle OD boxes in the target area meets the standard and the local distribution is dense, the parking space construction is started, thereby avoiding the incorrect generation of vacant parking spaces due to individual isolated vehicles.

[0045] In step S104, all vehicle detection frames are clustered into at least one detection frame cluster based on the actual distance.

[0046] It is understood that, based on the actual distance between the vehicle detection frames, this application embodiment clusters all vehicle detection frames into at least one detection frame cluster, which can perform localized clustering processing of vehicles in the target area, improve the accuracy and reliability of subsequent parking space generation, and avoid misidentification and interference caused by the scattered distribution of vehicles.

[0047] In step S105, an available parking space is generated based on the orientation angle of all vehicle detection frames within the target area, as well as the orientation angle, coordinates, and size of all vehicle detection frames within the detection frame cluster.

[0048] It is understood that the embodiments of this application generate available parking spaces based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles, coordinates, and dimensions of all vehicle detection frames within the detection frame cluster. By combining the orientation angles, coordinates, and dimensions of the global vehicle detection frames with those of the local detection frame cluster, the one-sidedness caused by single feature analysis is avoided, making the parking space orientation judgment more reasonable and the available space calculation more accurate. This effectively solves the problems of false parking spaces and unreasonable orientations in related technologies, and improves the accuracy and scene adaptability of parking space generation.

[0049] In this embodiment of the application, generating an vacant parking space based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles, coordinates, and dimensions of all vehicle detection frames within the detection frame cluster, includes: calculating the parking space orientation angle of the vacant parking space based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles of all vehicle detection frames within the detection frame cluster; calculating the available space within the target area based on the parking space orientation angle of the vacant parking space and the coordinates and dimensions of all vehicle detection frames within the detection frame cluster; and generating the vacant parking space based on the available space and the parking space orientation angle of the vacant parking space.

[0050] It is understood that this application embodiment determines the parking space orientation angle by combining global and local orientation angles, calculates the available space based on the coordinates and size of the detection box cluster, and finally generates vacant parking spaces based on the available space and the parking space orientation angle, thus achieving accurate generation of parking spaces under visual perception. It can fully combine global scene and local area features, improve the rationality of parking space orientation judgment and the accuracy of available space calculation, reduce false parking spaces and misidentification, enhance the reliability of vacant parking space generation and scene adaptability, and better meet the actual usage needs of automatic parking.

[0051] In this embodiment of the application, before calculating the parking space orientation angle of the vacant parking space based on the orientation angles of all vehicle detection frames within the target area and the orientation angles of all vehicle detection frames within the detection frame cluster, the method further includes: identifying the timestamps of vehicle detection frames in the vehicle detection frame set; calculating the existence duration of vehicle detection frames based on the timestamps of vehicle detection frames; and filtering at least one of the vehicle detection frames and the detection frame cluster based on the existence duration.

[0052] Understandably, this embodiment of the application employs a timestamp-driven existence duration filtering mechanism to preprocess the data before calculating the orientation angle of vacant parking spaces: first, the timestamp of each detection frame in the vehicle detection frame set is identified; then, the existence duration of each detection frame in the target area is calculated based on the timestamp; finally, at least one of the vehicle detection frames and detection frame clusters is filtered based on the existence duration, eliminating interfering detection frames and unstable clusters caused by temporary passing or short stops. This preprocessing method effectively eliminates dynamic interference data through time-dimensional feature filtering, ensuring the stability and reliability of the detection frame data upon which the subsequent orientation angle calculation relies, thus laying a data foundation for accurately determining the parking space orientation angle.

[0053] In this embodiment of the application, filtering at least one of the vehicle detection frames and the detection frame cluster based on the existence duration includes: filtering vehicle detection frames with a survival duration less than a first preset duration; counting a first number of vehicle detection frames in the detection frame cluster with a survival duration less than a second preset duration; calculating a quantity ratio based on the first number and a second number of all vehicle detection frames in the detection frame cluster, wherein the first preset duration is greater than the second preset duration; and filtering the detection frame cluster based on the quantity ratio.

[0054] It is understood that, in filtering vehicle detection frames and detection frame clusters based on their existence duration, this application adopts a hierarchical and progressive duration filtering strategy: First, vehicle detection frames with a survival duration less than a first preset duration are directly filtered out, eliminating temporarily appearing interfering detection targets; then, for each detection frame cluster, the first number of vehicle detection frames with a survival duration less than a second preset duration is counted, and then the ratio is calculated by combining this number with the second number of all vehicle detection frames in the cluster; finally, based on a preset ratio standard, detection frame clusters that do not meet the stability standard are filtered out. This hierarchical filtering mechanism, by first filtering out individual interfering detection frames and then filtering unstable clusters, ensures from the data source that the detection frame clusters upon which subsequent orientation angle calculations and available space analysis rely have sufficient stability. This avoids interference from invalid data with the calculation results, reduces redundant calculations, improves system operating efficiency, and lays a solid data foundation for accurately generating vacant parking spaces.

[0055] It should be noted that the first preset duration is a single-frame stability threshold used to filter out global temporary interference detection frames, and the second preset duration is a criterion for evaluating the stability of single frames within a local detection frame cluster; the first quantity refers to the number of detection frames in a single cluster whose survival time is less than the second preset duration, and the second quantity is the total number of all valid detection frames in a single cluster; the quantity ratio is the ratio of the first quantity to the second quantity, used to quantify the overall stability of the cluster. When the ratio exceeds the preset threshold, the cluster will be judged as an unstable cluster and filtered out.

[0056] Specifically, by using statistics showing that vehicles appear throughout a given period, false clusters formed by vehicles passing by intermittently or gathering briefly can be eliminated. After passing the global quantity threshold verification and local density constraint filtering, the percentage of continuously existing OD frames (OD boxes) within 30 consecutive frames is counted for the selected local clusters. If the percentage does not meet the standard, the cluster is removed. For example, if the number of continuously stable OD frames in a cluster Ck accounts for less than 70% of the total number of OD frames in the cluster, Ck will be filtered out. Local frame lifecycle filtering: For individual OD frames within a cluster, the dwell time of each vehicle is statistically analyzed to filter out vehicles that stop for 1-2 seconds temporarily, preventing them from being counted as parking spaces. At least 80% of the OD frames within the cluster must have a dwell time T>=20 frames, where T is a second preset duration, to pass the verification.

[0057] In this embodiment of the application, the parking space orientation angle of the vacant parking space is calculated based on the orientation angles of all vehicle detection frames in the target area and the orientation angles of all vehicle detection frames in the detection frame cluster. This includes: calculating a first angle distribution based on the orientation angles of all vehicle detection frames in the target area; calculating a second angle distribution based on the orientation angles of all vehicle detection frames in the detection frame cluster; and determining the parking space orientation angle of the vacant parking space based on the first angle distribution and the second angle distribution.

[0058] It is understood that, in calculating the orientation angle of an vacant parking space, this embodiment first extracts the orientation angles of all vehicle detection frames within the target area to generate a first angle distribution, and the orientation angles of vehicle detection frames within each detection frame cluster to generate a second angle distribution. Then, based on the fusion analysis of the first and second angle distributions, the orientation angle of the vacant parking space is accurately determined. Combining the coordinates and size parameters of the vehicle detection frames within the detection frame cluster, the available space within the target area is further calculated. This dual verification of global and local angle distributions improves the accuracy of parking space orientation angle judgment and available space calculation, solving the problems of poor scene adaptability and susceptibility to misjudgment in related technologies.

[0059] In this embodiment of the application, determining the orientation angle of an vacant parking space based on a first angle distribution and a second angle distribution includes: extracting the proportion of the orientation angle within each angle interval in the first angle distribution; if the proportion of the orientation angle within all angle intervals is less than or equal to a proportion threshold, then calculating the average value of the orientation angles within the detection box cluster based on the second angle distribution, and determining the orientation angle of the vacant parking space based on the average value of the orientation angles within the detection box cluster; if the proportion of the orientation angle within the angle interval is greater than the proportion threshold, then determining a reference orientation angle based on the orientation corresponding to the angle interval, and determining the orientation angle of the vacant parking space based on the second angle distribution and the reference orientation.

[0060] It is understood that, in determining the orientation angle of an available parking space in this embodiment, the proportion of the orientation angle within each angle interval of the first angle distribution is first extracted and compared with a preset proportion threshold. When the proportion of the orientation angle in all angle intervals is less than or equal to the proportion threshold, the system determines the orientation angle of the available parking space based on the average orientation angle within the cluster calculated by the second angle distribution. When the proportion of the orientation angle in a certain angle interval is greater than the proportion threshold, the orientation corresponding to that interval is used as a reference orientation angle, and further analysis is performed in conjunction with the second angle distribution to determine the parking space orientation angle. This method uses the first angle distribution to grasp the overall vehicle parking trend in the target area, and the second angle distribution to refine the parking details of local clusters, avoiding the one-sidedness of single-dimensional feature judgment, and greatly improving the accuracy and reliability of parking space orientation angle recognition under different vehicle distribution scenarios.

[0061] It should be noted that the first angle distribution is the statistical distribution feature of the orientation angles of all valid vehicle detection frames within the target area, while the second angle distribution focuses on the orientation angle distribution pattern within a single detection frame cluster. Both adopt a unified standard for dividing vertical, diagonal, and horizontal angle intervals. The percentage threshold is a preset percentage threshold for judging whether there is a strong mainstream orientation globally, such as 70%. When the percentage of a certain angle interval exceeds this threshold, the standard orientation of the corresponding interval is the reference orientation angle; otherwise, the average value of the orientation angles within the cluster is used as the benchmark. Finally, the orientation angle of the vacant parking space determined by combining global and local features needs to match the three parking types: vertical, diagonal, and horizontal, to guide subsequent calculation of available space and generation of parking spaces.

[0062] Specifically, the first step is to perform a global mainstream orientation statistics, dividing all vehicle detection frames into parking intervals based on their orientation angles. The orientations for vertical parking are defined as: 75°~90°, 90°~105°, -105°~-90°, -90°~-75°; for diagonal parking, the orientations are defined as: 15°~75°, 105°~165°, -165°~-105°, -75°~-15°; and for horizontal parking, the orientations are defined as: 0~15°, -15°~0°, -180°~-165°, 165°~180°. Then, the proportion of the orientation angle within each interval in the first angle distribution is extracted. If the proportion of the orientation angle is less than or equal to the proportion threshold, such as below 70%, meaning there is no globally dominant orientation, then the average value of the orientation angle in the sub-region is calculated based on the second angle distribution, and the orientation category corresponding to the average value of the orientation angle in the sub-region is taken as the parking space orientation of this local cluster; if the proportion of the orientation angle is greater than the preset proportion threshold, exceeding 70%, it is defined as the globally dominant orientation, then the orientation angle corresponding to this interval is taken as the reference orientation angle, and the parking space orientation category is determined based on the second angle distribution and the reference orientation.

[0063] In this embodiment of the application, determining the orientation angle of an vacant parking space based on a second angular distribution and a reference orientation angle includes: calculating the standard deviation of the orientation angles within the detection frame cluster based on the second angular distribution; calculating the angular deviation between the average value of the orientation angles within the detection frame cluster and the reference orientation angle; and determining the orientation angle of the vacant parking space based on the standard deviation and angular deviation of the orientation angles within the detection frame cluster.

[0064] It is understood that, in determining the orientation angle of an vacant parking space by combining the second angular distribution and the reference orientation angle, this embodiment first calculates the standard deviation and average value of the orientation angles within the cluster using the second angular distribution, and then calculates the angular deviation between the average value and the reference orientation angle. Subsequently, it comprehensively judges the orientation angle of the vacant parking space based on the standard deviation and angular deviation of the orientation angles within the cluster. This method uses dual verification of the dispersion (standard deviation) and deviation of the local orientation angles. It not only relies on the reference orientation angle to control the overall direction of vehicle parking in the target area, but also ensures the accuracy of the judgment through quantitative analysis of local cluster features, reducing the risk of misjudgment caused by fluctuations in local vehicle orientation, and further improving the accuracy of parking space orientation angle recognition.

[0065] It should be noted that the standard deviation of the orientation angle is defined as the orientation angle values ​​of all vehicle detection frames within a single sub-region. This is a statistically calculated dispersion index reflecting the consistency of vehicle orientation within a local cluster; the smaller the value, the more concentrated the orientation. The average orientation angle is defined as the orientation angle values ​​of all vehicle detection frames within a single sub-region. This statistically calculated average angle represents the overall orientation trend of vehicles within the local cluster. The orientation angle deviation is defined as the absolute angle difference between the average orientation angle within a single sub-region and the center value of the standard angle range corresponding to the reference orientation angle. This reflects the degree of conformity between the local orientation and the global mainstream orientation. The standard deviation threshold is defined as a preset angle threshold for judging whether the vehicle orientation within a local cluster is consistent. 0° is used to check the concentration of local orientation; exceeding this value indicates that the local vehicle orientation is chaotic. The deviation threshold is a preset angle threshold for judging whether the local orientation matches the global mainstream orientation, such as 15°, used to check the deviation range of the local overall orientation from the global benchmark; exceeding this value indicates that the local orientation does not match the global orientation.

[0066] Specifically, to perform local cluster orientation consistency verification, the standard deviation of the orientation angle values ​​of all OD frames within the local cluster is first calculated. Set a consistency threshold for the standard deviation, such as 20°. The average orientation angle of the local clusters deviates from the global mainstream orientation by 20°. 15°, then the cluster is determined. The parking spaces are oriented (vertical, diagonal, horizontal). If a dominant global orientation has not been identified previously, such as 40% vertical, 50% diagonal, and 10% horizontal, then vacant parking spaces are generated according to the independent orientation of the local cluster.

[0067] In this embodiment of the application, the available space within the target area is calculated based on the orientation angle of the vacant parking space and the coordinates and dimensions of all vehicle detection frames within the detection frame cluster. This includes: determining the target edge of the vehicle detection frame based on the orientation angle of the vacant parking space; calculating the edge coordinates of the target edge based on the coordinates and dimensions of the vehicle detection frame; calculating the actual gap between adjacent vehicle detection frames based on the edge coordinates of their respective target edges; and determining the available space based on the actual gap.

[0068] It is understandable that, in calculating the available space within the target area, this application's embodiments employ a progressive calculation logic: determining the edge based on orientation, calculating parameters based on coordinates, and determining space based on gaps. First, based on the determined orientation angle of the vacant parking space, the target edge of the vehicle detection frame used for gap calculation is identified. Then, combining the coordinates and dimensions of the detection frame, the specific edge coordinates of each detection frame's target edge are accurately calculated. Finally, based on the edge coordinates of the target edges of adjacent vehicle detection frames, the actual gap between adjacent detection frames is calculated. Then, combined with preset standard parking space size requirements, the portion meeting the conditions is selected from the actual gap as available space. This calculation method closely integrates with the key edges of the parking space orientation adaptation detection frame. Through the dual guarantee of coordinate quantification and gap selection, the accuracy of available space calculation is ensured, providing reliable data support for subsequently generating vacant parking spaces that meet actual parking needs.

[0069] It should be noted that the target edge is the edge of the vehicle detection frame perpendicular to the direction of the parking space, and the actual gap is the straight-line distance between the target edges of adjacent vehicle detection frames.

[0070] In this embodiment of the application, before generating an vacant parking space based on available space and the orientation angle of the vacant parking space, the method further includes: identifying a second number of vehicle detection frames in the vehicle detection frame set; if the second number is greater than or equal to a first number threshold, obtaining the area of ​​the detection frame cluster and a third number of vehicles in the detection frame cluster; calculating the density of vehicle detection frames in the detection frame cluster based on the third number and the area of ​​the detection frame cluster; if the third number is greater than or equal to the second number threshold and the density of vehicle detection frames is greater than or equal to the density threshold, triggering the vacant parking space generation process.

[0071] It is understood that, before generating vacant parking spaces, this embodiment first verifies the second number of global vehicle detection frames. If the second number reaches the first number threshold, the area of ​​the detection frame cluster and the third number of vehicle detection frames within the cluster are then obtained. The cluster density is calculated using the third number and the cluster area. The vacant parking space generation process is only triggered when the third number reaches the second number threshold and the density reaches the density threshold. By verifying the global number and local number and density, false parking space generation or invalid calculations caused by insufficient global vehicle numbers or scattered local vehicle distribution are effectively avoided. This improves the accuracy and reliability of vacant parking space generation, reduces system resource waste, and further avoids interference factors, ensuring that the generated vacant parking spaces meet the actual needs of automatic parking scenarios, thus enhancing the practicality and adaptability of the method.

[0072] Therefore, the embodiments of this application can ensure the sufficiency of data required for subsequent analysis through the above-mentioned verification method, and select areas with actual analytical value by filtering out local distribution density. This effectively avoids invalid calculations caused by insufficient total data or sparse local vehicles, which reduces the waste of system resources, improves operating efficiency, makes the judgment of triggering conditions more rigorous, significantly reduces the probability of false triggering, and provides a reliable pre-guarantee for accurate analysis of parking spaces.

[0073] It should be noted that the first quantity threshold is the minimum global vehicle quantity threshold for initiating the parking space construction process, such as 3 vehicles. The density threshold is a preset local cluster density judgment standard, limited to the minimum distribution density standard of vehicle detection frames in a single sub-region, such as 0.02 frames / square meter, used to filter out false clusters where vehicles are scattered but the quantity meets the standard. Density is the degree of distribution density of vehicle detection frames in a single sub-region, calculated by dividing the second quantity in the sub-region by the actual area occupied by the sub-region, with the unit being frames / square meter. This calculation is only performed within the sub-region and does not involve the global space.

[0074] Specifically, after obtaining global features and local clusters, it is necessary to use information such as the number and density of surrounding vehicles to verify whether vacant parking spaces can be constructed in this scenario. The process is as follows: Figure 4 As shown, the specific steps are as follows: In step one, a global quantity threshold is determined: a threshold for the number of vehicle OD frames is set, such as 3, and the total number of global OD frames calculated in step S102 is used as the basis for judgment.

[0075] In step two, determine whether the total number of global OD boxes is greater than or equal to the set threshold: if the result is "no": execute "do not start visual vacant parking space construction"; if the result is "yes": enter the local cluster filtering process.

[0076] In step three, local density constraint judgment is initiated to avoid misjudging the quantity condition due to the dispersion of vehicles: In addition to judging whether to trigger the construction of vacant parking spaces based on the global number of motor vehicles, it is also necessary to analyze local features, because there may be multiple cars located in corners but far apart, which may lead to the mistaken assumption that the quantity condition is met and cause incorrect construction.

[0077] In step four, the density of each local cluster is calculated: density D = number of OD frames in the cluster (m) / cluster area S, in units of frames per square meter.

[0078] In step five, a density threshold is set: the reference parking space area is about 10 square meters, and it is set to 0.02 spaces / square meter, that is, 2 spaces / 100 square meters. At the same time, it is determined whether the following conditions are met: "number of OD boxes in the cluster m ≥ 3" and "local density D ≥ 0.02 spaces / square meter": if the result is "no": execute "do not start visual vacant parking space construction"; if the result is "yes": trigger the vacant parking space construction process based on visual detection.

[0079] The vacant parking space generation method proposed in this application constructs a set of vehicle detection frames based on vehicle visual perception data. It extracts global features from all vehicle detection frames within the target area to grasp the overall scene information. Simultaneously, it performs clustering based on the actual distance between vehicle detection frames, extracting local features from each detection frame cluster to focus on subtle differences. Finally, it determines the parking space orientation angle through the fusion analysis of global and local orientation angles. Combining the coordinates and dimensions of the vehicle detection frames within the detection frame cluster, it calculates the available space, generating vacant parking spaces that meet the needs of the actual scene. This method avoids the shortcomings of insufficient scene understanding in related technologies' visual detection methods, balancing the overall scene coordination with the accuracy of local area analysis. This improves the accuracy and reliability of the generated vacant parking spaces, better adapting to the diverse scene requirements in the automatic parking process.

[0080] The workflow of the vacant parking space generation method will be described next through a specific embodiment, such as... Figure 5 As shown, the specific steps are as follows: In step one, global and local features are extracted.

[0081] Specifically, the global features of the vehicle detection frame set are extracted, which includes the feature data of all vehicle detection frames in the display area. The display area is then divided into multiple detection frame clusters according to the spatial distance of all vehicle detection frames. Local features within each detection frame cluster are extracted, which includes the feature data of all vehicle detection frames within the cluster, to provide data support for subsequent analysis.

[0082] In step two, the parking space construction trigger condition is determined.

[0083] Specifically, the triggering conditions for generating vacant parking spaces are verified based on the second quantity (total global quantity), the third quantity (local cluster quantity), and the density threshold. The second quantity of vehicle detection boxes in the global features is verified to be greater than or equal to the first quantity threshold. If the threshold is met, the quantity density of vehicle detection boxes within the detection box cluster is calculated. When the third quantity of the detection box cluster is greater than or equal to the second quantity threshold, and the quantity density is greater than or equal to the density threshold, the parking space construction triggering condition verification is considered successful.

[0084] In step three, the orientation of the parking space is determined.

[0085] Specifically, by statistically analyzing global mainstream orientations and verifying the consistency of orientations in local clusters, the orientation category (vertical, diagonal, horizontal) of parking spaces is determined. First, the percentage of orientation angles within the global vehicle OD frame is calculated. If the percentage of a certain orientation exceeds... This is defined as the global mainstream orientation; then the standard deviation and mean of the orientation angle within the local cluster are calculated, if the standard deviation... 20° and deviates from the global mainstream orientation If the angle is 15°, the parking space orientation of the cluster is determined; if there is no strong mainstream orientation globally, the parking space orientation is determined according to the independent orientation of the local cluster.

[0086] In step four, dynamic stability is checked.

[0087] Specifically, the temporal stability of detection box clusters and the lifecycle of individual OD boxes are filtered to exclude false or temporary interference clusters. The percentage of OD boxes that persist continuously within a local cluster over 30 consecutive frames is statistically analyzed. Passed, and requires cluster Duration of OD frame The frame and the second preset duration are used to filter unstable clusters and temporary vehicles.

[0088] In step five, visually available parking spaces are generated.

[0089] Specifically, based on the cluster of detection boxes that have passed the verification at each step, combined with the determined orientation category and available space, vacant parking spaces are generated based on visual OD (Original Design Location), and the parking space coordinates, orientation angle, category, confidence level, and other information are output. The available space is calculated based on the coordinates of all vehicle OD boxes within the detection box cluster. Based on the orientation category (e.g., longitudinal, lateral), the available space between adjacent OD boxes is calculated: If the orientation is longitudinal (i.e., the front of the vehicle is along the road), the lateral distance between the right edge of the vehicle on the left and the left edge of the vehicle on the right is calculated using the "lateral edge coordinates" of the OD box as a reference. For example, if the x-coordinate of the right edge of vehicle A is 10m and the x-coordinate of the left edge of vehicle B is 13m, the gap is 3m. If the orientation is lateral (i.e., the front of the vehicle is perpendicular to the road), the longitudinal distance between the rear edge of the vehicle in front and the front edge of the vehicle behind is calculated using the "longitudinal edge coordinates" of the OD box as a reference. For example, if the y-coordinate of the rear edge of vehicle C is 20m and the y-coordinate of the front edge of vehicle D is 25m, the gap is 5m. Gap values ​​≥ "effective gap ≥ minimum width / length of standard parking space" are filtered, such as a minimum width of ≥2.2m for longitudinal parking spaces and a minimum length of ≥4.8m for lateral parking spaces, as available space for generating parking spaces. The final output includes parking space coordinates, orientation angle, category, and confidence level.

[0090] In summary, this application has at least the following beneficial effects: (1) Improve the accuracy of parking space construction: By introducing a dual dimension of global quantity threshold judgment and local density constraint judgment, parking space construction will not be started when the total number of global motor vehicle OD boxes does not reach the threshold. At the same time, the density of local clusters and the number of boxes in the clusters are filtered to avoid incorrect generation of parking spaces due to scattered vehicles on the roadside, so that the parking space construction is more in line with the actual parking area distribution and greatly reduces false parking spaces.

[0091] (2) Optimize the rationality of parking space orientation judgment: Integrate global and local information to determine the parking space orientation. First, divide the global OD frame orientation angle intervals and count the proportions. If the proportion of a certain orientation reaches the strong mainstream threshold, it is determined as the global mainstream orientation. Then, verify the standard deviation of the OD frame orientation angle in the local cluster and its deviation from the global mainstream orientation to ensure local consistency. This method makes the parking space orientation highly consistent with the parking orientation of most vehicles in the actual scenario, improves the rationality of parking space planning, and facilitates smooth automatic parking of vehicles.

[0092] (3) Enhance the stability and anti-interference capability of parking space construction: Dual verification is performed from two time dimensions: global time stability and local box life cycle. Globally, the proportion of OD boxes that exist continuously within 30 consecutive frames in the local cluster is monitored. Locally, a certain proportion of OD boxes in the cluster are required to exist for a certain number of frames. This effectively filters temporary vehicle interference and ensures that only areas where vehicles are parked stably for a long time are constructed as parking spaces, thereby improving the anti-interference capability and reliability of the automatic parking system in complex dynamic environments.

[0093] (4) Construct a comprehensive and efficient parking space construction optimization system: By fully extracting global and local features, the total number of global OD boxes and the distribution of orientation angles are counted. The DBSCAN clustering algorithm is used to divide local clusters to extract local features, so that subsequent steps such as parking space construction triggering, orientation determination, and dynamic stability verification are closely linked, forming a complete visual vacant parking space construction optimization system based on the idea of ​​"whole and local". This effectively solves problems such as false parking space release, unreasonable orientation, and weak anti-interference ability in related technologies, significantly improves the accuracy and robustness of vacant parking space perception in automatic parking systems, and has important practical significance and application value.

[0094] Figure 6 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include: The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.

[0095] When the processor 602 executes the program, it implements the vacant parking space generation method provided in the above embodiments.

[0096] Furthermore, the vehicle also includes: Communication interface 603 is used for communication between memory 601 and processor 602.

[0097] The memory 601 is used to store computer programs that can run on the processor 602.

[0098] The memory 601 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0099] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0100] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.

[0101] The processor 602 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0102] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0103] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0104] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0105] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0106] Those skilled in the art will understand that all or part of the steps of the methods implementing the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0107] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for generating vacant parking spaces, characterized in that, Includes the following steps: Generate a set of vehicle detection boxes within the target area based on the vehicle's visual perception data; Identify the coordinates, orientation angle, and dimensions of the vehicle detection frames in the vehicle detection frame set; Calculate the actual distance between the vehicle detection frames based on the coordinates; Based on the actual distance, all vehicle detection frames are clustered into at least one detection frame cluster; Available parking spaces are generated based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles, coordinates, and dimensions of all vehicle detection frames within the detection frame cluster.

2. The method for generating vacant parking spaces according to claim 1, characterized in that, The step of generating vacant parking spaces based on the orientation angles of all vehicle detection frames within the target area, as well as the orientation angles, coordinates, and dimensions of all vehicle detection frames within the detection frame cluster, includes: The orientation angle of the vacant parking space is calculated based on the orientation angles of all vehicle detection frames within the target area and the orientation angles of all vehicle detection frames within the detection frame cluster. The available space within the target area is calculated based on the orientation angle of the vacant parking space and the coordinates and dimensions of all vehicle detection frames within the detection frame cluster. A vacant parking space is generated based on the available space and the orientation angle of the vacant parking space.

3. The method for generating vacant parking spaces according to claim 1, characterized in that, The step of calculating the parking space orientation angle of an vacant parking space based on the orientation angles of all vehicle detection frames within the target area and the orientation angles of all vehicle detection frames within the detection frame cluster includes: The first angle distribution is calculated based on the orientation angles of all vehicle detection frames within the target area; The second angle distribution is calculated based on the orientation angles of all motor vehicle detection frames within the detection frame cluster; The parking space orientation angle of the vacant parking space is determined based on the first angle distribution and the second angle distribution.

4. The method for generating vacant parking spaces according to claim 3, characterized in that, Determining the parking space orientation angle of the vacant parking space based on the first angular distribution and the second angular distribution includes: Extract the proportion of the orientation angle within each angle interval in the first angle distribution; If the proportion of the orientation angle in all angle intervals is less than or equal to the proportion threshold, then the average value of the orientation angle in the detection box cluster is calculated according to the second angle distribution, and the parking space orientation angle of the vacant parking space is determined according to the average value of the orientation angle in the detection box cluster. If the proportion of the orientation angle within the angle range is greater than the proportion threshold, then a reference orientation angle is determined based on the orientation corresponding to the angle range, and the parking space orientation angle of the vacant parking space is determined based on the second angle distribution and the reference orientation.

5. The method for generating vacant parking spaces according to claim 4, characterized in that, Determining the parking space orientation angle of the vacant parking space based on the second angular distribution and the reference orientation angle includes: Calculate the standard deviation of the orientation angle within the detection box cluster based on the second angular distribution; Calculate the angular deviation between the average value of the orientation angles within the detection frame cluster and the reference orientation angle; The orientation angle of the vacant parking space is determined based on the standard deviation of the orientation angle within the detection frame cluster and the angle deviation.

6. The method for generating vacant parking spaces according to claim 1, characterized in that, The step of calculating the available space within the target area based on the orientation angle of the vacant parking space and the coordinates and dimensions of all vehicle detection frames within the detection frame cluster includes: The target edge of the vehicle detection frame is determined based on the orientation angle of the vacant parking space; Calculate the edge coordinates of the target edge based on the coordinates and dimensions of the vehicle detection frame; The actual gap between adjacent vehicle detection frames is calculated based on the edge coordinates of their respective target edges, and the available space is determined based on the actual gap.

7. The method for generating vacant parking spaces according to claim 2, characterized in that, Before calculating the parking space orientation angle of the vacant parking space based on the orientation angles of all vehicle detection frames within the target area and the orientation angles of all vehicle detection frames within the detection frame cluster, the method further includes: Identify the timestamps of the vehicle detection frames in the vehicle detection frame set; The duration of existence of the vehicle detection frame is calculated based on the timestamp of the vehicle detection frame. Filter at least one of the vehicle detection frames and the detection frame cluster based on the duration of existence.

8. The method for generating vacant parking spaces according to claim 7, characterized in that, The step of filtering at least one of the vehicle detection frames and the detection frame cluster based on the existence duration includes: Filter out vehicle detection frames whose survival time is less than a first preset time; The first number of motor vehicle detection frames in the detection frame cluster whose survival time is less than the second preset time is counted. The number ratio is calculated based on the first number and the second number of all motor vehicle detection frames in the detection frame cluster, wherein the first preset time is greater than the second preset time. The detection box cluster is filtered according to the stated quantity ratio.

9. The method for generating vacant parking spaces according to claim 2, characterized in that, Before generating an available parking space based on the available space and the parking space orientation angle of the available parking space, the process further includes: Identify a second number of motor vehicle detection frames in the set of motor vehicle detection frames; If the second quantity is greater than or equal to the first quantity threshold, then the area of ​​the detection box cluster and the third quantity of motor vehicles in the detection box cluster are obtained; The density of motor vehicle detection frames within the detection frame cluster is calculated based on the third quantity and the area of ​​the detection frame cluster. If the third quantity is greater than or equal to the second quantity threshold, and the density of the vehicle detection frame is greater than or equal to the density threshold, then the process of generating the vacant parking space is triggered.

10. A vehicle, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the vacant parking space generation method according to any one of claims 1-9.