Collision detection method and system for automatic parking path

By constructing sets of coarse and precise circles, and combining binary grid maps and fast Euclidean distance transformation, the problems of low efficiency and poor accuracy of collision detection in automatic parking systems are solved, achieving efficient and accurate collision detection, which is suitable for resource-constrained vehicle platforms.

CN121492916APending Publication Date: 2026-02-10DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511759282.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing collision detection methods in automatic parking systems suffer from low efficiency, poor accuracy, high memory consumption, and poor adaptability to high-dimensional data, especially on resource-constrained automotive embedded platforms.

Method used

Two-layer collision detection is performed using coarse and precise circle sets. By combining binary grid maps and fast Euclidean distance transformation, a distance grid map is constructed to determine the collision between the vehicle and the obstacle, thus avoiding redundant detection and false judgment.

Benefits of technology

It improves the accuracy and efficiency of collision detection, reduces memory overhead, and adapts to different data distributions and high-dimensional data, making it suitable for real-time collision detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121492916A_ABST
    Figure CN121492916A_ABST
Patent Text Reader

Abstract

The invention provides a collision detection method and system for an automatic parking path, and belongs to the technical field of intelligent driving and automatic parking. The method comprises the steps that a rough circle set and a precise circle set are constructed, the rough circle set is used for preliminary collision detection of a vehicle, and the precise circle set is used for further collision detection; based on the vehicle position sensing data, a binary grid map of the distances between different positions and the nearest obstacle of the current vehicle is constructed, and a distance grid map is generated through a fast Euclidean distance transformation algorithm; and sequentially inquiring grid values of the circle centers of the rough circle and the precise circle in the distance grid map, if the grid values are both greater than 0, judging that no collision exists, otherwise, judging that the collision exists. According to the method, the detection precision is improved through the layered collision circle model, the calculation complexity is reduced to O (n) through the efficient fast Euclidean distance transformation algorithm, low memory overhead is ensured by utilizing the fixed-resolution grid, and the method is particularly suitable for a real-time automatic parking system of a vehicle-mounted embedded platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent driving and automatic parking technology, and in particular to a collision detection method and system for automatic parking paths. Background Technology

[0002] Automated parking systems are a key function of intelligent driving, and the performance of their path planning module directly affects the system's real-time performance and safety. The hybrid A* algorithm is widely used because it can generate smooth paths that conform to vehicle kinematics; however, this algorithm requires massive collision detection during the search process, which places extremely high demands on the efficiency of the detection algorithm.

[0003] Existing collision detection solutions largely rely on Euclidean distance calculation methods based on spatial partitioning structures such as KD-Trees. These methods have inherent drawbacks: First, the boundary regions of the spatial partitioning easily lead to redundant detection, reducing efficiency; second, their search performance significantly degrades when dealing with high-dimensional data or unevenly distributed data, resulting in the "curse of dimensionality"; and third, building and maintaining the KD-Tree structure itself requires considerable time and memory overhead, which is particularly disadvantageous on resource-constrained automotive embedded platforms.

[0004] Therefore, there is an urgent need in this field for a real-time collision detection solution that can balance high accuracy and high efficiency, and is especially suitable for automatic parking scenarios. Summary of the Invention

[0005] The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a collision detection method and system for automatic parking paths.

[0006] In a first aspect, the present invention provides a collision detection method for an automatic parking path, comprising:

[0007] Construct a coarse circle set and a precise circle set. The coarse circle set is used for initial collision detection of the vehicle, and the precise circle set is used for further collision detection.

[0008] Based on vehicle position perception data, a binary grid map of the distance between different positions and the nearest obstacle to the current vehicle is constructed. A distance grid map is generated based on the binary grid map, and each grid position value represents the distance to the nearest obstacle at the current position.

[0009] The center of the rough circle and the precise circle are sequentially queried in the distance grid value in the grid map, and a collision is determined based on the grid value.

[0010] Preferably, the set of rough circles includes a first number of circles enclosing the vehicle body and a second number of circles enclosing the rearview mirrors;

[0011] The precise circle set includes a third number of circles enclosing the front and rear of the vehicle, a fourth number of circles enclosing the middle of the vehicle body, and a fifth number of circles enclosing the rearview mirrors, and the total number of circles in the precise circle set is greater than the total number of circles in the coarse circle set.

[0012] Preferably, the diameter of the first number of circles is not less than the vehicle width, and the diameter of the second number of circles is the length of the rearview mirror;

[0013] The diameter of the third circular number is smaller than the length of the rearview mirror, the diameter of the fourth circular number is no greater than the width of the vehicle, and the diameter of the fifth circular number is the length of the rearview mirror.

[0014] Preferably, the step of generating a distance grid map based on a binary grid map specifically includes:

[0015] The binary grid map is transformed into a fast Euclidean distance in two scans in the form of a 3×3 neighborhood to generate a distance grid map.

[0016] Preferably, the step of performing a fast Euclidean distance transformation on the binary grid map in two scans in the form of a 3×3 neighborhood to generate a distance grid map specifically includes:

[0017] Based on the vehicle's current position, the grid is traversed in a forward scan order from top to bottom and from left to right, and the distance value of the current grid is updated using the distance values ​​of the neighboring grids to the left, upper left, above, and upper right of the current grid.

[0018] Based on the vehicle's current position, the grid is traversed from bottom to top and from right to left through backward scanning, and the distance value of the current grid is updated using the distance values ​​of the neighboring grids to the right, lower right, below, and lower left of the current grid.

[0019] Preferably, the distance value update method specifically includes:

[0020] P(x,y)=min(d0,d1,...,dk);

[0021] Where P(x,y) is the updated distance value of the grid at coordinate (x,y), d0 is the original distance value of the grid at coordinate (x,y), and di is the distance value of the i-th neighboring grid of the grid at (x,y) plus the Euclidean distance between the i-th neighboring grid and the grid at coordinate (x,y).

[0022] Preferably, in the forward scan, the raster value update rule at coordinates (x, y) is as follows:

[0023] d0=p(x,y);

[0024] d1=p(x-1,y)+disf((x-1,y),(x,y));

[0025] d2=p(x-1,y-1)+disf((x-1,y-1),(x,y));

[0026] d3=p(x,y-1)+disf((x,y-1),(x,y));

[0027] d4=p(x+1,y-1)+disf((x+1,y-1),(x,y));

[0028] P(x,y)=min(d0,d1,d2,d3,d4);

[0029] Where p(x,y) is the distance value of the raster at coordinate (x,y) before the update, P(x,y) is the distance value of the raster at coordinate (x,y) after the update, p(x-1,y) is the distance value of the left neighbor raster of the current raster, disf((x-1,y),(x,y)) is the Euclidean distance between the left neighbor raster and the current raster, p(x-1,y-1) is the distance value of the top-left neighbor raster of the current raster, and disf((x-1,y-1),( p(x,y-1) represents the Euclidean distance between the top-left neighboring grid and the current grid, p(x,y-1) represents the distance between the top-right neighboring grid and the current grid, disf((x,y-1),(x,y)) represents the Euclidean distance between the top-right neighboring grid and the current grid, p(x+1,y-1) represents the distance between the top-right neighboring grid and the current grid, and disf((x+1,y-1),(x,y)) represents the Euclidean distance between the top-right neighboring grid and the current grid.

[0030] Preferably, in the backward scan, the raster value update rule at coordinates (x, y) is as follows:

[0031] d0=p(x,y);

[0032] d5=p(x+1,y)+disf((x+1,y),(x,y));

[0033] d6=p(x+1,y+1)+disf((x+1,y+1),(x,y));

[0034] d7=p(x,y+1)+disf((x,y+1),(x,y));

[0035] d8=p(x-1,y+1)+disf((x-1,y+1),(x,y));

[0036] P(x,y)=min(d0,d5,d6,d7,d8);

[0037] Where p(x,y) is the distance value of the raster at coordinate (x,y) before the update, P(x,y) is the distance value of the raster at coordinate (x,y) after the update, p(x+1,y) is the distance value of the right neighboring raster of the current raster, disf((x+1,y),(x,y)) is the Euclidean distance between the right neighboring raster and the current raster, and p(x+1,y+1) is the distance value of the lower right neighboring raster of the current raster. p(x,y)) represents the Euclidean distance between the current grid and the lower right neighboring grid, p(x,y+1) represents the distance between the current grid and the lower neighboring grid, disf((x,y+1),(x,y)) represents the Euclidean distance between the current grid and the lower neighboring grid, p(x-1,y+1) represents the distance between the current grid and the lower left neighboring grid, and disf((x-1,y+1),(x,y)) represents the Euclidean distance between the current grid and the lower left neighboring grid.

[0038] Secondly, the present invention provides a collision detection system for automatic parking paths, comprising:

[0039] The collision circle construction module is configured to build a coarse circle set and a precise circle set. The coarse circle set is used for initial collision detection of the vehicle, and the precise circle set is used for further collision detection.

[0040] The distance grid map generation module is configured to construct a binary grid map of the distance between different locations and the nearest obstacle to the current vehicle based on vehicle position perception data, and generate a distance grid map based on the binary grid map, where each grid position value represents the distance to the nearest obstacle at the current location.

[0041] The collision determination module is configured to sequentially query the grid values ​​of the center of the rough circle and the precise circle in the distance grid map, and determine whether a collision occurs based on the grid values.

[0042] Thirdly, the present invention provides an electronic device, comprising:

[0043] One or more processors;

[0044] Memory, used to store one or more programs;

[0045] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0046] This invention provides a collision detection method for automatic parking paths. It constructs a coarse circle set and a precise circle set. The coarse circle set is used for initial collision detection, while the precise circle set is used for further collision detection. By filtering through these two layers of collision circles, it can more accurately determine whether a vehicle has collided with an obstacle. The coarse circle set is used for initial detection; if a collision occurs within the coarse circle, the system proceeds to the precise collision circle detection, thus avoiding false positives and false negatives.

[0047] By constructing a distance grid using a fast Euclidean distance transformation method, the time complexity is reduced to O(n). Compared with the traditional method of performing BFS for each point, this greatly improves the algorithm's running efficiency and can quickly generate a distance grid, thereby accelerating the collision detection speed. Attached Figure Description

[0048] Figure 1 This is a flowchart illustrating a collision detection method for an automatic parking path provided in an embodiment of the present invention.

[0049] Figure 2 This is a schematic diagram of a rough circle set provided by the embodiment of the present invention;

[0050] Figure 3 This is a schematic diagram of the precise circle set provided by the embodiment of the present invention;

[0051] Figure 4 This is a schematic diagram of a binary raster representing the method provided in the embodiments of the present invention;

[0052] Figure 5 This is a schematic diagram illustrating the fast Euclidean distance calculation method provided in the embodiments of the present invention;

[0053] Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0054] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0055] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.

[0056] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0057] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0058] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0059] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.

[0060] Automated parking is a fundamental and crucial component of intelligent driving. Currently, most automated parking systems on the market primarily employ geometric methods and a hybrid A* algorithm for path planning during the APA (Automatic Parking Assist) stage.

[0061] Geometric methods, with their fast planning speed and efficient replanning capabilities, have relatively low requirements for collision detection. However, the hybrid A* algorithm requires extensive searching and node expansion, with each expansion necessitating multiple collision checks. Therefore, the hybrid A* algorithm places extremely high demands on the efficiency and accuracy of its collision detection algorithm. A good collision detection algorithm can significantly reduce the processing time of the hybrid A* algorithm and improve the user experience.

[0062] In general, the existing technology has the following problems:

[0063] 1. Spatial partitioning accuracy issue: KD-trees are based on hyperrectangles for spatial partitioning. This partitioning method may lead to an excessively large search range in some cases, thereby reducing search accuracy. For example, in collision detection, objects that are far apart but within the same partitioned area may be included in the detection range, increasing unnecessary computation.

[0064] 2. Poor adaptability to high-dimensional data: As the dimensionality of data increases, the search efficiency of KD-trees decreases significantly, becoming susceptible to the "curse of dimensionality." In high-dimensional space, the distribution of data points becomes sparser, the partitioning effect deteriorates, leading to reduced search efficiency.

[0065] 3. Sensitive to data distribution: The performance of a KD-tree largely depends on the distribution of the data. If the data is unevenly distributed, for example, most data points are clustered in one area while other areas have very few data points, the partitioning effect of the KD-tree will be greatly reduced, leading to decreased search efficiency.

[0066] 4. Memory overhead: KD-trees require storing a large amount of node information during construction, which can lead to high memory overhead for large datasets. This can be a problem in resource-constrained environments (such as embedded systems).

[0067] 5. Redundant detection in boundary regions: When processing objects in boundary regions, KD-trees may lead to redundant collision detection. For example, when an object is located on the boundary between two partitioned regions, it may be detected multiple times. This not only increases the computational load but may also lead to inconsistencies in the detection results.

[0068] 6. Construction time may be long: For very large datasets, building a KD-tree can itself take a long time, especially as the amount of data continues to grow. This can be a bottleneck in applications requiring fast response times (such as real-time collision detection).

[0069] To address at least one of the technical problems existing in the aforementioned related technologies, the present invention provides a collision detection method for automatic parking paths. Figure 1 This is a flowchart illustrating a collision detection method for an automatic parking path provided by an embodiment of the present invention. The method includes:

[0070] S1, Construction of vehicle collision circles: Establish a rough circle set and a precise circle set. The rough circle set is used for preliminary collision detection, and the precise circle set is used for further collision detection.

[0071] S2, Distance Map Construction and Query: Based on vehicle location perception data, construct a binary grid map of the distance between different locations and the nearest obstacle to the current vehicle. Generate a distance grid map based on the binary grid map, where each grid position value represents the distance to the nearest obstacle at the current location.

[0072] S3, Collision Detection: Sequentially query the grid values ​​of the center of the rough circle and the precise circle in the distance grid map, and determine whether a collision occurs based on the grid values.

[0073] This invention eliminates the need for spatial partitioning, automatically filtering out information about distant obstacles and preventing a decrease in search accuracy due to spatial partitioning. It also simplifies data structure maintenance. The free space is sampled and uniformly formed into a 512*512 binary raster. In this case, there is no high-dimensional data; all data is transferred to a two-dimensional space. The issue of data distribution is no longer a concern because dynamic programming is used to update all distance points. Therefore, regardless of the obstacle's location on the map, its information will eventually be synchronized to the entire distance raster.

[0074] As another embodiment of the present invention, two sets of collision circles are established. The first is the establishment of a set of rough circles, such as... Figure 2 As shown, the vehicle body is enclosed by three large green circles with a diameter no less than the vehicle width, and two smaller blue circles enclose the two rearview mirrors, with a diameter equal to the length of the rearview mirror. A total of five circles are used as the first-stage collision detection calibration circles. If a collision occurs using the first-stage rough circle, the system proceeds to the second-stage precise collision detection circle, as shown... Figure 3 As shown, twelve small red circles surround the front and rear of the car to detect collisions between the front and rear. Four large green circles enclose the middle part of the car body, and two small blue circles surround the rearview mirrors. There are a total of 18 circles.

[0075] In another embodiment of the present invention, the input is a fixed-size binary raster image transmitted by perceptual fusion, where 1 represents the presence of obstacles and 0 represents the absence of obstacles, such as... Figure 4 The image shown is a binary raster image, specifically a distance raster image. Each cell represents a pixel or distance; that is, each location value represents the distance to the nearest obstacle at the current location. Therefore, the time complexity of the query is O(log n), which is equal to the number of circles. (23) .

[0076] For example, the following table shows a 3x3 binary raster image of a real obstacle:

[0077] ;

[0078] The generated 3x3 distance grid is shown in the table below:

[0079] .

[0080] As another embodiment of the present invention, by querying the grid value Disc of the center C of the rough circle and the precise circle in the distance grid map, the difference between the circle radius Rdiusc and the grid value Disc is determined. If the difference is greater than 0, it is determined that there is no collision; otherwise, it is determined that there is a collision.

[0081] As another embodiment of the present invention, since the time complexity of the overall construction of the collision circle and the collision query is very low, the main algorithm time consumption is mainly focused on how to efficiently construct the distance grid map.

[0082] The simplest idea is to perform BFS for every grid point, and with some optimizations and pruning, the time complexity can be controlled to O(n). (n*n+n) However, this time complexity is still too high. Therefore, this invention uses a method of "implementing fast Euclidean distance transformation in two scans using a 3×3 neighborhood" to reduce the time complexity to O(n). (n*n) .

[0083] The specific algorithm is as follows:

[0084] Let p be the point whose distance needs to be calculated, and q1, q2, ..., q8 be the 8 nearest neighbors of p. See the table below:

[0085]

[0086] Therefore, N1(p) = {q1, q2, q3, q4} and N2(p) = {q5, q6, q7, q8}. The parameters are defined as follows:

[0087] f: Binary raster image;

[0088] F: Foreground (target) pixel set, or foreground raster value set;

[0089] F0: Background pixel set;

[0090] O: The set of background boundary pixels, which is the set of 8 pixels adjacent to the foreground pixel;

[0091] Q: A set of foreground pixels with the minimum square Euclidean distance, where the nearest background boundary pixel can be located anywhere;

[0092] R(p): The relative coordinate vector of pixel p, R(p) = (R x ,R y ), R x (p) and R y(p) represents the horizontal and vertical pixel (raster value) distances between grid point p (i.e., pixel p) and the nearest background pixel, respectively. Initialized to all (0,0);

[0093] h(p,q): the squared Euclidean distance difference between p and q, where q∈N1∪N2;

[0094] G(p,q): The relative coordinate difference between p and q, where q∈N1∪N2.

[0095] The formulas for calculating h(p,q) and G(p,q) are as follows:

[0096] ;

[0097] For calculating the squared Euclidean distance transform of pixel p, when the nearest background pixel o is located at the top left corner of p, the relevant neighborhood can be divided into four cases, as shown in the reference. Figure 5 Case 1: The least square Euclidean distance (SED) comes from q1. Assume q1∈Q: Let the relative coordinates of q1 be R(q1)=(Rx−1,Ry), starting from o, where o∈O.

[0098] The squared Euclidean distance (SED) at q1 is:

[0099] ;

[0100] Therefore, the SED at p is:

[0101] ;

[0102] The SED difference between p and q1 is:

[0103] ;

[0104] Since Rx(q1) = (Rx−1) and G(p,q1) = (1,0), therefore:

[0105] ;

[0106] .

[0107] Case 2: The minimum SED comes from q2. Similarly, the difference in SED between p and q2 can be obtained as follows:

[0108] ;

[0109] Since Rx(q2)=(Rx−1), Ry(q2)=(Ry−1) and G(p,q2)=(1,1), therefore:

[0110] .

[0111] Case 3: The minimum SED comes from q3. Similarly, the difference in SED between p and q3 can be obtained as follows:

[0112] ;

[0113] Since Ry(q3)=(Ry−1) and G(p,q3)=(0,1), therefore:

[0114] .

[0115] Case 4: The minimum SED comes from q4. In this case, there exists R(q3) = (Rx, Ry−1), which is closer to o than q4 and can provide a smaller squared Euclidean distance transform (SEDT) for p. The calculation method is the same when the nearest background pixel o is located at the top right corner of p.

[0116] In summary, the SED of each layer is calculated using mathematical induction. Let l represent the chessboard distance of the background pixel o. When l=1, the pixels of interest are the eight neighboring pixels of the background pixel o, i.e., the first layer. These pixels have a chessboard distance of 1 from o. Assume that when l=k, the target pixel in the k-th layer can obtain its minimum SED from the pixels in the (k-1)-th layer, and when l=k+1, the target pixel in the (k+1)-th layer can also obtain its minimum SED from the pixels in the k-th layer. Therefore, the SED of the target pixel in each layer can be obtained from the previous layer.

[0117] As another embodiment of the present invention, based on the current position of the vehicle, the grid is traversed in a forward scan order from top to bottom and from left to right, and the distance value of the current grid is updated using the distance values ​​of the neighboring grids to the left, upper left, above, and upper right of the current grid; based on the current position of the vehicle, the grid is traversed in a backward scan order from bottom to top and from right to left, and the distance value of the current grid is updated using the distance values ​​of the neighboring grids to the right, lower right, below, and lower left of the current grid.

[0118] In the forward scan, image I is traversed sequentially from top to bottom and from left to right; this process is called forward looping. For each pixel (x, y), its distance to its neighboring pixels is calculated:

[0119] d0=p(x,y);

[0120] d1=p(x-1,y)+disf((x-1,y),(x,y));

[0121] d2=p(x-1,y-1)+disf((x-1,y-1),(x,y));

[0122] d3=p(x,y-1)+disf((x,y-1),(x,y));

[0123] d4=p(x+1,y-1)+disf((x+1,y-1),(x,y));

[0124] P(x,y)=min(d0,d1,d2,d3,d4);

[0125] Where p(x,y) is the distance value of the raster at coordinate (x,y) before the update, P(x,y) is the distance value of the raster at coordinate (x,y) after the update, p(x-1,y) is the distance value of the left neighbor raster of the current raster, disf((x-1,y),(x,y)) is the Euclidean distance between the left neighbor raster and the current raster, p(x-1,y-1) is the distance value of the top-left neighbor raster of the current raster, and disf((x-1,y-1),( p(x,y-1) represents the Euclidean distance between the top-left neighboring grid and the current grid, p(x,y-1) represents the distance between the top-right neighboring grid and the current grid, disf((x,y-1),(x,y)) represents the Euclidean distance between the top-right neighboring grid and the current grid, p(x+1,y-1) represents the distance between the top-right neighboring grid and the current grid, and disf((x+1,y-1),(x,y)) represents the Euclidean distance between the top-right neighboring grid and the current grid.

[0126] Update the distance value of the current pixel:

[0127] p(x,y)=min(d0,d1,d2,d3,d4);

[0128] The above update rules are used to complete the forward scan of the entire image.

[0129] In the backward scan, the image is traversed from bottom to top and from right to left. For each pixel (x, y), its distance to its neighboring pixels is calculated:

[0130] d0=p(x,y);

[0131] d5=p(x+1,y)+disf((x+1,y),(x,y));

[0132] d6=p(x+1,y+1)+disf((x+1,y+1),(x,y));

[0133] d7=p(x,y+1)+disf((x,y+1),(x,y));

[0134] d8=p(x-1,y+1)+disf((x-1,y+1),(x,y));

[0135] P(x,y)=min(d0,d5,d6,d7,d8);

[0136] Where p(x,y) is the distance value of the raster at coordinate (x,y) before the update, P(x,y) is the distance value of the raster at coordinate (x,y) after the update, p(x+1,y) is the distance value of the right neighboring raster of the current raster, disf((x+1,y),(x,y)) is the Euclidean distance between the right neighboring raster and the current raster, and p(x+1,y+1) is the distance value of the lower right neighboring raster of the current raster. p(x,y)) represents the Euclidean distance between the current grid and the lower right neighboring grid, p(x,y+1) represents the distance between the current grid and the lower neighboring grid, disf((x,y+1),(x,y)) represents the Euclidean distance between the current grid and the lower neighboring grid, p(x-1,y+1) represents the distance between the current grid and the lower left neighboring grid, and disf((x-1,y+1),(x,y)) represents the Euclidean distance between the current grid and the lower left neighboring grid.

[0137] Update the distance value of the current pixel:

[0138] p(x,y)=min(d0,d5,d6,d7,d8);

[0139] The above update rules are used to complete the backward scan of the entire image.

[0140] Therefore, a complete distance grid can be searched using only two scans.

[0141] In this invention, by constructing a vehicle collision circle and a distance grid map, and using a fast Euclidean distance transformation method to construct the distance grid map, the following beneficial effects are achieved:

[0142] Improving collision detection accuracy: By filtering with two layers of collision circles, it is possible to more accurately determine whether a vehicle has collided with an obstacle. The rough circle set is used for preliminary detection; if a collision occurs within the rough circle, the system proceeds to the precise collision circle detection, thus avoiding false positives and false negatives.

[0143] Improving algorithm efficiency: This invention uses a method of "using 3×3 neighborhood to achieve fast Euclidean distance transformation in two scans" to construct a distance grid map, reducing the time complexity to O(n). Compared with the traditional method of performing BFS on each point, this greatly improves the algorithm's running efficiency and can quickly generate a distance grid map, thereby accelerating the collision detection speed.

[0144] Reduced memory overhead: The storage size of the distance raster map is a constant 512×512, which does not increase with the amount of data, thus eliminating memory overhead issues. This is significant for resource-constrained applications such as embedded systems, effectively saving storage space.

[0145] Adapting to high-dimensional data and diverse data distributions: The new method samples the freespace to form a two-dimensional distance grid, eliminating the high-dimensional data problem, as all data is transferred to a two-dimensional space. Furthermore, the new method no longer relies on data distribution; it updates all distance points using dynamic programming. Regardless of the obstacle's location on the graph, its information is eventually synchronized to the entire distance grid, thus improving the algorithm's adaptability to different data distributions.

[0146] Avoiding redundant detection in boundary regions: Since the space is no longer divided, the new method does not have the concept of spatial boundaries, and therefore will not misjudge points on the spatial boundaries, thus avoiding redundant detection in boundary regions and improving the accuracy and efficiency of collision detection.

[0147] Reduced construction time: For even large datasets, the construction time is very short because the image resolution is a constant 512×512, and the distance to the raster image is determined using dynamic programming. This allows the invention to respond quickly and is suitable for applications requiring rapid processing, such as real-time collision detection.

[0148] Based on the same inventive concept, embodiments of the present invention also provide a collision detection system for automatic parking paths, configured to implement the above method, including:

[0149] The collision circle construction module is configured to build a coarse circle set and a precise circle set. The coarse circle set is used for initial collision detection of the vehicle, and the precise circle set is used for further collision detection.

[0150] The distance grid map generation module is configured to construct binary grid maps of the distance between different locations and the nearest obstacle to the current vehicle based on vehicle position perception data. The distance grid map is generated through a fast Euclidean distance transformation algorithm, and each grid position value represents the distance to the nearest obstacle at the current location.

[0151] The collision determination module is configured to sequentially query the grid values ​​of the center of the rough circle and the precise circle in the distance grid map, and determine whether a collision occurs based on the grid values.

[0152] The collision detection system provided in this invention proposes a two-layer collision circle construction method, including a coarse circle set and a precise circle set. The coarse circle set is used for preliminary collision detection, and the precise circle set is used for further collision detection. This layered collision circle detection method can more accurately determine whether a vehicle has collided with an obstacle, improving the accuracy of collision detection. Furthermore, a fast Euclidean distance transformation method is used to construct the distance map, generating a complete distance map in just two scans (forward and backward scans). This method reduces the time complexity to O(n), significantly improving the algorithm's efficiency. Simultaneously, by querying the value of the collision circle's center in the distance map, the collision situation can be quickly determined, further reducing the time complexity of collision detection.

[0153] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 6 As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement any of the collision detection methods for automatic parking paths described in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.

[0154] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).

[0155] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.

[0156] In some embodiments, the one or more processors 101 include a field-programmable gate array.

[0157] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0158] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0159] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0160] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0161] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0162] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should 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-readable program instructions.

[0163] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0164] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0166] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.

Claims

1. A collision detection method for automatic parking paths, characterized in that, include: Construct a coarse circle set and a precise circle set. The coarse circle set is used for initial collision detection of the vehicle, and the precise circle set is used for further collision detection. Based on vehicle position perception data, a binary grid map of the distance between different positions and the nearest obstacle to the current vehicle is constructed. A distance grid map is generated based on the binary grid map, and each grid position value represents the distance to the nearest obstacle at the current position. The center of the rough circle and the precise circle are sequentially queried in the distance grid value in the grid map, and a collision is determined based on the grid value.

2. The method according to claim 1, characterized in that: The set of rough circles includes a first number of circles enclosing the main body of the vehicle and a second number of circles enclosing the rearview mirrors; The precise circle set includes a third number of circles enclosing the front and rear of the vehicle, a fourth number of circles enclosing the middle of the vehicle body, and a fifth number of circles enclosing the rearview mirrors, and the total number of circles in the precise circle set is greater than the total number of circles in the coarse circle set.

3. The method according to claim 2, characterized in that, The diameter of the first number of circles is not less than the vehicle width, and the diameter of the second number of circles is the length of the rearview mirror; The diameter of the third circular number is smaller than the length of the rearview mirror, the diameter of the fourth circular number is no greater than the width of the vehicle, and the diameter of the fifth circular number is the length of the rearview mirror.

4. The method according to claim 1, characterized in that, The generation of a distance grid map based on a binary grid map specifically includes: The binary grid map is transformed into a fast Euclidean distance in two scans in the form of a 3×3 neighborhood to generate a distance grid map.

5. The method according to claim 4, characterized in that, The step of performing a fast Euclidean distance transformation on the binary grid map in two scans in the form of a 3×3 neighborhood to generate a distance grid map specifically includes: Based on the vehicle's current position, the grid is traversed in a forward scan order from top to bottom and from left to right, and the distance value of the current grid is updated using the distance values ​​of the neighboring grids to the left, upper left, above, and upper right of the current grid. Based on the vehicle's current position, the grid is traversed from bottom to top and from right to left through backward scanning, and the distance value of the current grid is updated using the distance values ​​of the neighboring grids to the right, lower right, below, and lower left of the current grid.

6. The method according to claim 5, characterized in that, The specific methods for updating the distance value include: P(x,y)=min(d0,d1,...,dk); Where P(x,y) is the updated distance value of the grid at coordinate (x,y), d0 is the original distance value of the grid at coordinate (x,y), and di is the distance value of the i-th neighboring grid of the grid at (x,y) plus the Euclidean distance between the i-th neighboring grid and the grid at coordinate (x,y).

7. The method according to claim 6, characterized in that, In the forward scan, the raster value update rule at coordinates (x, y) is as follows: d0=p(x,y); d1=p(x-1,y)+disf((x-1,y),(x,y)); d2=p(x-1,y-1)+disf((x-1,y-1),(x,y)); d3=p(x,y-1)+disf((x,y-1),(x,y)); d4=p(x+1,y-1)+disf((x+1,y-1),(x,y)); P(x,y)=min(d0,d1,d2,d3,d4); Where p(x,y) is the distance value of the raster at coordinate (x,y) before the update, P(x,y) is the distance value of the raster at coordinate (x,y) after the update, p(x-1,y) is the distance value of the left neighbor raster of the current raster, disf((x-1,y),(x,y)) is the Euclidean distance between the left neighbor raster and the current raster, p(x-1,y-1) is the distance value of the top-left neighbor raster of the current raster, and disf((x-1,y-1),( p(x,y-1) represents the Euclidean distance between the top-left neighboring grid and the current grid, p(x,y-1) represents the distance between the top-right neighboring grid and the current grid, disf((x,y-1),(x,y)) represents the Euclidean distance between the top-right neighboring grid and the current grid, p(x+1,y-1) represents the distance between the top-right neighboring grid and the current grid, and disf((x+1,y-1),(x,y)) represents the Euclidean distance between the top-right neighboring grid and the current grid.

8. The method according to claim 5, characterized in that, In the backward scan, the raster value update rule at coordinates (x, y) is as follows: d0=p(x,y); d5=p(x+1,y)+disf((x+1,y),(x,y)); d6=p(x+1,y+1)+disf((x+1,y+1),(x,y)); d7=p(x,y+1)+disf((x,y+1),(x,y)); d8=p(x-1,y+1)+disf((x-1,y+1),(x,y)); P(x,y)=min(d0,d5,d6,d7,d8); Where p(x,y) is the distance value of the raster at coordinate (x,y) before the update, P(x,y) is the distance value of the raster at coordinate (x,y) after the update, p(x+1,y) is the distance value of the right neighboring raster of the current raster, disf((x+1,y),(x,y)) is the Euclidean distance between the right neighboring raster and the current raster, and p(x+1,y+1) is the distance value of the lower right neighboring raster of the current raster. p(x,y)) represents the Euclidean distance between the current grid and the lower right neighboring grid, p(x,y+1) represents the distance between the current grid and the lower neighboring grid, disf((x,y+1),(x,y)) represents the Euclidean distance between the current grid and the lower neighboring grid, p(x-1,y+1) represents the distance between the current grid and the lower left neighboring grid, and disf((x-1,y+1),(x,y)) represents the Euclidean distance between the current grid and the lower left neighboring grid.

9. A collision detection system for automatic parking paths, characterized in that, include: The collision circle construction module is configured to build a coarse circle set and a precise circle set. The coarse circle set is used for initial collision detection of the vehicle, and the precise circle set is used for further collision detection. The distance grid map generation module is configured to construct binary grid maps of the distance between different locations and the nearest obstacle to the current vehicle based on vehicle position perception data, and generate a distance grid map based on the binary grid map, where each grid position value represents the distance to the nearest obstacle at the current location; The collision determination module is configured to sequentially query the grid values ​​of the center of the rough circle and the precise circle in the distance grid map, and determine whether a collision occurs based on the grid values.

10. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 8.