Road generation method and apparatus

By thinning and smoothing the location points of the road centerline, target location points that conform to the alignment standard are generated, solving the problem of uneven edge lines in the existing technology and realizing the generation of smooth road edge lines.

WO2026066461A1PCT designated stage Publication Date: 2026-04-02AUTONAVI SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing technologies that generate edge point locations based on the road centerline result in uneven road edges, with issues such as burrs, sharp corners, or folds, leading to data quality that does not meet requirements.

Method used

By thinning the centerline location points, feature points are obtained. The system is then segmented according to these feature points, and each segment is smoothed to generate target location points that conform to the alignment standards. Finally, edge line location points are generated based on the target location points and the preset road width.

Benefits of technology

Ensure that the generated road edges are smooth overall, improve data quality, avoid edge overlap and unevenness, and meet data quality requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025106287_02042026_PF_FP_ABST
    Figure CN2025106287_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a road generation method and apparatus. The method comprises: acquiring position points forming a center line of a road; thinning the position points to obtain, as feature points, position points representing the line shape of the center line; dividing the position points into segments according to the feature points; according to the line shape of a curve formed by position points in a same segment, smoothing the position points to obtain target position points in the segment, wherein the line shape of a curve formed by the target position points meets a line shape standard; and generating side line position points of the road on the basis of the target position points and a preset road width. In the present disclosure, since the line shape of the curve formed by the target position points obtained after smoothing meets a line shape standard, that is, the line shape of the center line obtained after smoothing meets a line shape standard, the line shape of side lines formed by the side line position points of the road generated on the basis of the target position points is also standard, thereby ensuring that the data quality of a road having a width and formed by the side line position points meets requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Road generation method and device

[0001] The present disclosure claims priority to the Chinese patent application No. 202411372368.0, filed on September 29, 2024, and entitled "Road generation method and device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to the technical field of map, in particular to a road generation method and device. BACKGROUND

[0003] Map data records information of various entity elements such as roads, buildings, shops and the like in the real world. In the map data, a line element is usually used to express a road in the real world, and in most cases, a position point on the center line of the road is used to express the road. Since the line has no width, it does not conform to the case that the road in the real world has a width, therefore, the prior art generates two edge lines of the road based on the center line of the road to obtain a road with a width.

[0004] However, the present inventors have found that the prior art generates the edge line position points of the road by offsetting a certain distance from the angle bisector of the position point on the center line of the road to the two sides of the center line. Since the center line of the road itself has a problem of not smooth enough line shape, the edge line position points generated directly based on the position points on the center line will make the line shape of the edge line of the road composed of the edge line position points more not smooth, and further cause the data quality of the road with a width composed of the edge line position points to not meet the demand. Therefore, it is necessary to provide a technical solution capable of generating a road with a width with data quality meeting the demand. SUMMARY

[0005] In view of the above, the present disclosure provides a road generation method and device, the main purpose of which is to smooth the position points constituting the center line of the road to obtain target position points constituting a smooth curve, and then generate edge line position points of the road based on the target position points, so as to make the edge line of the generated road smooth as a whole, and obtain a road with a width with data quality meeting the demand.

[0006] In order to solve the above problems, the present disclosure mainly provides the following technical solutions:

[0007] In a first aspect, the present disclosure provides a road generation method, comprising: obtaining position points constituting a center line of a road; thinning the position points to obtain position points representing a line shape of the center line as feature points; segmenting the position points according to the feature points; smoothing the position points according to a line shape of a curve constituted by the position points in a same segment to obtain target position points in the segment, the line shape of the curve constituted by the target position points meeting a line shape standard; and generating edge line position points of the road according to the target position points and a preset road width.

[0008] In a second aspect, the present disclosure further provides a road generation apparatus, comprising: a data acquisition unit configured to obtain position points constituting a center line of a road; a feature point determination unit configured to thin the position points to obtain position points representing a line shape of the center line as feature points; a segmentation unit configured to segment the position points according to the feature points; a first processing unit configured to smooth the position points according to a line shape of a curve constituted by the position points in a same segment to obtain target position points in the segment, the line shape of the curve constituted by the target position points meeting a line shape standard; and a second processing unit configured to generate edge line position points of the road according to the target position points and a preset road width.

[0009] In a third aspect, the present disclosure further provides a storage medium comprising a stored program, wherein the program, when executed, controls a device in which the storage medium is located to perform the road generation method as described above.

[0010] In a fourth aspect, the present disclosure further provides a processor configured to execute a program, wherein the program, when executed, performs the road generation method as described above.

[0011] In a fifth aspect, the present disclosure further provides a terminal device comprising at least one processor, a memory, wherein the memory is configured to store a program executed by the processor and data required in a process in which the processor executes the program.

[0012] The processor is configured to execute the program, wherein the program, when executed, performs the road generation method as described above.

[0013] In a sixth aspect, the present disclosure further provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the road generation method as described above.

[0014] The road generation method and device provided by the present disclosure obtain position points of a center line of a road; thin out the position points to obtain position points representing a line shape of the center line as feature points; segment the position points according to the feature points; perform smoothing processing on the position points according to a line shape of a curve formed by the position points in the same segment to obtain target position points in the segment, and the line shape of the curve formed by the target position points meets a line shape standard; and generate side line position points of the road according to the target position points and a preset road width. Since the line shape of the curve formed by the target position points obtained through the smoothing processing meets the line shape standard, that is, the line shape of the center line obtained through the smoothing processing meets the line shape standard, the line shape of the side line formed by the side line position points generated based on the target position points is also standard, thereby ensuring that the data quality of the road with a width formed by the side line position points meets the requirement. BRIEF DESCRIPTION OF DRAWINGS

[0015] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The detailed description is made with reference to the accompanying drawings.

[0016] FIG. 1 shows a side line diagram generated by the prior art;

[0017] FIG. 2 shows a flowchart of a road generation method provided by an embodiment of the present disclosure;

[0018] FIG. 3 shows a diagram of a position point that is a feature point in a center line provided by an embodiment of the present disclosure;

[0019] FIG. 4 shows a diagram of another position point that is a feature point in a center line provided by an embodiment of the present disclosure;

[0020] FIG. 5 shows a diagram of determining a first sampling point and an initial feature point provided by an embodiment of the present disclosure;

[0021] FIG. 6 shows a diagram of determining a second sampling point and a feature point provided by an embodiment of the present disclosure;

[0022] FIG. 7 shows a diagram of calculating a maximum distance from a position point in a segment to a connecting line provided by an embodiment of the present disclosure;

[0023] FIG. 8 shows a diagram of two position points at two ends in a segment as target position points in the segment provided by an embodiment of the present disclosure;

[0024] FIG. 9 shows a diagram of determining a fitting position point based on optimal Bezier fitting for a segment provided by an embodiment of the present disclosure;

[0025] FIG. 10 shows a schematic diagram of a target position point obtained by segmenting based on Gaussian smoothing according to an embodiment of the present disclosure;

[0026] FIG. 11 shows a schematic diagram of determination and deletion processing of edge line position points causing edge line overlap according to an embodiment of the present disclosure;

[0027] FIG. 12 shows a schematic diagram of smoothing connection of a curve formed by target position points in two adjacent segments according to an embodiment of the present disclosure;

[0028] FIG. 13 shows a schematic diagram of a curve formed by target position points obtained from position points of a center line according to an embodiment of the present disclosure;

[0029] FIG. 14 shows a schematic diagram of left and right edge line position points misaligned and road width uneven according to an embodiment of the present disclosure;

[0030] FIG. 15 shows a schematic diagram of left and right edge line position points aligned and road width even according to an embodiment of the present disclosure;

[0031] FIG. 16 shows a structural diagram of a road generation apparatus according to an embodiment of the present disclosure;

[0032] FIG. 17 shows a structural diagram of another road generation apparatus according to an embodiment of the present disclosure;

[0033] FIG. 18 shows a structural diagram of yet another road generation apparatus according to an embodiment of the present disclosure;

[0034] FIG. 19 shows a structural diagram of yet another road generation apparatus according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings. While example embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.

[0036] In the related art, as shown in FIG. 1, the line shape of the center line of the road itself is not smooth, and the side line of the road generated based on the non-smooth center line is more non-smooth, such as generating side line position points of the road by offsetting a certain distance to both sides of the center line along the angle bisector of the position points on the center line of the road. The line shape of the side line formed by the generated side line position points is more non-smooth, and the side line formed by the side line position points may have burrs or protruding sharp corners or obvious concave, etc. More seriously, in some cases, the problem of (reverse) folding shown in FIG. 1 may occur, that is, the side line formed by the side line position points overlaps itself at a certain position. However, the side line of the real-world road does not have such a problem, and thus the data quality of the road with width formed by the side line position points does not meet the requirements.

[0037] Therefore, the present disclosure provides a road generation method and device, wherein the method comprises: obtaining position points constituting a center line of a road; performing thinning on the position points to obtain position points representing a line shape of the center line as feature points; segmenting the position points according to the feature points; performing smoothing processing on the position points according to the line shape of the curve formed by the position points in the same segment to obtain target position points in the segment, and the line shape of the curve formed by the target position points meets a line shape standard; and generating side line position points of the road according to the target position points and a preset road width. Since the line shape of the curve formed by the target position points obtained by the smoothing processing meets the line shape standard, that is, the line shape of the center line after the smoothing processing meets the line shape standard, the line shape of the side line formed by the side line position points generated based on the target position points is also standard, thereby ensuring that the data quality of the road with width formed by the side line position points meets the requirements.

[0038] As shown in FIG. 2, the present disclosure provides a flow chart of a road generation method, which comprises:

[0039] S1: obtaining position points constituting a center line of a road.

[0040] It can be understood that in the standard map data (ordinary map data), the road in the real world is abstracted as a directional line, and the line is expressed by a series of position points in the standard map data, and these position points are usually located on the center line of the road. Therefore, in order to expand the road with width, the position points constituting the center line of the road need to be obtained, and this part of data can come from the standard map data made. As shown in FIG. 1, the solid circles represent the position points constituting the center line of the road.

[0041] S2: performing thinning on the position points to obtain position points representing a line shape of the center line as feature points.

[0042] It can be understood that, because the number of position points constituting the center line of the road is large, the position points are thinned out to determine position points capable of representing the line shape of the center line, so that the line shape of the center line after smoothing can not only retain the characteristics of the line shape of the center line, but also improve the efficiency of smoothing.

[0043] Exemplarily, if the line shape of a segment of the center line is a straight line, the feature points are preferably two position points at the two ends of the segment of the straight line. If the line shape of a segment of the center line is an arc line, the feature points are preferably two position points at the two ends of the segment of the arc line and position points between the two ends capable of representing the curvature of the arc line.

[0044] In a specific implementation, the thinning out of the position points to obtain the position points capable of representing the line shape of the center line as the feature points can adopt the following embodiments:

[0045] Embodiment 1: A preset thinning distance threshold (thinning threshold) is adopted to Douglas thin the position points to obtain the position points capable of representing the line shape of the center line as the feature points. Those skilled in the art can refer to the existing Douglas thinning algorithm to implement the present disclosure, and the present disclosure will not expand the Douglas thinning algorithm.

[0046] In the process of practicing embodiment 1, the present inventor finds that, if the value of the thinning distance threshold is large, the curve constituted by the position points serving as the feature points is easy to deviate from the center line constituted by the position points before thinning, such as the curve constituted by the feature points circled by the dashed line in FIG. 3 obviously deviates from the center line constituted by the position points before thinning. If a smaller thinning distance threshold is adopted, the number of position points serving as the feature points is large, and the curve constituted by the feature points retains the characteristics of the center line that do not need to be retained. For example, as shown in FIG. 4, the segment of the center line is obviously a straight line, but the curve constituted by the feature points after thinning appears a line shape of straight line-arc line-straight line-arc line-straight line, which does not conform to the actual situation of the line shape.

[0047] Therefore, in actual application, if the business scenario does not have high requirements on the accuracy of the line shape constituted by the feature points, embodiment 1 can be adopted. To solve the problems existing in the process of practicing embodiment 1, the present disclosure further provides embodiment 2, which is as follows:

[0048] Embodiment 2: The position points are Douglas thinned twice to obtain the position points capable of representing the line shape of the center line as the feature points, wherein a first distance threshold adopted in the first Douglas thinning is smaller than a second distance threshold adopted in the second Douglas thinning.

[0049] That is, the first Douglas thinning is performed on all the position points constituting the center line based on the first distance threshold value to obtain reserved position points; and then the second Douglas thinning is performed on the reserved position points based on the second distance threshold value to obtain the position points representing the linearity of the center line as the feature points.

[0050] In the embodiments of the present disclosure, the feature points representing the linearity of the center line can be obtained by performing the Douglas thinning twice on the position points, so that the curve constituted by the feature points conforms to the actual linearity, and the curve constituted by the feature points obtained by the thinning does not deviate from the original center line.

[0051] In some embodiments, the position points of the center line are arranged in the order of the road direction, that is, the position points of the center line are arranged in order, and in this case, the two times of Douglas thinning on the position points to obtain the feature points representing the linearity of the center line can be implemented as follows:

[0052] The first Douglas thinning is performed on the position points of the center line based on the first distance threshold value to obtain the position points as the first sampling points;

[0053] The distances between adjacent two first sampling points are obtained, and the first sampling points with continuous distances less than a preset third distance threshold value are divided into a segment, and the first sampling points arranged at the first and last positions in the segment are marked as initial feature points;

[0054] The second Douglas thinning is performed on the position points as the first sampling points based on the second distance threshold value to obtain the position points as the second sampling points;

[0055] The initial feature points arranged at the first and last positions between adjacent two second sampling points are taken as the feature points representing the linearity of the center line.

[0056] In some embodiments, a fixed distance value (such as 5 meters, or 10 meters, etc.) can be set, and the product value of the length of the center line and a set coefficient is obtained, the set coefficient is a positive number less than 1, for example, the set coefficient can be 0.3 or 0.25 or 0.2, etc., and then the smaller one of the fixed distance value and the product value is selected as the third distance threshold value. Of course, the third distance threshold value can also be set by the technician according to experience, and does not affect the implementation of the present disclosure.

[0057] The specific process of the two times of Douglas thinning will be described below with reference to FIGS. 5 and 6.

[0058] As shown in FIG. 5, the position points of the center line are arranged in order of the road direction, the position points constituting the center line are first Douglas thinned based on a first distance threshold, and the reserved position points are obtained as first sampling points, the first sampling points being the black points in the left drawing of FIG. 5; for the first sampling points, the interval between two adjacent first sampling points is obtained, the first sampling points with a continuous interval less than a preset third distance threshold are divided into a segment, the black points in the left drawing of FIG. 5 located in the same dotted circle are sampling points belonging to the same segment; and the first sampling points ranked at the first and last positions in the segment are marked as initial feature points, the gray points in the right drawing of FIG. 5.

[0059] After the first sampling points and the initial feature points are determined, as shown in FIG. 6, the position points as the first sampling points are second Douglas thinned based on a second distance threshold, and the position points as second sampling points are obtained (the gray points in the left drawing of FIG. 6), and the initial feature points located between two adjacent second sampling points and ranked at the first and last positions are taken as feature points representing the linearity of the center line (the black points in the black circles in the right drawing of FIG. 6, that is, the gray points shown in the right drawing of FIG. 5), specifically:

[0060] Referring to the first black circle and the second black circle in the left drawing of FIG. 6, the gray points in the two black circles are two adjacent second sampling points, wherein the point in the first black circle corresponds to the first point in the right drawing of FIG. 5, the point is also marked as an initial feature point when the first thinning is performed, and when the feature points are determined, the point is an initial feature point located between the second black circle and the second black circle in the left drawing of FIG. 6 and ranked at the first position, so the point is selected as a feature point, further, it can be known from the right drawing of FIG. 5 that the initial feature point located between the first black circle and the second black circle in the left drawing of FIG. 6 and ranked at the last position is the sixth gray point from top to bottom in the right drawing of FIG. 5, that is, the point circled by the second black circle in the right drawing of FIG. 6.

[0061] It should be noted that the values of the first distance threshold and the second distance threshold can be set as needed, as long as the first distance threshold is less than the second distance threshold, and the present disclosure does not make specific limitations thereto.

[0062] Please continue to refer to FIG. 2, S3 is performed after S2 is performed.

[0063] S3: segmenting the position points according to the feature points. That is, the position points constituting the center line of the road are segmented by the position points as the feature points.

[0064] For example, the position points constituting the center line of the road are 10 in total, according to the ranking, the third position point and the seventh position point are the feature points, then 1-3 are segmented into one segment, 4-7 are segmented into one segment, and 8-10 are segmented into one segment.

[0065] As mentioned above, there are two embodiments when the feature points are decimated, and in embodiment 1, a preset decimation distance threshold is used for one-time Douglas decimation. If the value of the decimation distance threshold is large, the curve composed of the position points as the feature points is easy to deviate from the center line composed of the position points before decimation. When the position points are segmented according to the feature points, as shown in FIG. 3, the end of the segmentation obtained will be displaced relative to the center line, and the end of the segmentation is easy to have a problem of lifting. On the contrary, if the value of the decimation distance threshold is small, more position points are decimated to be determined as the feature points, and the curve composed of the feature points retains the features that the center line does not need to retain. When the position points are segmented according to the feature points, there is a problem of over-segmentation, as shown by the dashed circle in FIG. 4, and originally one straight line segment will be divided into three segments due to retaining too many position points as the feature points.

[0066] In the embodiment of the present disclosure, by decimating the position points twice, the feature points that accurately represent the line shape of the center line can be obtained, and then the position of the segmentation according to the position points is more accurate, avoiding the problems of lifting at the end of the segmentation shown in FIG. 3 and over-segmentation shown in FIG. 4.

[0067] S4: The position points are smoothed according to the line shape of the curve composed of the position points in the same segment to obtain target position points in the segment, and the line shape of the curve composed of the target position points meets the line shape standard.

[0068] The common road shapes in the real world include straight roads and curved roads, and the present disclosure abstracts the road in the real world as a line for processing. Since the abstracted line is also made according to the situation of the road in the real world, for the embodiment of the present disclosure, the line shape of the curve composed of the target position points usually includes a straight line (straight road) and an arc line (curved road), and the line shape of the curve composed of the target position points meeting the line shape standard can be understood as: the line shape of the curve composed of the target position points meeting the straight line shape standard or the arc line shape standard.

[0069] In the embodiment of the present disclosure, the position points are smoothed according to the line shape of the curve composed of the position points in the same segment, and if the line shape is a straight line, the position points are smoothed to obtain target position points in the segment, and the line shape of the curve composed of the target position points meets the straight line shape standard; if the line shape is an arc line, the position points are smoothed to obtain target position points in the segment, and the line shape of the curve composed of the target position points meets the arc line shape standard.

[0070] In some embodiments, the position points are smoothed according to the line shape of the curve composed of the position points in the same segment to obtain target position points in the segment, and the line shape of the curve composed of the target position points meets the line shape standard, which can be a specific embodiment as follows:

[0071] determining a line connecting the two position points at the two ends of the same segment;

[0072] determining distances from the other position points in the segment to the line, and if a maximum distance among the distances is less than a segment distance threshold, determining that the line shape of the curve formed by the position points in the segment is an approximate straight line, and then retaining the two position points at the two ends of the segment as target position points in the segment and deleting the other position points in the segment;

[0073] If the maximum distance among the distances is greater than the segment distance threshold, it is determined that the line shape of the curve formed by the position points in the segment is an arc, and then the position points in the segment are smoothed based on a curve fitting algorithm to obtain fitting position points, and if a fitting error of the curve formed by the fitting position points is less than an error threshold, the fitting position points are taken as the target position points in the segment.

[0074] In the embodiments of the present disclosure, the same segment distance threshold can be generated for all segments, or different segment distance thresholds can be generated for different segments. For example, the corresponding segment distance threshold can be generated based on the length of the line connecting the two end points of the segment, and whether the threshold can accurately distinguish a straight line from an arc is also considered when the segment distance threshold is generated. Therefore, in the specific implementation, the segment distance threshold that can distinguish a straight line from an arc can also be set according to experience, and a more reasonable value can be selected from the experience-set threshold and the calculated threshold as the final segment distance threshold.

[0075] The following describes specific embodiments of smoothing the position points according to the line shape of the curve formed by the position points in the same segment to obtain the target position points in the segment, so that the line shape of the curve formed by the obtained target position points meets the line shape standard.

[0076] In the embodiments of the present disclosure, as shown in FIG. 7, the part indicated by the dashed line is a segment, and the dashed line is a line connecting the two position points at the two ends of the segment. The distances from the other position points in the segment to the line are calculated, and a maximum distance among the distances (the maximum distance shown in FIG. 7) can be determined. If the maximum distance shown in FIG. 7 is less than the segment distance threshold corresponding to the segment, it is determined that the line shape of the curve formed by the position points in the segment is a straight line, and the two position points at the two ends of the segment can be retained as the target position points in the segment, and the other position points in the segment are deleted. As shown in FIG. 8, the smoothed segment meets the straight line shape standard.

[0077] In the embodiments of the present disclosure, in the case that the line shape of the curve formed by the position points in the segment is a straight line, the two position points at the two ends in the segment are reserved as the target position points in the segment, and the other position points in the segment are deleted. Since the two position points can accurately express a straight line, the two position points reserved as the target position points will not cause the problem of non-smoothness in the segment with the line shape of a straight line, and the curve formed by the target position points in the segment meets the straight line shape standard.

[0078] Further, if the maximum distance in the segment is greater than the segment distance threshold corresponding to the segment, it is determined that the line shape of the curve formed by the position points in the segment is an arc line. The position points in the segment can be smoothed based on a curve fitting algorithm to obtain fitting position points. If the fitting error of the curve formed by the fitting position points is less than an error threshold, the fitting position points are taken as the target position points in the segment. For example, the error threshold can be set to 1.0 or any other value.

[0079] In the embodiments of the present disclosure, the position points in the segment are smoothed based on a curve fitting algorithm to obtain fitting position points. The position points in the segment can be smoothed based on a Bezier curve or an optimal Bezier curve to obtain fitting position points. If the first position point and the second position point are taken as the end points of the segment, the first tangent direction of the segment at the first position point and the second tangent direction of the segment at the second position point are determined according to the direction of the segment. Then, the position points in the segment are smoothed based on the Bezier curve or the optimal Bezier curve according to the first position point, the second position point, the first tangent direction and the second tangent direction to obtain the fitting position points.

[0080] As shown in FIG. 9, the position points in the segment shown in the left part of FIG. 9 are smoothed based on an optimal Bezier curve to obtain fitting position points. If the fitting error of the curve formed by the fitting position points shown in the right part of FIG. 9 is less than 1.0, the fitting position points shown in the right part of FIG. 9 are taken as the target position points in the segment.

[0081] For the case that the fitting error of the curve formed by the fitting position points is greater than the error threshold, in some embodiments, if the fitting error of the curve formed by the fitting position points is not less than the error threshold, a Gaussian smoothing algorithm is used to smooth the position points in the segment to obtain the target position points in the segment.

[0082] As shown in the left part of FIG. 10, the fitting error of the curve formed by the fitting position points is obviously greater than the error threshold, and a Gaussian smoothing algorithm is used to smooth the position points in the segment to obtain the target position points in the segment shown in the right part of FIG. 10.

[0083] In the embodiments of the present disclosure, in a case where it is determined that the linearity of the curve formed by the position points in the segment is an arc, the position points in the segment are smoothed based on a curve fitting algorithm to obtain fitting position points, and in a case where the fitting error of the curve formed by the fitting position points is less than an error threshold, the fitting position points are taken as the target position points in the segment. Since the target position points in the segment are determined based on the curve fitting algorithm and the fitting error is less than the threshold, the linearity of the curve formed by the target position points will not have the problem of being not smooth, and the linearity of the curve meets the arc linearity standard. Further, in a case where the fitting error is greater than the error threshold, the position points in the segment are smoothed by using a Gaussian smoothing algorithm to obtain the target position points in the segment. Since the target position points in the segment are further determined based on the Gaussian smoothing algorithm, the linearity of the curve formed by the target position points will not have the problem of being not smooth, and the linearity of the curve also meets the arc linearity standard.

[0084] Please continue to refer to FIG. 2, S5 is performed after S4.

[0085] S5: generating the edge line position points of the road according to the target position points and the preset road width.

[0086] In some embodiments, the preset road width is a real road width, which can be determined according to the number of lanes and the lane width. Since the preset road width is a real road width, after the edge line position points of the road are generated, the edge line position points form two edge lines of the road, and the road with a width formed by the two edge lines can be spliced and fitted with the road in the high-precision map data.

[0087] In the embodiments of the present disclosure, after the target position points and the preset road width are determined, the edge line position points of the road can be determined by using the method of angle bisector according to the target position points and the preset road width, for example, the target position points are respectively offset by half of the preset road width in the direction of the two angle bisectors of the curve formed by the target position points at the target position points, to determine the edge line position points of the road. It can be understood that the edge line position points include left edge line position points and right edge line position points, wherein the left edge line position points form a left edge line, and the right edge line position points form a right edge line.

[0088] In actual applications, the edge lines of the road formed by the edge line position points can have the problem of edge line (reverse) folding as shown in FIG. 1, which needs to be detected and solved. It should be noted that the edge line (reverse) folding can also be referred to as edge line overlap, reverse overlap, etc.

[0089] To ensure that the edge lines do not have the problem of reverse folding, in the embodiments of the present disclosure, after the edge line position points of the road are generated, the following steps are further included:

[0090] determine whether the edge line position points on the same edge line exist edge line position points causing the edge line to overlap; if so, delete the edge line position points causing the edge line to overlap from the edge line position points of the road.

[0091] It can be understood that, generally, if the edge line does not have overlapping problems, there is at most one intersection point when the two segments of the edge line are intersected with each other, and if there are more than one intersection points when the two segments of the edge line are intersected with each other, for example, there are two intersection points, it can be determined that the two segments of the edge line have overlapping.

[0092] In some embodiments, the line segments formed by the edge line position points can be intersected with each other to detect the edge line position points causing the edge line to overlap, but the time complexity of this method is O(n 2 ), n is the number of edge line position points, and if the number of edge line position points is very large, the time complexity is high.

[0093] Based on the consideration of reducing the time complexity, the embodiments of the present disclosure provide a method for detecting whether the edge line position points on the same edge line exist edge line position points causing the edge line to overlap, comprising:

[0094] segmenting the edge line position points arranged in sequence on the same edge line;

[0095] For a segment, determining the line connecting the two edge line position points at both ends in the segment;

[0096] obtaining the projection point of the edge line position point in the segment to the line, and the distance from the projection point to the specified edge line position point, the specified edge line position point being any one of the two edge line position points at both ends in the segment;

[0097] comparing the distances from the projection points of the edge line position points to the specified edge line position point according to the order of the edge line position points in the segment, if the distance from the projection point of the current edge line position point to the specified edge line position point is less than the maximum one of the distances from the projection points of the edge line position points that have been compared to the specified edge line position point, the current edge line position point is determined as the edge line position point causing the edge line to overlap.

[0098] In the embodiments of the present disclosure, the edge line position points arranged in sequence on the edge line are segmented, and the edge line position points within a preset step length can be sequentially divided into the same segment according to the arrangement order of the edge line position points on the edge line. The preset step length is a step length coefficient multiplied by a preset road width, for example, the step length coefficient is 4, and the preset step length is 4 times the preset road width.

[0099] The specific process of detecting and deleting the edge line position points causing the edge line to overlap will be described below in conjunction with FIG. 11.

[0100] [According to Rule 26, correct 04.08.2025] As shown in the left part of FIG. 11, the edge line formed by the edge line position points has an overlap at the corner, as shown in the middle part of FIG. 11, the edge line position points arranged in sequence on the same edge line are segmented at a preset step, as shown in the middle part of FIG. 11, the edge line is divided into two segments, and the line connecting the two edge line position points at the two ends of the segments is the single arrow straight line shown in the middle part of FIG. 11, the projection point of the edge line position point in the segment to the line is obtained, and the distance from the projection point to the specified edge line position point, as shown in the middle part of FIG. 11, in sequence, the edge line position point pointed to by the black arrow is arranged before the edge line position point pointed to by the gray arrow, when the edge line position point pointed to by the black arrow is traversed, the distance from the projection point of the edge line position point to the baseline (single arrow line) to the specified edge line position point is the largest, and when the edge line position point pointed to by the gray arrow is traversed, as shown in the middle part of FIG. 11, the distance is obviously smaller than that of the edge line position point pointed to by the black arrow. Therefore, it can be determined that the segment of the edge line has an overlap problem.

[0101] In the embodiments of the present disclosure, after determining the edge line position point causing the overlap of the edge line, the edge line position point causing the overlap of the edge line is deleted from the edge line position points of the road, which can solve the problem of edge line overlap (or reverse folding), as shown in the right part of FIG. 11, so that the finally obtained edge line of the road is overall smooth, the aesthetic appearance of the road is improved, and the data quality of the road with width formed by the edge line position points meets the requirements.

[0102] It can be understood that in the foregoing method, the position points are processed in segments to obtain target position points, and whether the curve formed by the target position points in adjacent segments can be smoothly connected at the connection needs to be detected, as shown in the left part of FIG. 12, if the curve formed by the target position points in adjacent segments cannot be smoothly connected at the connection, further processing is required to make the curve smoothly connected (as shown in the right part of FIG. 12).

[0103] Based on this, in the embodiments of the present disclosure, before generating the edge line position points of the road based on the target position points and the preset road width, the following further includes:

[0104] Detecting whether the curve formed by the target position points in adjacent two segments is smoothly connected, if not, deleting part of the target position points from the two segments, and generating the target position points for smoothly connecting the two segments based on the remaining target position points in the two segments after deleting part of the target position points in the two segments by using a curve fitting algorithm. The curve fitting algorithm can be a Bezier curve or an optimal Bezier curve.

[0105] In some embodiments, the detection of whether the curve formed by the target position points in the two adjacent segments is smoothly connected includes: for the two adjacent segments, obtaining a first straight line formed by the last two target position points in the former segment, and obtaining a second straight line formed by the first two target position points in the latter segment; determining an included angle formed by the first straight line and the second straight line, and determining whether the included angle is less than a preset included angle threshold; and determining, according to whether the included angle is less than the preset included angle threshold, whether the curve formed by the target position points in the two adjacent segments is smoothly connected.

[0106] It can be understood that the first straight line and the second straight line intersect to form four included angles, and among the four included angles formed by the first straight line and the second straight line, the included angle opening towards the inside of the curve formed by the target position points in the two adjacent segments is determined, and it is determined whether the included angle is less than the preset included angle threshold.

[0107] Of course, if the first straight line is perpendicular to the second straight line, the degrees of the four included angles are all 90°, and the included angle formed by the first straight line and the second straight line can be determined as any one of the four included angles.

[0108] In some embodiments, the included angle threshold is 170°, 175°, or 180°, etc.

[0109] In the embodiments of the present disclosure, by determining whether the included angle of the two adjacent segments at the splicing position is less than the preset included angle threshold, it can be determined whether the curve formed by the target position points in the two adjacent segments is smoothly connected, so as to process the two adjacent segments that are not smoothly connected, and achieve smooth connection.

[0110] In the embodiments of the present disclosure, the target position points to be deleted from the two segments can be the target position points within a preset length from the connection position of the two segments. In some embodiments, the preset length is 5 meters, 4 meters, or 1 meter, etc.

[0111] In some embodiments, the preset length is related to the length of the shortest segment of the two adjacent segments, for example, the preset length is one tenth of the length of the shortest segment of the two adjacent segments.

[0112] In some embodiments, the preset length is related to the degree of non-smoothness of the two adjacent segments, for example, the preset length is related to the angle of the included angle formed by the two adjacent segments at the splicing position. Among them, the preset length is related to the angle (referred to as the first angle) of the included angle opening towards the inside of the curve formed by the target position points in the two adjacent segments among the four included angles formed by the first straight line and the second straight line.

[0113] Exemplarily, the preset length is inversely proportional to the first angle, the greater the first angle, the smaller the preset length, and vice versa, the smaller the first angle, the greater the preset length; or the preset length is proportional to the first angle, the greater the first angle, the greater the preset length, and vice versa, the smaller the first angle, the smaller the preset length.

[0114] In the embodiments of the present disclosure, based on the remaining target position points after the target position points of the deleted part in the two adjacent segments, a method for smoothing the target position points of the two segments is generated by using a Bezier curve or an optimal Bezier curve, including: determining a first target position point in the target position points of the previous segment that is closest to the connection of the two segments, a second target position point in the target position points of the next segment that is closest to the connection of the two segments, and a first target direction in which the tangent line at the first target position point of the previous segment extends to the next segment, and a second target direction in which the tangent line at the second target position point of the next segment extends to the previous segment, and then generating the target position points for smoothing the two segments based on the Bezier curve or the optimal Bezier curve according to the first target position point, the second target position point, the first target direction and the second target direction.

[0115] In the embodiments of the present disclosure, by detecting whether the curve composed of the target position points in the two adjacent segments is smoothly connected, the two adjacent segments that are not smoothly connected are processed to generate the target position points for smoothly connecting the two segments, so that the curve composed of the overall target position points of different segments meets the linearity standard, and the target position points of the two adjacent segments that are smoothly connected are obtained, so that the edge line of the road composed of the edge line position points obtained from the target position points can be smoothly connected as a whole, and the aesthetic appearance of the road is improved.

[0116] For the convenience of understanding the embodiments of the present disclosure, the road generation method provided by the embodiments of the present disclosure is exemplarily illustrated below in combination with FIG. 13.

[0117] As shown in the left side of FIG. 13, the position points constituting the center line of the road are obtained, the position points of the center line of the road are segmented into segment 1, segment 2 and segment 3, the position points are smoothed according to the linearity of the curve composed of the position points in the same segment to obtain the target position points in the segment, and it is detected whether the curve composed of the target position points in the two adjacent segments is smoothly connected. If not, delete part of the target position points from the two segments, and then based on the remaining target position points after the target position points of the deleted part in the two adjacent segments, a curve fitting algorithm is used to generate the target position points for smoothly connecting the two segments, so that the linearity of the curve composed of the finally obtained target position points meets the linearity standard, as shown in the right side of FIG. 13, segment 1 is smoothly connected, segment 2 is smoothly connected, and segment 3 is smoothly connected.

[0118] It should be noted that the detailed step process in the example of FIG. 13 can refer to the description of the related steps described above, and will not be described here.

[0119] In the embodiments of the present disclosure, according to the target position point and the preset road width, the edge line position points of the road are generated, wherein the edge line position points include left edge line position points and right edge line position points, the left edge line position points constitute a left edge line, the right edge line position points constitute a right edge line, the left edge line and the right edge line are respectively located on two sides of the center line, the left edge line position points and the right edge line position points are respectively located on two sides of the target position point of the center line, the number of the left edge line position points and the right edge line position points is the same, and the left edge line position points and the right edge line position points are symmetrical with respect to the target position point, so that the distance between any mutually symmetrical left edge line position points and right edge line position points can be determined when the road width is determined.

[0120] However, in the case that there are edge line position points on the same edge line that cause the edge line to overlap, after deleting the edge line position points that cause the edge line to overlap from the edge line position points of the road, the number of the edge line position points on the left edge line and the rear edge line is inconsistent, so that the road width cannot be calculated according to the distance between any mutually symmetrical left edge line position points and right edge line position points. Therefore, the left edge line position points and the right edge line position points need to be aligned to facilitate subsequent calculation of the road width.

[0121] One alignment method is to fix a certain edge line, and to determine the edge line position points on the other edge line that are proportionally aligned according to the edge line position points on the edge line, as shown in FIG. 14. However, such an alignment method can cause the road width to be uneven, as shown in FIG. 14. The road width determined by the aligned edge line position points is uneven, and it can be seen that the road width of the aligned edge line position points is uneven after the road turns.

[0122] Therefore, the embodiments of the present disclosure further provide an edge line position point alignment method, which comprises:

[0123] According to the feature points of the center line, edge line feature points on the left edge line and the right edge line are respectively determined, and the distance from the edge line feature points to the feature points is the shortest;

[0124] The feature points of the center line can be the feature points obtained in the foregoing step S2, or can be feature points obtained by thinning the target position points obtained in step S4, and do not affect the implementation of the present disclosure. The target position points obtained in step S4 can be thinned once by the Douglas method, or can be thinned twice by the Douglas method. The specific thinning process is described in the foregoing related part, and will not be repeated here.

[0125] The edge line position points on the left edge line are segmented by using the edge line feature points of the left edge line;

[0126] Segment the edge line position points on the right edge line according to the edge line feature points of the right edge line;

[0127] Segment the edge line feature points determined by the same two feature points, the segments corresponding to the left edge line and the segments corresponding to the right edge line, and sample the edge line position points in the segments corresponding to the left edge line or the right edge line according to the distance ratio principle, so that the number of edge line position points in the segments corresponding to the left edge line and the right edge line is the same, and the number is equal to the total number of edge line position points in the segment with more edge line position points.

[0128] In some embodiments, the point where the perpendicular line of the center line at the feature point intersects the left edge line is determined as the edge line feature point on the left edge line, and the point where the perpendicular line of the center line at the feature point intersects the right edge line is determined as the edge line feature point on the right edge line.

[0129] The specific process of the edge line position point alignment method provided in the embodiments of the present disclosure will be described below in conjunction with FIG. 15.

[0130] As shown in FIG. 15, the feature points of the center line are determined, and the perpendicular line perpendicular to the center line at the feature point, the intersection of the perpendicular line and the left edge line and the right edge line is the edge line feature point, and the edge line position points between the edge line feature points determined by the adjacent two feature points are divided into the same segment, such as FIG. 15, segment 1 and segment 2 of the left edge line, and segment 1 and segment 2 of the right edge line.

[0131] Among them, for the segment 1 of the left edge line and the right edge line, the edge line position points in the segments corresponding to the left edge line or the right edge line are sampled according to the distance ratio principle, so that the number of edge line position points in the segments corresponding to the left edge line and the right edge line is the same, and the number is equal to the total number of edge line position points in the segment with more edge line position points. For example, the number of edge line position points in segment 1 of the left edge line is 4, and the number of edge line position points in segment 1 of the right edge line is 2, then according to the 4 edge line position points in segment 1 of the left edge line, 4 edge line position points are sampled in segment 1 of the right edge line according to the distance ratio principle, that is, according to the proportion of the 4 edge line position points in segment 1 of the left edge line in the distance in segment 1 of the left edge line, 4 edge line position points are sampled in segment 1 of the right edge line in proportion, so that segment 1 of the left edge line and segment 1 of the right edge line also include 4 edge line position points.

[0132] For example, the number of edge line position points in segment 2 of the left edge line is 10, and the number of edge line position points in segment 1 of the right edge line is 4, then according to the 10 edge line position points in segment 1 of the left edge line, 10 edge line position points are sampled in segment 1 of the right edge line according to the distance ratio principle, that is, according to the proportion of the 10 edge line position points in segment 1 of the left edge line in the distance in segment 1 of the left edge line, 10 edge line position points are sampled in segment 1 of the right edge line in proportion, so that segment 1 of the left edge line and segment 1 of the right edge line also include 10 edge line position points.

[0133] In summary, the edge line position points of the left edge line and the right edge line can be aligned, and the determined road width is uniform.

[0134] In the embodiments of the present disclosure, the same number of edge line position points are sampled on the left edge line and the right edge line according to different segments, and the distances are in geometric progression, so that the left edge line position points and the right edge line position points can be aligned, and the determined road width is uniform.

[0135] Based on the above method embodiments, the embodiments of the present disclosure also provide a road generation device 1, as shown in FIG. 16, which comprises a data acquisition unit 11, a feature point determination unit 12, a segmentation unit 13, a first processing unit 14 and a second processing unit 15.

[0136] The data acquisition unit 11 is configured to acquire position points of a center line of a road.

[0137] The feature point determination unit 12 is configured to thin out the position points to obtain position points representing the linearity of the center line as feature points.

[0138] The segmentation unit 13 is configured to segment the position points according to the feature points.

[0139] The first processing unit 14 is configured to perform smoothing processing on the position points according to the linearity of a curve constituted by the position points in the same segment to obtain target position points in the segment, and the linearity of a curve constituted by the target position points meets the linearity standard.

[0140] The second processing unit 15 is configured to generate edge line position points of the road according to the target position points and a preset road width.

[0141] In some embodiments, the feature point determination unit 12 is specifically configured to perform Douglas thinning on the position points twice to obtain position points representing the linearity of the center line as feature points, and a first distance threshold used in the first Douglas thinning is smaller than a second distance threshold used in the second Douglas thinning.

[0142] In some embodiments, the position points of the center line are arranged in order of road direction, the feature point determining unit 12 is specifically configured to perform first Douglas thinning on the position points of the center line based on a first distance threshold to obtain the position points as first sampling points; obtain the distances between adjacent two first sampling points, divide the first sampling points with continuous distances less than a preset third distance threshold into a segment, and mark the first sampling points arranged at the first and last positions in the segment as initial feature points; perform second Douglas thinning on the position points as the first sampling points based on a second distance threshold to obtain the position points as second sampling points; and take the initial feature points arranged at the first and last positions between adjacent two second sampling points as feature points representing the linearity of the center line.

[0143] In some embodiments, the first processing unit 14 is specifically configured to determine a line connecting two position points at two ends in the same segment; determine distances from other position points in the segment to the line, and if a maximum one of the distances is less than a segment distance threshold, determine that the linearity of a curve formed by the position points in the segment is an approximate straight line, retain the two position points at the two ends in the segment as target position points in the segment, and delete other position points in the segment; and if the maximum one of the distances is greater than the segment distance threshold, determine that the linearity of the curve formed by the position points in the segment is an arc, perform smoothing processing on the position points in the segment based on a curve fitting algorithm to obtain fitting position points, and if a fitting error of a curve formed by the fitting position points is less than an error threshold, take the fitting position points as the target position points in the segment.

[0144] In some embodiments, the first processing unit 14 is further configured to, if the fitting error of the curve formed by the fitting position points is not less than the error threshold, perform smoothing processing on the position points in the segment by using a Gaussian smoothing algorithm to obtain the target position points in the segment.

[0145] In some embodiments, as shown in FIG. 17, the device further includes an overlap detecting unit 16 and an overlap processing unit 17.

[0146] The overlap detecting unit 16 is configured to detect whether there is an edge line position point causing an edge line to overlap on the same edge line.

[0147] The overlap processing unit 17 is configured to, if there is an edge line position point causing the edge line to overlap, delete the edge line position point causing the edge line to overlap from the edge line position points of the road.

[0148] In some embodiments, the overlap detection unit 16 is specifically configured to segment the edge line position points arranged in sequence on the same edge line; for a segment, determine a line connecting two edge line position points at two ends in the segment; obtain a projection point of an edge line position point in the segment to the line, and a distance from the projection point to a specified edge line position point, the specified edge line position point being any one of the two edge line position points at the two ends in the segment; compare the distances from the projection points of the edge line position points to the specified edge line position point according to the sequence of the edge line position points in the segment, and if a distance from a projection point of a current edge line position point to the specified edge line position point is smaller than a maximum one of the distances from the projection points of the edge line position points that have been compared to the specified edge line position point, determine the current edge line position point as the edge line position point causing the overlap of the edge line.

[0149] In some embodiments, as shown in FIG. 18, the apparatus further comprises a smoothness detection unit 18 and a smoothness processing unit 19.

[0150] The smoothness detection unit 18 is configured to detect whether a curve formed by the target position points in the adjacent two segments is smoothly connected.

[0151] The smoothness processing unit 19 is configured to, if the curve formed by the target position points in the adjacent two segments is not smoothly connected, delete part of the target position points from the two segments, and generate target position points for smoothly connecting the two segments by using a curve fitting algorithm based on the remaining target position points after the part of the target position points are deleted from the adjacent two segments.

[0152] In some embodiments, the smoothness detection unit 18 is specifically configured to, for the adjacent two segments, obtain a first straight line formed by the last two target position points in the former segment, obtain a second straight line formed by the first two target position points in the latter segment; determine an included angle formed by the first straight line and the second straight line, and judge whether the included angle is smaller than a preset included angle threshold; and determine whether the curve formed by the target position points in the adjacent two segments is smoothly connected according to whether the included angle is smaller than the preset included angle threshold.

[0153] In some embodiments, the edge line position points include left edge line position points and right edge line position points, the left edge line position points form a left edge line, and the right edge line position points form a right edge line, as shown in FIG. 19, the apparatus further comprises an edge line feature point determination unit 21, a first segment unit 22, a second segment unit 23, and an edge line position point processing unit 24.

[0154] The edge line feature point determination unit 21 is configured to determine edge line feature points on the left edge line and the right edge line respectively according to the feature points of the center line, the edge line feature points being closest to the feature points.

[0155] The first segment unit 22 is configured to segment the edge line position points on the left edge line by using the edge line feature points of the left edge line.

[0156] The second segment unit 23 is configured to segment the edge line position points on the right edge line by using the edge line feature points of the right edge line.

[0157] The edge line position point processing unit 24 is configured to, for the edge line feature points determined by using the same two feature points, determine the segments corresponding to the left edge line and the segments corresponding to the right edge line, and sample the edge line position points in the segments corresponding to the left edge line or the right edge line according to the equidistance principle, so that the number of the edge line position points in the segments corresponding to the left edge line and the right edge line is the same, and the number is equal to the total number of the edge line position points in the segment with more edge line position points.

[0158] It should be noted that the related descriptions of the functional units and functional modules of the road generation device in the embodiments of the present disclosure can refer to the descriptions in the method embodiments, which will not be repeated here.

[0159] In the embodiments of the present disclosure, the road generation device achieves the same beneficial effects as the road generation method, and specific descriptions can be referred to the related descriptions of the embodiments of the road generation method, which will not be repeated here.

[0160] The present disclosure also provides a storage medium, which includes a stored program, wherein the program controls the device where the storage medium is located to execute the method as described above when the program is running.

[0161] The present disclosure also provides a processor, which is used to run a program, wherein the program executes the method as described above when the program is running.

[0162] The present disclosure also provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the method as described above.

[0163] The present disclosure also provides a terminal device, which includes at least one processor, a memory, the memory is used to store the program executed by the processor and the data required in the process of executing the program by the processor.

[0164] The processor is used to run a program, wherein the program executes the method as described above when the program is running.

[0165] Those skilled in the art will appreciate that embodiments of the disclosure can be supplied as a method, a system, or a computer program product. Thus, the disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the disclosure can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs (Compact Disc Read-Only Memory), optical storage devices, etc.) embodying computer readable program code thereon.

[0166] The disclosure is described in reference to the flowchart and / or block diagrams of the method, apparatus (system) and computer program product according to embodiments of the disclosure. It should be understood that each flow and / or block in the flowchart and / or block diagrams, and a combination of flows and / or blocks in the flowchart and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions, which are executed via the processor of the computer or other programmable data processing apparatus, generate means for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.

[0167] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction means, which implements the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram.

[0169] In a typical configuration, the computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.

[0170] The memory can include non-persistent memory and / or volatile memory, such as a random access memory (RAM) including a belief store, and / or non-volatile memory, such as read-only memory (ROM), EPROM, EEPROM or flash memory. The memory is an example of computer readable media.

[0171] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.

[0172] It is also to be noted that the terms "comprising", "including", and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus including the element.

[0173] Those skilled in the art will appreciate that embodiments of the disclosure can be provided as a method, a system or a computer program product. Accordingly, the disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the disclosure can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code thereon for use by or in connection with an instruction execution system. For the purposes of this description, a computer-usable or computer readable storage medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-usable storage medium can be a computer- readable storage medium that can be any media that can be accessed by the computer. By way of example, and not limitation, such computer- readable media can include RAM, ROM, EEPROM, CD-ROM or other optical storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of computer- readable program code means which can be accessed by the computer. The computer- readable program code can be embodied in any combination of software and firmware.

[0174] The above merely provides embodiments of the disclosure and is not intended to limit the disclosure. The disclosure can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the disclosure shall be included in the scope of claims of the disclosure.

Claims

1. A road generation method in which, The method comprises the following steps: acquiring position points constituting a center line of a road; thinning the position points to obtain position points representing linearity of the center line as feature points; segmenting the position points according to the feature points; smoothing the position points according to linearity of a curve constituted by the position points in a same segment to obtain target position points in the segment, the linearity of the curve constituted by the target position points meeting linearity criteria; generating edge position points of the road according to the target position points and a preset road width.

2. The method of claim 1, wherein, The thinning the position points to obtain position points representing linearity of the center line as feature points specifically comprises: twice Douglas thinning the position points to obtain position points representing linearity of the center line as feature points, a first distance threshold used in the first Douglas thinning being smaller than a second distance threshold used in the second Douglas thinning.

3. The method of claim 2, wherein, The position points of the center line are arranged in sequence according to a road direction, and the twice Douglas thinning the position points to obtain position points representing linearity of the center line as feature points specifically comprises: first Douglas thinning the position points of the center line based on the first distance threshold to obtain position points as first sampling points; acquiring distances between adjacent two first sampling points, and dividing first sampling points with continuous distances smaller than a preset third distance threshold into a segment, and marking first sampling points arranged at the beginning and the end of the segment as initial feature points; second Douglas thinning the position points as first sampling points based on the second distance threshold to obtain position points as second sampling points; marking initial feature points arranged at the beginning and the end between adjacent two second sampling points as feature points representing linearity of the center line.

4. The method of any one of claims 1 to 3, wherein, The smoothing the position points according to linearity of a curve constituted by the position points in a same segment to obtain target position points in the segment comprises: determining a line connecting two position points at both ends of the same segment; determining distances of other position points in the segment to the line, if a largest one of the distances is smaller than a segment distance threshold, determining that linearity of a curve constituted by the position points in the segment is an approximate straight line, retaining the two position points at both ends of the segment as target position points in the segment, and deleting other position points in the segment; if the largest one of the distances is greater than the segment distance threshold, determining that linearity of a curve constituted by the position points in the segment is an arc, and smoothing the position points in the segment based on a curve fitting algorithm to obtain fitting position points, if a fitting error of a curve constituted by the fitting position points is smaller than an error threshold, taking the fitting position points as the target position points in the segment.

5. The method of claim 4, wherein, The method further comprises: if the fitting error of the curve constituted by the fitting position points is not smaller than the error threshold, smoothing the position points in the segment by using a Gaussian smoothing algorithm to obtain the target position points in the segment.

6. The method of any one of claims 1 to 5, wherein, After generating the edge position points of the road, the method further comprises: Detect whether a line position point on the same edge line exists to make the edge line overlap; if so, delete the line position point causing the edge line to overlap from the line position points of the road.

7. The method of claim 6, wherein, The detection whether a line position point on the same edge line exists to make the edge line overlap comprises: Segment the line position points on the same edge line in sequence; For a segment, determine the line connecting the two line position points at the two ends in the segment; Obtain the projection point of the line position point in the segment to the line, and the distance from the projection point to a specified line position point, the specified line position point being any one of the two line position points at the two ends in the segment; Compare the distances from the projection points of the line position points to the specified line position point according to the sequence of the line position points in the segment, if the distance from the projection point of the current line position point to the specified line position point is smaller than the maximum one of the distances from the projection points of the compared line position points to the specified line position point, determine the current line position point as the line position point causing the edge line to overlap.

8. The method of any one of claims 1 to 7, wherein, Before the line position points of the road are generated, the method further comprises: Detect whether a curve formed by target position points in adjacent two segments is smoothly connected, if not, delete part of the target position points from the two segments, and based on the remaining target position points in the two segments after the part of the target position points are deleted, generate target position points for smoothly connecting the two segments by using a curve fitting algorithm.

9. The method of claim 8, wherein, The detection whether a curve formed by target position points in adjacent two segments is smoothly connected comprises: For the adjacent two segments, obtain a first straight line formed by the last two target position points in the former segment, and obtain a second straight line formed by the first two target position points in the latter segment; Determine an included angle formed by the first straight line and the second straight line, and determine whether the included angle is smaller than a preset included angle threshold, to determine whether the curve formed by the target position points in the adjacent two segments is smoothly connected.

10. The method of any one of claims 1 to 9, wherein, The line position points comprise left edge line position points and right edge line position points, the left edge line position points form a left edge line, and the right edge line position points form a right edge line, the method further comprises: Determine edge line feature points on the left edge line and the right edge line respectively according to feature points of the center line, the edge line feature points being closest to the feature points; Segment the line position points on the left edge line by using the edge line feature points of the left edge line; Segment the line position points on the right edge line by using the edge line feature points of the right edge line; According to the distance proportionality principle, sample the line position points in the segments corresponding to the left edge line or the right edge line, so that the number of the line position points in the segments corresponding to the left edge line and the right edge line is the same, and the number is equal to the total number of the line position points in the segment with more line position points.

11. A road generating apparatus, wherein, Comprise: a data acquisition unit configured to acquire position points of a center line of a road; a feature point determination unit configured to thin out the position points to obtain position points representing line shapes of the center line as feature points; a segmenting unit, configured to segment the position points according to the feature points; a first processing unit, configured to perform smoothing processing on the position points according to linearity of a curve formed by the position points in a same segment, to obtain target position points in the segment, and the linearity of the curve formed by the target position points meets a linearity criterion; a second processing unit, configured to generate edge position points of the road according to the target position points and a preset road width.

12. A terminal device, wherein, comprising at least one processor, a memory; the memory is configured to store programs executed by the processor and data required in a process in which the processor executes the programs; the processor is configured to run programs, and the programs perform the method in any one of claims 1-10 when running.

13. A computer program product, wherein, a computer program, which, when executed by a processor, performs the method in any one of claims 1-10.

14. A storage medium, wherein, the storage medium comprises a stored program, and the program controls a device in which the storage medium is located to perform the method in any one of claims 1-10 when running.

Citation Information

Patent Citations

  • Road data generating method and device

    CN109270927A

  • High-precision map construction method

    CN114092658A

  • Lane surface generation method and device, equipment and medium

    CN118096934A