Road boundary processing method and device
By identifying the target area and supplementing lines during road boundary processing, the problem of excessive computational resource consumption in existing technologies is solved, achieving efficient closure processing of road boundaries and improving path planning efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2026-04-14
AI Technical Summary
Existing road boundary handling methods add unnecessary rectangular obstacles, increasing the computational load of path planning algorithms and affecting path planning efficiency.
By obtaining the non-closed boundaries on both sides of the road, the target area covering the boundary is determined, and the boundary lines of the target area are used to supplement the boundary lines to form a closed area. A no-entry area is generated for each side boundary so that the path planning algorithm can process it more efficiently.
It achieves efficient closure of road boundaries, reduces the consumption of computing resources, improves the efficiency of path planning algorithms, and ensures the accuracy and efficiency of path planning.
Smart Images

Figure CN121857664A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving technology, and in particular to a method and apparatus for processing road boundaries. Background Technology
[0002] Path planning is one of the core modules in intelligent driving systems. The planned path avoids all obstacles along the way. These obstacles include not only movable traffic vehicles such as pedestrians, bicycles, cars, and trucks, but also relatively stationary obstacles such as lane lines (e.g., single solid lines, double solid lines) and fences. These stationary obstacles are represented as the boundary lines on both sides of the road in the path planning map. Existing path planning algorithms are based on obstacles represented by closed regions, using distance gradient information within the closed regions to plan paths and achieve obstacle avoidance. However, road boundaries formed by lines cannot be directly applied to path planning algorithms and require boundary closure processing. Existing methods mainly divide the road boundary into several sub-segments and then complete each sub-segment into a rectangle to meet the obstacle closure region requirement.
[0003] In the process of realizing this invention, the inventors discovered the following problems in the prior art:
[0004] Existing methods for handling road boundaries add a lot of unnecessary rectangular obstacles, increasing the computational load of path planning algorithms, consuming unnecessary computing resources, and affecting path planning efficiency. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method and apparatus for processing road boundaries, which achieves highly available road boundary processing. The target area is used to supplement the lines of the first boundary and the second boundary to achieve the purpose of closing the first and second boundaries. Moreover, the first and second boundaries each correspond to a closed area, which improves the efficiency of subsequent path planning algorithms and saves computing resources.
[0006] To achieve the aforementioned objective, according to one aspect of the present invention, a method for processing road boundaries is provided, comprising:
[0007] Obtain the road boundary to be processed, the road boundary includes a first boundary and a second boundary on both sides of the road, the first boundary and the second boundary are non-closed lines;
[0008] Based on the location information of the first boundary and the second boundary, determine the target area covering the road boundary;
[0009] Using the boundary lines of the target area, the first boundary and the second boundary are supplemented with lines respectively to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area in the road that is allowed to pass based on the first-side restricted area and the second-side restricted area.
[0010] Optionally, determining the target area covering the road boundary based on the position information of the first boundary and the second boundary includes: constructing a boundary region circumscribed to the first boundary and the second boundary based on the position information of the first boundary and the second boundary; and extending each side of the boundary region outward according to a preset buffer distance to obtain the target area.
[0011] Optionally, based on the position information of the first boundary and the second boundary, a boundary region circumscribed to the first boundary and the second boundary is constructed, including: extracting a first inflection point and a second inflection point from the first boundary and the second boundary respectively; forming a first boundary point set by combining the extracted first inflection point and the two endpoints of the first boundary; forming a second boundary point set by combining the extracted second inflection point and the two endpoints of the second boundary; finding the maximum and minimum values in the horizontal coordinate direction and the maximum and minimum values in the vertical coordinate direction from the position information of each inflection point and endpoint of the first boundary point set and the second boundary point set; and forming a boundary region by using the maximum and minimum values in the horizontal coordinate direction as the vertical edge and the maximum and minimum values in the vertical coordinate direction as the horizontal edge.
[0012] Optionally, using the boundary lines of the target region, line supplementation is performed on the first boundary and the second boundary, including: extending the first boundary and the second boundary; obtaining the first intersection point of the extended line of the first boundary with the boundary of the target region, and the second intersection point of the extended line of the second boundary with the boundary of the target region; adding the first intersection point to the first boundary point set and adding the second intersection point to the second boundary point set; determining the belonging label of each boundary vertex of the target region relative to the first boundary and the second boundary based on the positional relationship of each boundary vertex of the target region relative to the first boundary and the second boundary, and storing the boundary vertex in the corresponding boundary point set if the belonging label is the first boundary point set or the second boundary point set; determining the supplementary lines of the first boundary from the boundary lines of the target region based on the boundary vertices in the first boundary point set and the first intersection point, and performing line supplementation on the first boundary; determining the supplementary lines of the second boundary from the boundary lines of the target region based on the boundary vertices in the second boundary point set and the second intersection point, and performing line supplementation on the second boundary.
[0013] Optionally, extending the first boundary and the second boundary to obtain a first intersection point between the extension line of the first boundary and the boundary of the target area, and a second intersection point between the extension line of the second boundary and the boundary of the target area, includes: taking the two endpoints of the first boundary as extension starting points, extending both ends of the first boundary by a preset length with the direction of extension from the adjacent inflection point of the extension starting point to the extension starting point; taking the two endpoints of the second boundary as extension starting points, extending both ends of the second boundary by a preset length with the direction of extension from the adjacent inflection point of the extension starting point to the extension starting point, and obtaining a second intersection point with the boundary of the target area.
[0014] Optionally, determining the attribution label of each boundary vertex based on its positional relationship with respect to the first and second boundaries of the target region includes: dividing the extended first and second boundaries into multiple first boundary segments and multiple second boundary segments based on the first and second boundary point sets; for each boundary vertex of the target region: calculating the first target line segment closest to the boundary vertex for each of the first boundary line segments; if the boundary vertex is located on the first side of the first target line segment, then defining the attribution label of the boundary vertex as the first boundary point set; if the boundary vertex is located on the second side of the first target line segment, then calculating the second target line segment closest to the boundary vertex for each of the second boundary line segments; if the boundary vertex is located on the second side of the second target line segment, then defining the attribution label of the boundary vertex as the second boundary point set.
[0015] Optionally, after obtaining the first restricted area containing the first boundary and the second restricted area containing the second boundary, the method further includes: verifying and confirming that there are no roads for vehicles to travel in the first restricted area and the second restricted area.
[0016] According to a second aspect of the present invention, a road boundary processing apparatus is provided, comprising:
[0017] The boundary acquisition module is used to acquire the road boundary to be processed. The road boundary includes a first boundary and a second boundary on both sides of the road. The first boundary and the second boundary are non-closed lines.
[0018] The target area determination module is used to determine the target area covering the road boundary based on the position information of the first boundary and the second boundary;
[0019] A boundary processing module is used to supplement the first boundary and the second boundary with the boundary lines of the target area to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area in the road that is allowed to pass based on the first-side restricted area and the second-side restricted area.
[0020] According to a third aspect of the present invention, an electronic processing device for a road boundary is provided, comprising:
[0021] One or more processors;
[0022] Storage device for storing one or more programs.
[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiments of the present invention.
[0024] According to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the present invention.
[0025] According to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method provided in the first aspect of the present invention.
[0026] One embodiment of the invention has the following advantages or beneficial effects: by acquiring the road boundary to be processed, the road boundary includes a first boundary and a second boundary on both sides of the road, and the first boundary and the second boundary are non-closed lines; based on the position information of the first boundary and the second boundary, a target area covering the road boundary is determined; using the boundary lines of the target area, the first boundary and the second boundary are supplemented with lines respectively to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area of traffic allowed in the road based on the first-side restricted area and the second-side restricted area, a highly available road boundary processing method is realized. By using the target area to supplement the lines of the first boundary and the second boundary, the purpose of closing the first and second boundaries is achieved, and each of the first and second boundaries corresponds to a closed area, which improves the efficiency of the subsequent path planning algorithm and saves computing resources. Attached Figure Description
[0027] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0028] Figure 1 This is a schematic diagram of the main flow of a road boundary processing method according to an embodiment of the present invention;
[0029] Figure 2(a) is a schematic diagram of the first and second boundaries of an embodiment of the present invention;
[0030] Figure 2(b) is a graphical schematic diagram of the boundary region and the target region according to an embodiment of the present invention;
[0031] Figure 2(c) is a schematic diagram of determining the attribution labels of the first and second intersection points and the boundary vertices in an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram of the main flow of a road boundary processing method according to a possible embodiment of the present invention;
[0033] Figure 4 This is a detailed flowchart illustrating the road boundary processing method according to an embodiment of the present invention;
[0034] Figure 5 This is a schematic diagram of the main modules of a road boundary processing device according to an embodiment of the present invention;
[0035] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0036] Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0037] It should be noted that the acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0038] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0039] Existing methods for handling road boundaries add a lot of unnecessary rectangular obstacles, increasing the computational load of path planning algorithms, consuming unnecessary computing resources, affecting path planning efficiency, and failing to meet the needs of practical applications.
[0040] To address the aforementioned problems in existing technologies, this invention proposes a road boundary processing method. Based on the acquired first and second road boundaries, a target area covering both boundaries is determined. The boundary lines of the target area are used to supplement the first and second boundaries, resulting in a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary. This achieves a highly available road boundary processing method. By using the target area to supplement the first and second boundaries, the closure of the first and second boundaries is achieved. Furthermore, each of the first and second boundaries corresponds to a closed area, improving the efficiency of subsequent path planning algorithms and saving computational resources.
[0041] Figure 1 This is a schematic diagram of the main flow of the road boundary processing method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the road boundary processing method of this embodiment includes the following steps S101 to S103.
[0042] Step S101: Obtain the road boundary to be processed. The road boundary includes a first boundary and a second boundary on both sides of the road. The first boundary and the second boundary are non-closed lines.
[0043] Specifically, in the data preprocessing stage of path planning, autonomous driving or intelligent driving systems acquire image frames of the current road through radar, sensors, cameras, and other external devices. By analyzing these image frames, the boundaries on both sides of the road are identified, such as lane lines and guardrails. Understandably, typically, the first and second boundaries on both sides of the road captured in an image frame are two open lines, such as two broken lines, with the road between them, or two curves, etc.
[0044] It should be noted that, in the embodiments of the present invention, the first boundary and the second boundary refer to the left and right boundaries of the road on both sides, respectively, and are uniformly based on the direction of vehicle travel. The left boundary of the road in the direction of vehicle travel is the first boundary, and the right boundary of the road in the direction of vehicle travel is the second boundary. Accordingly, the first side refers to the left side of the road in the direction of vehicle travel, and the second side refers to the right side of the road in the direction of vehicle travel; the first turning point refers to the left turning point, and the second turning point refers to the right turning point; the first boundary point set refers to the left boundary point set, and the second boundary point set refers to the right boundary point set; the first intersection point refers to the left intersection point, and the second intersection point refers to the right intersection point; the first target line segment refers to the left target line segment, and the second target line segment refers to the right target line segment.
[0045] Since the first and second boundaries are essentially obstacles for path planning algorithms, and path planning algorithms require the outlines of obstacles to be closed regions, this invention provides a highly available method for closing road boundaries. This method can achieve the closing of road boundaries and is more reasonable than existing closing methods, making it more friendly to subsequent path planning algorithms.
[0046] Step S102: Determine the target area covering the road boundary based on the location information of the first boundary and the second boundary.
[0047] Specifically, taking the locations of the first and second boundary lines of the road obtained above as the center, an area radiating outward at a specified distance is defined, and it must completely cover the first and second boundary lines. In other words, a target area larger than the geographical space occupied by the first and second boundaries is defined, and it must be closed. The specific shape of the target area is not limited; it can be any polygon or curve, etc.
[0048] According to one embodiment of the present invention, determining a target area covering the road boundary based on the position information of the first boundary and the second boundary includes: constructing a boundary region circumscribed to the first boundary and the second boundary based on the position information of the first boundary and the second boundary; and extending each side of the boundary region outward according to a preset buffer distance to obtain the target area.
[0049] Specifically, considering that the outer side of the road boundary is usually a restricted area, in order to cover the restricted area as accurately as possible so that the path planning algorithm can accurately formulate obstacle avoidance strategies, and considering the time requirements of path algorithm preprocessing, this embodiment of the invention determines the target area in two steps. First, based on the first and second boundaries, the boundary region circumscribed to the first and second boundaries is determined, similar to the concept of circumscribed in geometry. A closed boundary region is constructed along the outer edges of the first and second boundaries. Then, according to a preset buffer distance... Expand each edge of the boundary region outward. Distance can also be understood as enlarging the boundary area as a whole. Considering that the path planning in this case mainly serves vehicles, the preferred buffer distance is the specific length of the vehicle body, such as 3 meters or 5 meters.
[0050] According to another embodiment of the present invention, constructing a boundary region circumscribed to the first boundary and the second boundary based on the position information of the first boundary and the second boundary includes: extracting a first inflection point and a second inflection point from the first boundary and the second boundary respectively; forming a first boundary point set by combining the extracted first inflection point and the two endpoints of the first boundary; forming a second boundary point set by combining the extracted second inflection point and the two endpoints of the second boundary; finding the maximum and minimum values in the horizontal coordinate direction and the maximum and minimum values in the vertical coordinate direction from the position information of each inflection point and endpoint of the first boundary point set and the second boundary point set; and forming a boundary region by using the maximum and minimum values in the horizontal coordinate direction as the vertical edge and the maximum and minimum values in the vertical coordinate direction as the horizontal edge.
[0051] For example, Figure 2(a) is a graphical schematic diagram of the first and second boundaries according to an embodiment of the present invention. First, it is necessary to extract the inflection points where the slope of the entire line changes from the first and second boundaries. The inflection points extracted from the first boundary are called the first inflection points, and those extracted from the second boundary are called the second inflection points. The first inflection points and the endpoints of both ends of the first boundary are combined to form the first boundary point set. Similarly, the second inflection points and the endpoints of both ends of the second boundary are combined to form the second boundary point set. It can be seen that in Figure 2(a), the first boundary is a polyline L, and the second boundary is a polyline R, where the inflection point of L is P. L,1 P L,2 P L,3 Then, the two endpoints P L,0 P L,4 , and P L,1 P L,2 P L,3 Similarly, if we add the first boundary point set S_left, then the inflection point of R is P. R,1 P R,2 P R,3 Then, the two endpoints P R,0 P R,4 , and P R,1 P R,2 P R,3 Add to the second boundary point set R_left.
[0052] Figure 2(b) is a graphical diagram of the boundary region and target region of an embodiment of the present invention. For ease of explanation and to save computational resources for subsequent path planning algorithms, a regular rectangular boundary region is constructed. Based on the first and second boundary point sets constructed above, the coordinate values of all points contained therein are determined. Then, the maximum value Xmax, the minimum value Xmin, the maximum value Ymax, and the minimum value Ymin in the Y coordinate direction are found from all points included in the first and second boundary point sets. Using Xmin and Xmax as the vertical sides and Ymin and Ymax as the horizontal sides, a rectangular boundary region is constructed, as shown by the rectangular region formed by the dashed lines in Figure 2(b).
[0053] Understandably, based on the rectangular boundary region constructed above, the buffer distance is set as... Then, the corresponding rectangular target region can be obtained, where the four vertices V0, V1, V2, and V3 of the rectangular target region can be calculated using the following formula: As shown in V0, V1, V2, and V3 in Figure 2(b), the solid rectangle in Figure 2(b) is the target area. It can be seen from the figure that the target area covers the first boundary L and the second boundary R.
[0054] Step S103: Using the boundary lines of the target area, supplement the first boundary and the second boundary with lines respectively to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area in the road that is allowed to pass based on the first-side restricted area and the second-side restricted area.
[0055] Specifically, based on the fact that the target area determined above is already a closed area that covers the first and second boundaries, the first and second boundaries are supplemented with lines using the boundary lines of the target area, so that the first boundary is processed into a closed area and the second boundary is also processed into a closed area, resulting in a closed area containing the first boundary and a closed area containing the second boundary, which are the first-side no-entry areas and the second-side no-entry areas of the road.
[0056] Understandably, compared to the existing approach of constructing rectangles corresponding to several sub-segments, this solution is more in line with the road scenario. It incorporates more space outside the first and second boundaries into the closed area, i.e., classifies it as a restricted area, which is beneficial for subsequent path planning algorithms. Instead, it avoids treating only a small area outside the boundary as a restricted area, such as 30 centimeters, and leaving areas beyond 30 centimeters unprocessed, which could lead to abnormal or suboptimal path planning results.
[0057] According to one embodiment of the present invention, after obtaining a first-side restricted area including the first boundary and a second-side restricted area including the second boundary, the method further includes: verifying and confirming that there are no vehicle-traveling roads in the first-side restricted area and the second-side restricted area.
[0058] Specifically, in order to ensure the correctness of the restricted areas in the subsequent input path planning, after obtaining the first restricted area containing the first boundary and the second restricted area containing the second boundary, it is also necessary to introduce the map information of the current path to verify that there are no roads in the first and second restricted areas where vehicles are allowed to travel, so as to avoid misjudgment in special road conditions.
[0059] Figure 3 This is a schematic diagram of the main flow of a road boundary processing method according to a possible embodiment of the present invention. As another embodiment of the present invention, such as... Figure 3 As shown, the method for processing the road boundary includes:
[0060] Step S301: Obtain the road boundary to be processed. The road boundary includes a first boundary and a second boundary on both sides of the road. The first boundary and the second boundary are non-closed lines.
[0061] Step S302: Determine the target area covering the road boundary based on the location information of the first boundary and the second boundary.
[0062] Step S303: Extend the first boundary and the second boundary, obtain the first intersection point of the extension line of the first boundary with the boundary of the target area, and the second intersection point of the extension line of the second boundary with the boundary of the target area, add the first intersection point to the first boundary point set, and add the second intersection point to the second boundary point set.
[0063] Specifically, although the target area covers the first and second boundaries, since the target area is derived from the outward expansion of the boundary areas, there is still space between the first and second boundaries and the target area's boundaries, meaning they do not intersect. Using only the boundary lines of the target area is insufficient to complete the first and second boundaries into a closed region. Therefore, it is necessary to extend the first and second boundaries outwards respectively. Specifically, any line can be used. Select the boundary line closest to the endpoint of the target boundary line from among the various boundary lines of the target area. Starting from the endpoint, directly intersect the target boundary line with a straight line parallel or perpendicular to the X-axis to obtain the first and second intersection points.
[0064] According to an embodiment of the present invention, extending the first boundary and the second boundary to obtain a first intersection point between the extension line of the first boundary and the boundary of the target area, and a second intersection point between the extension line of the second boundary and the boundary of the target area, comprises: taking the two endpoints of the first boundary as extension starting points, extending both ends of the first boundary by a predetermined length with the direction of extension from the adjacent inflection point of the extension starting point to the extension starting point; and taking the two endpoints of the second boundary as extension starting points, extending both ends of the second boundary by a predetermined length with the direction of extension from the adjacent inflection point of the extension starting point to the extension starting point, to obtain a second intersection point with the boundary of the target area.
[0065] Exemplarily, this embodiment of the invention also provides a method for determining the first intersection point and the second intersection point. For the first boundary, the two endpoints of the first boundary are taken as extension starting points, and points adjacent to the extension starting points are searched in the first boundary point set. These are usually the inflection points mentioned above. This embodiment of the invention refers to such inflection points as adjacent inflection points. Figure 2(c) is a schematic diagram of the determination of the first and second intersection points and the attribution labels of the boundary vertices in this embodiment of the invention. It can be seen that the two endpoints of the first boundary are P... L,0 P L,4 Correspondingly, their adjacent inflection points are P. L,1 and P L,3 So according to P L,1 To P L,0 The direction, that is, keeping P L,1 To P L,0 The slope, based on the diagonal length of the target region. From P L,0 Start at the set 2 times The length is extended, taking into account... In this embodiment of the invention, the vehicle body length is set to twice. The length of the extension line is such that it ensures the extension line intersects the boundary of the target region, thus obtaining P.L,0 The first intersection point P of the ends LC1 Similarly, for the other endpoint P... L,4 According to P L,3 To P L,4 The slope from P L,4 Start by extending by 2 times The length is used to obtain the first intersection point P at this end. LC2 .
[0066] Furthermore, following the method described above for determining the first intersection point of the first boundary, the second intersection point of the second boundary is determined. According to P... R,1 To P R,0 The slope from P R,0 Start by extending by 2 times The length of P is obtained. R,0 The second intersection point P of the ends RC1 According to P R,3 To P R,4 The slope from P R,4 Start by extending by 2 times The length of P is obtained. R,4 The second intersection point P of the ends RC2 .
[0067] Step S304: Based on the positional relationship of each boundary vertex of the target region relative to the first boundary and the second boundary, determine the belonging label of each boundary vertex, and if the belonging label is the first boundary point set or the second boundary point set, store the boundary vertex into the corresponding boundary point set.
[0068] Specifically, after determining the first and second intersection points where the first and second boundaries intersect with the boundary of the target region, it is also necessary to determine whether the vertices of each boundary of the target region belong to the first boundary, the second boundary, or neither. The most intuitive graphical method is to determine the affiliation label of each boundary vertex based on its positional relationship relative to the first and second boundaries. That is, boundary vertices outside the first boundary belong to the first boundary point set, boundary vertices outside the second boundary belong to the second boundary point set, and boundary vertices between the first and second boundaries are marked with a affiliation of 0, meaning they belong to neither the first nor the second boundary point set.
[0069] According to an embodiment of the present invention, determining the attribution label of each boundary vertex of the target region based on the positional relationship of each boundary vertex relative to the first boundary and the second boundary includes: dividing the extended first boundary and the second boundary into a plurality of first boundary line segments and a plurality of second boundary line segments based on the first boundary point set and the second boundary point set; for each boundary vertex of the target region: calculating the first target line segment closest to the boundary vertex for each of the first boundary line segments; if the boundary vertex is located on the first side of the first target line segment, then defining the attribution label of the boundary vertex as the first boundary point set; if the boundary vertex is located on the second side of the first target line segment, then calculating the second target line segment closest to the boundary vertex for each of the second boundary line segments; if the boundary vertex is located on the second side of the second target line segment, then defining the attribution label of the boundary vertex as the second boundary point set.
[0070] Specifically, based on the first boundary point set containing the first intersection point and the second boundary point set containing the second intersection point, the extended first boundary and the extended second boundary are divided into multiple first boundary segments and multiple second boundary segments, such as P in Figure 2(c). LC1 P L,0 P L,0 P L,1 ... and other first boundary segments, P RC1 P R,0 P R,0 P R,1 ... and other second boundary lines.
[0071] Furthermore, for each boundary vertex of the target region, taking Figure 2(c) as an example, for boundary vertex V0, P LC1 P L,0 If V0 is the first target line segment and is located on the first side of the first target line segment, then the label of V0 is the first boundary point set, represented by gray fill; for boundary vertex V3, its first target line segment is still P. LC1 P L,0 However, V3 is located in P LC1 P L,0 On the second side, it is also necessary to find the nearest second target line segment from the second boundary line segment, as shown by P in the figure. RC1 P R,0 V3 is located in P RC1 P R,0 On the second side, V3's attribution label is the second boundary point set, indicated by black fill; the method for determining the attribution label of boundary vertex V2 is similar to that of V3; while for boundary vertex V1, since it is on the first target line segment P... L,4 P LC2 On the second side, and on the second target line segment PR,4 P RC2 The first side does not meet the judgment requirements of either the first boundary point set or the second boundary point set, so its belonging label is 0, indicating that it does not belong to any kind of boundary point set. Thus, all the gray-filled points in the figure form the first boundary point set, and all the black-filled points in the figure form the second boundary point set.
[0072] According to another embodiment of the present invention, the attribution label of the boundary vertex can also be determined by: finding the target line segment closest to the boundary vertex from each of the first boundary line segments and each of the second boundary line segments, and determining the attribution label of the boundary vertex based on the position of the boundary vertex relative to the target line segment and in combination with the source of the target line segment.
[0073] Specifically, for each boundary vertex of the target region, the target line segment closest to the current boundary vertex is found from all the separated first and second boundary line segments. The attribution label of the boundary vertex is determined collaboratively based on whether the boundary vertex is located on the first or second side of the target line segment, and whether the target line segment originates from the extended first or second boundary. Specifically, when the position of the boundary vertex relative to the target line segment and the source of the target line segment belong to the same direction, the attribution label of the boundary vertex is the source of the target line segment; otherwise, the boundary vertex does not belong to any boundary point set. It should be noted that in this embodiment of the invention, the first and second sides are both referenced to the positive direction of the X-axis. Taking Figure 2(c) as an example, the target line segment of V0 is P. LC1 P L,0 V0 is located at P LC1 P L,0 The first side, and P LC1 P L,0 Since V0 originates from the first boundary, its attribute label is the first boundary point set. Similarly, V2 and V3 can be attributed to the second boundary point set. For V1, its nearest target line segment is P. R,4 P RC2 V1 is located at P R,4 P RC2 The first side, and P R,4 P RC2 Since V1 originates from the second boundary and the directions of the first and second boundaries are inconsistent, it belongs to neither the first boundary point set nor the second boundary point set, and its affiliation label is 0.
[0074] Additionally, this embodiment of the invention also provides another method for determining the position of a boundary vertex relative to a target line segment through coordinate calculation. Assuming the target line segment for boundary vertex Vi is AB, where the starting point of the target line segment is point A and the ending point is point B, the coordinates of Vi are defined as follows: The coordinates of point A are The coordinates of point B are Then the following formula holds: If d is less than 0, then Vi is located on the first side of the target line segment AB; otherwise, Vi is located on the second side of the target line segment AB. Combined with the origin of the target line segment AB, the final assignment label for Vi is determined.
[0075] Step S305: Based on the boundary vertices in the first boundary point set and the first intersection point, determine the supplementary lines of the first boundary from the boundary lines of the target area, and supplement the lines of the first boundary; based on the boundary vertices in the second boundary point set and the second intersection point, determine the supplementary lines of the second boundary from the boundary lines of the target area, and supplement the lines of the second boundary, to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary.
[0076] Specifically, based on the first boundary point set including the boundary vertices and the first intersection point, the boundary lines between the first intersection point and the boundary vertices of the target region are used to supplement and extend the first boundary, resulting in a closed first boundary region. Similarly, based on the second boundary point set including the boundary vertices and the second intersection point, the boundary lines between the second intersection point and the boundary vertices of the target region are used to supplement and extend the second boundary, resulting in a closed second boundary region. Finally, the closed first boundary region is used as the first side restricted area, and the closed second boundary region is used as the second side restricted area.
[0077] For example, P in Figure 2(c) LC1 V0 line segment and V0 P LC2 The first boundary after the line segments are extended together forms a closed first-sided restricted area, thus achieving the closure of the first boundary; P in Figure 2(c) RC1 V3 segment, V3 V2 segment, V2P RC2 The second boundary, after the line segments are extended together, forms a closed second restricted area, thus achieving the closure of the second boundary.
[0078] Figure 4This is a detailed flowchart illustrating the road boundary processing method according to an embodiment of the present invention. As a specific embodiment, for ease of understanding, the first boundary is specified as the left boundary, and the second boundary as the right boundary. Correspondingly, the first boundary point set of the present invention is specified as the left boundary point set, and the second boundary point set as the right boundary point set; the first turning point is specified as the left turning point, and the second turning point as the right turning point; the first intersection point is specified as the left intersection point, and the second intersection point as the right intersection point; the first boundary line segment is specified as the left boundary line segment, and the second boundary line segment as the right boundary line segment; the first target line segment is specified as the left target line segment, and the second target line segment as the right target line segment; the first side is specified as the left side, and the second side as the right side.
[0079] Specifically, based on the acquired image frames, the left and right boundaries of the road are obtained, and the left boundary point set S_left and the right boundary point set S_right are initialized. Left and right turning points where the slope changes are extracted from the left and right boundaries respectively. The extracted left turning points and the two endpoints of the left boundary are added to the left boundary point set S, and the extracted right turning points and the two endpoints of the right boundary are added to the right boundary point set S. Then, the maximum value Xmax and minimum value Xmin in the horizontal direction, and the maximum value Ymax and minimum value Ymin in the vertical direction are found from the position information of each turning point and endpoint in the left and right boundary point sets. Based on Xmax, Xmin, Ymax, Ymin, and the buffer distance... We obtain a rectangular target region covering the road boundary and record its boundary vertices as V0, V1, V2, and V3. We extend the left and right boundaries so that they intersect with the boundary of the target region. We add the left intersection point to the left boundary point set and the right intersection point to the right boundary point set.
[0080] Furthermore, this illustration uses four boundary vertices as an example. Following the order V0 to V3, for each boundary vertex V of the target region... i Calculate the distance V from each left boundary line segment to the boundary vertex. i The nearest left target line segment, if the boundary vertex V i If the boundary vertex V is located to the left of the left target line segment, then define the boundary vertex V. i The attribution label is the set of left boundary points, and V is... i Add to the left boundary point set; if the boundary vertex V i If the target line segment is not to the left of the left target line segment, but to the right, then the right target line segment is determined from the right boundary line segment, if the boundary vertex V i To the right of the right target line segment, the boundary vertex V i The attribution label is the right boundary point set, and V is... i Add to the right boundary point set; if it is not to the right of the right target line segment, then the V... iThe attribute label is 0, indicating it does not belong to the left or right boundary point set. The process continues until all boundary vertices of the target region have been traversed. In this embodiment, the rectangular target region is defined as having 4 boundary points, so the loop is executed 4 times. Finally, based on the left boundary point set containing boundary vertices and left intersections, and the right boundary point set containing boundary vertices and right intersections, the left restricted area containing the left boundary and the right restricted area containing the right boundary are obtained and transmitted to the downstream path planning module.
[0081] Figure 5 This is a schematic diagram of the main modules of a road boundary processing device according to an embodiment of the present invention. Figure 5 As shown, the road boundary processing device 500 mainly includes a boundary acquisition module 501, a target area determination module 502, and a boundary processing module 503.
[0082] The boundary acquisition module 501 is used to acquire the road boundary to be processed. The road boundary includes a first boundary and a second boundary on both sides of the road. The first boundary and the second boundary are non-closed lines.
[0083] The target area determination module 502 is used to determine a target area covering the road boundary based on the position information of the first boundary and the second boundary;
[0084] The boundary processing module 503 is used to supplement the first boundary and the second boundary with the boundary lines of the target area to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area in the road that is allowed to pass based on the first-side restricted area and the second-side restricted area.
[0085] According to an embodiment of the present invention, the target region determination module 502 is further configured to: construct a boundary region circumscribed to the first boundary and the second boundary based on the position information of the first boundary and the second boundary; and extend each side of the boundary region outward according to a preset buffer distance to obtain the target region.
[0086] According to another embodiment of the present invention, the target region determination module 502 is further configured to: extract a first inflection point and a second inflection point from the first boundary and the second boundary respectively; form a first boundary point set by combining the extracted first inflection point and the two endpoints of the first boundary; form a second boundary point set by combining the extracted second inflection point and the two endpoints of the second boundary; find the maximum and minimum values in the horizontal coordinate direction and the maximum and minimum values in the vertical coordinate direction from the position information of each inflection point and endpoint of the first boundary point set and the second boundary point set; and form a boundary region by using the maximum and minimum values in the horizontal coordinate direction as the vertical edge and the maximum and minimum values in the vertical coordinate direction as the horizontal edge.
[0087] According to another embodiment of the present invention, the boundary processing module 503 is further configured to: extend the first boundary and the second boundary; obtain a first intersection point of the extension line of the first boundary with the boundary of the target region, and a second intersection point of the extension line of the second boundary with the boundary of the target region; add the first intersection point to the first boundary point set, and add the second intersection point to the second boundary point set; determine the belonging label of each boundary vertex according to the positional relationship of each boundary vertex of the target region relative to the first boundary and the second boundary, and store the boundary vertex in the corresponding boundary point set if the belonging label is the first boundary point set or the second boundary point set; determine the supplementary line of the first boundary from the boundary line of the target region according to the boundary vertex in the first boundary point set and the first intersection point, and perform line supplementation on the first boundary; determine the supplementary line of the second boundary from the boundary line of the target region according to the boundary vertex in the second boundary point set and the second intersection point, and perform line supplementation on the second boundary.
[0088] According to another embodiment of the present invention, the boundary processing module 503 is further configured to: take the two endpoints of the first boundary as extension starting points, extend the two ends of the first boundary by a preset length with the extension direction from the adjacent inflection point of the extension starting point to the extension starting point, to obtain a first intersection point that intersects with the boundary of the target area; take the two endpoints of the second boundary as extension starting points, extend the two ends of the second boundary by a preset length with the extension direction from the adjacent inflection point of the extension starting point to the extension starting point, to obtain a second intersection point that intersects with the boundary of the target area.
[0089] According to another embodiment of the present invention, the boundary processing module 503 is further configured to: divide the extended first boundary and second boundary into a plurality of first boundary line segments and a plurality of second boundary line segments based on the first boundary point set and the second boundary point set; for each boundary vertex of the target region: calculate the first target line segment closest to the boundary vertex for each of the first boundary line segments; if the boundary vertex is located on the first side of the first target line segment, then define the belonging label of the boundary vertex as the first boundary point set; if the boundary vertex is located on the second side of the first target line segment, then calculate the second target line segment closest to the boundary vertex for each of the second boundary line segments; if the boundary vertex is located on the second side of the second target line segment, then define the belonging label of the boundary vertex as the second boundary point set.
[0090] According to another embodiment of the present invention, the road boundary processing device 500 further includes a verification module (not shown in the figure) for: after obtaining a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, verifying and confirming that there are no vehicles traveling on the first-side restricted area and the second-side restricted area.
[0091] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied.
[0092] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0093] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as road boundary processing applications, etc. (for example only).
[0094] Terminal devices 601, 602, and 603 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0095] Server 605 can be a server providing various services, such as a background management server (for example only) that supports road boundary operations performed by users using terminal devices 601, 602, and 603. The background management server can obtain the road boundary to be processed, which includes a first boundary and a second boundary on both sides of the road, both of which are non-closed lines; determine a target area covering the road boundary based on the position information of the first and second boundaries; use the boundary lines of the target area to supplement the first and second boundaries respectively, obtaining a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, and then determine the permitted traffic area in the road based on the first-side restricted area and the second-side restricted area, etc., and feed back the processing results (e.g., the first and second side restricted areas – for example only) to the terminal devices.
[0096] It should be noted that the road boundary processing method provided in this embodiment of the invention is generally executed by server 605, and correspondingly, the road boundary processing device is generally set in server 605.
[0097] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0098] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Figure 7 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0099] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0100] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0101] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0102] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0103] 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 code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated 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 a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0104] The units described in the embodiments of the present invention can be implemented in software or in hardware. The described units can also be housed in a processor; for example, a processor can be described as including: a boundary acquisition module, a target region determination module, and a boundary processing module.
[0105] In some cases, the names of these modules do not constitute a limitation on the module itself. For example, the target area determination module can also be described as "a module for determining a target area covering the road boundary based on the location information of the first boundary and the second boundary".
[0106] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiments or may exist independently without being assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to include: acquiring a road boundary to be processed, the road boundary including a first boundary and a second boundary on both sides of the road, the first boundary and the second boundary being non-closed lines; determining a target area covering the road boundary based on the position information of the first boundary and the second boundary; and using the boundary lines of the target area to supplement the first boundary and the second boundary with lines respectively, obtaining a first-side restricted area including the first boundary and a second-side restricted area including the second boundary, so as to determine the permissible area in the road based on the first-side restricted area and the second-side restricted area.
[0107] According to the technical solution of the present invention, the following advantages or beneficial effects are achieved: by obtaining the road boundary to be processed, the road boundary includes a first boundary and a second boundary on both sides of the road, and the first boundary and the second boundary are non-closed lines; based on the position information of the first boundary and the second boundary, a target area covering the road boundary is determined; using the boundary lines of the target area, the first boundary and the second boundary are supplemented with lines respectively to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area in the road that is allowed to pass based on the first-side restricted area and the second-side restricted area, a highly available road boundary processing method is realized. By using the target area to supplement the lines of the first boundary and the second boundary, the purpose of closing the first and second boundaries is achieved, and each of the first and second boundaries corresponds to a closed area, which improves the efficiency of the subsequent path planning algorithm and saves computing resources.
[0108] The specific embodiments described herein do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for processing road boundaries, characterized in that, include: Obtain the road boundary to be processed, the road boundary includes a first boundary and a second boundary on both sides of the road, the first boundary and the second boundary are non-closed lines; Based on the location information of the first boundary and the second boundary, determine the target area covering the road boundary; Using the boundary lines of the target area, the first boundary and the second boundary are supplemented with lines respectively to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area in the road that is allowed to pass based on the first-side restricted area and the second-side restricted area.
2. The method according to claim 1, characterized in that, Based on the location information of the first boundary and the second boundary, a target area covering the road boundary is determined, including: Based on the position information of the first boundary and the second boundary, a boundary region circumscribed to the first boundary and the second boundary is constructed; The target region is obtained by extending each edge of the boundary region outwards according to a preset buffer distance.
3. The method according to claim 2, characterized in that, Based on the position information of the first boundary and the second boundary, a boundary region circumscribed to the first boundary and the second boundary is constructed, including: Extract the first inflection point and the second inflection point where the slope changes from the first boundary and the second boundary respectively. Combine the extracted first inflection point and the two endpoints of the first boundary to form a first boundary point set. Combine the extracted second inflection point and the two endpoints of the second boundary to form a second boundary point set. Find the maximum and minimum values in the horizontal direction and the maximum and minimum values in the vertical direction from the position information of each inflection point and endpoint of the first boundary point set and the second boundary point set. The boundary region is formed by taking the maximum and minimum values in the horizontal direction as the vertical edge and the maximum and minimum values in the vertical direction as the horizontal edge.
4. The method according to claim 3, characterized in that, Using the boundary lines of the target region, line supplementation is performed on the first boundary and the second boundary, respectively, including: Extend the first boundary and the second boundary, obtain the first intersection point of the extension line of the first boundary with the boundary of the target area, and the second intersection point of the extension line of the second boundary with the boundary of the target area, add the first intersection point to the first boundary point set, and add the second intersection point to the second boundary point set; Based on the positional relationship of each boundary vertex of the target area relative to the first boundary and the second boundary, the belonging label of each boundary vertex is determined, and if the belonging label is the first boundary point set or the second boundary point set, the boundary vertex is stored in the corresponding boundary point set. Based on the boundary vertices in the first boundary point set and the first intersection point, supplementary lines for the first boundary are determined from the boundary lines of the target region, and the first boundary is supplemented with lines; based on the boundary vertices in the second boundary point set and the second intersection point, supplementary lines for the second boundary are determined from the boundary lines of the target region, and the second boundary is supplemented with lines.
5. The method according to claim 4, characterized in that, Extending the first boundary and the second boundary to obtain the first intersection point of the extended line of the first boundary with the boundary of the target area, and the second intersection point of the extended line of the second boundary with the boundary of the target area, includes: Taking the two endpoints of the first boundary as extension starting points, and taking the direction of extension from the adjacent inflection point of the extension starting point to the extension starting point as the extension direction, extend the two ends of the first boundary by a preset length to obtain the first intersection point that intersects with the boundary of the target area; Taking the two endpoints of the second boundary as extension starting points, and taking the direction of extension from the adjacent inflection point of the extension starting point to the extension starting point as the extension direction, extend the two ends of the second boundary by a preset length to obtain the second intersection point that intersects with the boundary of the target area.
6. The method according to claim 4, characterized in that, Based on the positional relationship of each boundary vertex of the target region relative to the first boundary and the second boundary, the attribution label of each boundary vertex is determined, including: Based on the first set of boundary points and the second set of boundary points, the extended first boundary and second boundary are divided into multiple first boundary segments and multiple second boundary segments; For each boundary vertex of the target region: calculate the first target line segment closest to the boundary vertex for each of the first boundary line segments. If the boundary vertex is located on the first side of the first target line segment, then define the belonging label of the boundary vertex as the first boundary point set. If the boundary vertex is located on the second side of the first target line segment, then calculate the second target line segment closest to the boundary vertex for each of the second boundary line segments. If the boundary vertex is located on the second side of the second target line segment, then define the belonging label of the boundary vertex as the second boundary point set.
7. The method according to claim 1, characterized in that, After obtaining the first-side restricted area containing the first boundary and the second-side restricted area containing the second boundary, the method further includes: Verify and confirm that there are no roads for vehicles to travel in the first and second restricted areas.
8. A road boundary processing device, characterized in that, include: The boundary acquisition module is used to acquire the road boundary to be processed. The road boundary includes a first boundary and a second boundary on both sides of the road. The first boundary and the second boundary are non-closed lines. The target area determination module is used to determine the target area covering the road boundary based on the position information of the first boundary and the second boundary; A boundary processing module is used to supplement the first boundary and the second boundary with the boundary lines of the target area to obtain a first-side restricted area containing the first boundary and a second-side restricted area containing the second boundary, so as to determine the area in the road that is allowed to pass based on the first-side restricted area and the second-side restricted area.
9. A mobile electronic device terminal, characterized in that, include: One or more processors; Storage device for storing 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-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.