Lane line curvature detection method, device and equipment and storage medium
By determining the pending points in a high-precision map and performing curve fitting and adjustment, the accuracy of lane line curvature calculation is solved, and higher curvature calculation accuracy and automation are achieved.
Patent Information
- Application Number
- CN202310796421.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing high-precision map, the lane line curvature calculation has a large difference between the actual lane curvature due to the few sampling points, and the lane shape jitter causes too large curvature differences, which makes the algorithm insufficient accuracy.
By determining the pending points in the target lane line, performing curve fitting and adjustments, a target fitting curve is generated to calculate the curvature of the lane line, and improving the accuracy of curvature calculation.
The automation and accuracy of lane line curvature calculation is achieved, reducing the error of curvature calculation and improving the accurate reflection of lane shape.
Smart Images

Figure CN119228716A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of map data, and in particular to a lane line curvature detection method, device, equipment and storage medium. Background Art
[0002] In the field of autonomous driving, in order to accurately control vehicle driving, it is often necessary to draw high-precision maps. In the process of drawing high-precision maps, lane linear point data of the road surface is required to provide lane-level driving guidance to the autonomous driving vehicle.
[0003] The high-precision map currently generated is obtained by obtaining the original data of the lane line and calculating the curvature of the lane line. However, due to the small number of sampling points, the calculated value cannot accurately reflect the trend of the lane and is quite different from the actual lane curvature value. Furthermore, the shape of the lane is inevitably jittered during collection, and this algorithm will cause the curvature difference between adjacent lanes to be particularly large. Summary of the invention
[0004] The present invention provides a lane line curvature detection method, device, equipment and storage medium to realize the automation of curvature calculation and improve the accuracy of curvature calculation.
[0005] According to one aspect of the present invention, a lane curvature detection method is provided, the method comprising:
[0006] Determine a point to be processed in the target lane line; wherein the point to be processed includes a target detection point and an adjacent detection point corresponding to the target detection point;
[0007] Performing curve fitting on the points to be processed to obtain an initial fitting curve;
[0008] According to the position distribution of the points to be processed, the initial fitting curve is adjusted to obtain a target fitting curve;
[0009] The curvature of the target detection point is determined according to the target fitting curve.
[0010] According to another aspect of the present invention, a lane curvature detection device is provided, the device comprising:
[0011] A to-be-processed point determination module is used to determine the to-be-processed points in the target lane line; wherein the to-be-processed points include the target detection points and the adjacent detection points corresponding to the target detection points;
[0012] A curve fitting module, used for performing curve fitting on the points to be processed to obtain an initial fitting curve;
[0013] A curve adjustment module, used to adjust the initial fitting curve according to the position distribution of the points to be processed to obtain a target fitting curve;
[0014] The curvature determination module is used to determine the curvature of the target detection point according to the target fitting curve.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute any lane curvature detection method provided in the embodiments of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any lane curvature detection method provided by an embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention is to determine the points to be processed in the target lane line; wherein the points to be processed include the target detection points and the adjacent detection points corresponding to the target detection points; curve fitting is performed on the points to be processed to obtain an initial fitting curve; the initial fitting curve is adjusted according to the position distribution of the points to be processed to obtain a target fitting curve; and the curvature of the target detection points is determined according to the target fitting curve. The above technical solution, by introducing the position distribution of the points to be processed, adjusts the initial fitting curve, and determines the curvature of the target detection points based on the target fitting curve, improves the accuracy of the curvature calculation while realizing the automation of the curvature calculation.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1a is a flow chart of a lane curvature detection method provided according to Embodiment 1 of the present invention;
[0024] Figure 1b is a schematic diagram of the structure of an initial fitting curve provided according to the first embodiment of the present invention;
[0025] Figure 1c is a schematic diagram of a target fitting curve provided according to the first embodiment of the present invention;
[0026] Figure 2 is a flow chart of a lane curvature detection method provided according to Embodiment 2 of the present invention;
[0027] Figure 3 is a flow chart of a lane curvature detection method provided according to Embodiment 3 of the present invention;
[0028] Figure 4 is a schematic structural diagram of a lane curvature detection device provided in a fourth embodiment of the present invention;
[0029] Figure 5 It is a structural schematic diagram of an electronic device for implementing the lane line curvature detection method of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] In addition, it should be noted that the collection, storage, use, processing, transmission, provision and disclosure of coordinates involved in the technical solution of the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0033] Embodiment 1
[0034] FIG1 is a flow chart of a lane curvature detection method provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of automatic determination of lane curvature. The method can be executed by a lane curvature detection device. The lane curvature detection device can be implemented in the form of hardware and / or software. The lane curvature detection device can be configured in a computing device. As shown in FIG1 , the method includes:
[0035] S110, determining a point to be processed in a target lane line; wherein the point to be processed includes a target detection point and adjacent detection points corresponding to the target detection point.
[0036] Lane lines refer to dashed or solid lines that separate different driving lanes. In the embodiment of the present invention, lane lines specifically refer to lane lines displayed on a map. Points to be processed refer to marked points selected on the target lane line for calculating curvature.
[0037] Optionally, the processing points of the target lane line can be directly determined in the rectangular coordinate system. Alternatively, the candidate processing points in the wgs84 (World Geodetic System) coordinate system are obtained, and the candidate processing points in the wgs84 coordinate system are converted into coordinate points in the rectangular coordinate system, and the converted coordinate points are used as the processing points.
[0038] Among them, the target detection point refers to the marking point that actually needs to be calculated for curvature; the neighboring detection point refers to the marking point that is on the same lane line as the target detection point and is used to assist in the curvature calculation of the target detection point. Optionally, a preset number of coordinate points can be selected in the extension direction of the target lane line as neighboring detection points. Exemplarily, 6 coordinate points can be taken in front and behind the target detection point as neighboring detection points. It should be noted that the preset number can be manually controlled according to the specific situation, and the preset numbers corresponding to different extension directions can be the same or different, and the embodiments of the present invention do not impose any limitation on this.
[0039] S120, performing curve fitting on the points to be processed to obtain an initial fitting curve.
[0040] Among them, curve fitting refers to a data processing method that uses a continuous curve to approximately characterize or compare the functional relationship between coordinates represented by a discrete point group.
[0041] For example, the target detection point is determined in the rectangular coordinate system, and the coordinates are (669464.7096523808, 3280056.0835828274, 0). According to the direction and shape of the lane line, 6 points are taken from the front and back of the point, and the set of point shapes is as follows: {(669469.5120692729, 3280026.6690122862, 0), 669469.339867913 4,3280031.654838499,0),(669468.8788866494,3280036.525445849,0),(669468.1257755153,3280041.5024916697,0),(669467.2775217805,3280046.3672454846,0),(669466.1388 139412,3280051.227609178,0),(669464.7096523808,3280056.0835828274,0),(669463.1853488985,3280060.827264598,0),(669461.469085483,3280065.4571911683,0),(669459. 5591872295,3280070.084191277,0),(669457.5541474912,3280074.598899678,0),(66945 5.6442521561,3280079.2259003613,0),(669453.2536186731,3280083.6239275234,0)};Reference Figure 1b , and an initial fitting curve is formed based on this set.
[0042] S130: adjusting the initial fitting curve according to the position distribution of the points to be processed to obtain a target fitting curve.
[0043] Since the points to be processed are selected based on the extension of the lane line, it is not considered whether the coordinates of the selected points to be processed corresponding to the rectangular coordinate system are convenient for calculating the curvature. Therefore, the initial fitting curve needs to be adjusted so that the curvature can be calculated according to the fitting curve, avoiding the situation where the curvature calculation error is large due to the unreasonable distribution of the fitting curve. Among them, the adjustment of the initial fitting curve includes at least one of clockwise rotation, counterclockwise rotation, and symmetric exchange, etc., and the embodiment of the present invention does not impose any limitation on this.
[0044] Exemplary, reference Figure 1c, rotate the initial fitting curve counterclockwise to obtain the target fitting curve, and the coordinates of the rotated curve are: {(2970267.369321308,-1544110.1423691185,0),(2970272.2109009703,-1544111.3453748156,0),(2970277.0209566588,-1 544112.239066015,0),(2970282.0135509735,-1544112.8810656194,0),(2970286.9242829583,-1544113.400753458,0),(2970291.910522126,-1544113.6399390234,0),(2 970296.9722684463,-1544113.5986227056,0),(2970301.9521523733,-1544113.4349953094,0),(2970306.8753430108,-1544113.0555561148,0),(2970311.8488717075,-1 544112.489116667,0),(2970316.7405380546,-1544111.8003666087,0),(2970321.714066503,-1544111.2339301251,0),(2970326.5993777458,-1544110.1423691183,0)}.
[0045] S140: Determine the curvature of the target detection point according to the target fitting curve.
[0046] Optionally, the rotated curve is fitted with a cubic polynomial and the curve equation is calculated. According to the curve equation and the curvature calculation formula, the curvature of the current point is calculated. Optionally, the curve equation can be calculated using the algorithm library in Python, by fitting the curve using fit = numpy.polyfit (x_list, y_list, 3), and calculating the curve equation using poly = numpy.poly1d (fit). Where x_list is the set of all x coordinates on the curve, y_list is the set of all y coordinates on the curve, and 3 means a cubic polynomial is fitted.
[0047] Exemplary, reference Figure 1c , the target fitting curve is fitted with a cubic polynomial according to the Python algorithm library and the curve equation is calculated. The obtained curve equation is: y = 6.591 × 10 -10 x3 -0.001958x 2 -5815x+1.727×10 10 , then the first-order derivative of the curve equation is: y'=1.977×10 -9 x 2 -0.003915x–5815; the second-order derivative is: y”=3.954×10 -9 x-0.003915; further, according to the curvature calculation formula: k = y" / [(1+(y') 2 ) (3 / 2) ], put the first-order derivative, second-order derivative and the x value of the current point (2970296.9722684463) into the calculation formula, and get the curvature value of the current point: 0.00783.
[0048] The technical solution of the embodiment of the present invention is to determine the points to be processed in the target lane line; wherein the points to be processed include the target detection points and the adjacent detection points corresponding to the target detection points; curve fitting is performed on the points to be processed to obtain an initial fitting curve; the initial fitting curve is adjusted according to the position distribution of the points to be processed to obtain a target fitting curve; and the curvature of the target detection points is determined according to the target fitting curve. By introducing the position distribution of the points to be processed, the initial fitting curve is adjusted, and the curvature of the target detection points is determined based on the target fitting curve, the accuracy of the curvature calculation is improved while realizing the automation of the curvature calculation.
[0049] Since neighboring detection points are used to assist the target detection points in calculating the curvature, if the number of selected neighboring detection points is small, the generated fitting curve may not be smooth enough, resulting in a large error in the calculated curvature. Therefore, the determination of neighboring detection points needs to consider whether the generated fitting curve is suitable for curvature calculation.
[0050] Optionally, the neighboring detection points corresponding to the target detection point can be determined in the following manner: along the extension direction of the lane line, select at least one point from the target lane line that is adjacent to the position of the point to be processed as the initial point; select at least two reference points from the initial point according to the position change amplitude of each initial point and the target detection point; select points between different reference points from the target lane line as supplementary points; generate neighboring detection points including the initial point and the supplementary points. By filling the supplementary points, the generated fitting curve is more consistent with the curvature calculation, thereby improving the accuracy of the curvature calculation.
[0051] Optionally, two consecutive points to be processed are connected to form a straight line to be processed; the angle between the straight line to be processed and the preset direction is determined; and the amplitude of the position change of the point to be processed is determined according to the angle. Specifically, if the angle is greater than the preset angle threshold, the amplitude of the position change is large, and a supplementary point is added between the two consecutive points to be processed; if the angle is not greater than the preset angle threshold, the amplitude of the position change is normal, and there is no need to add a supplementary point between the two consecutive points to be processed. Among them, the preset direction is manually determined according to the actual situation, and can be the north direction, and the preset angle threshold is determined according to human experience, and the embodiment of the present invention does not impose any limitation on this.
[0052] Alternatively, the position change amplitude of the point to be processed can also be determined by the slope of the straight line formed by the two points, including: connecting two consecutive points to be processed respectively to form a straight line to be processed; determining the slope of the straight line to be processed according to the coordinates of the two consecutive points to be processed; and determining the position change amplitude of the point to be processed according to the slope. Specifically, if the slope is greater than a preset slope threshold, the position change amplitude is large, and a supplementary point is added between the two consecutive points to be processed; if the slope is not greater than the preset slope threshold, the position change amplitude is normal, and there is no need to add a supplementary point between the two consecutive points to be processed. Among them, the preset slope threshold is determined based on human experience, and the embodiments of the present invention do not impose any limitation on this.
[0053] After determining the points to be processed, if the change trends between the points to be processed are different, the generated fitting curve will not be able to well reflect the relative position of each point to be processed, affecting the accuracy of the curvature calculation result. In order to overcome the above problem, the points to be processed can be grouped according to the amplitude of the position change of the points to be processed in the rectangular coordinate system; wherein the positions of the points to be processed in the same group are adjacent; the points to be processed in the same group are curve fitted to obtain the initial fitting curve of the corresponding group. The advantage of this is that when the position change trends of the points to be processed are different, the groups are interrupted and the curves are fitted separately, which improves the fit between the fitted curve and the points to be processed, thereby improving the accuracy of the curvature calculation.
[0054] Optionally, the position change amplitude of the processing points in the rectangular coordinate system can be determined and grouped in the following ways, including: performing curve fitting on the processing points to obtain a reference fitting curve, and grouping the processing points according to the deviation of the processing points relative to the reference fitting curve; or, determining a reference angle between adjacent processing points and a preset direction, and grouping the processing points according to the reference angle.
[0055] Exemplarily, the deviation can be determined based on the variance of the processing point relative to the reference fitting curve; let the variance of the processing point be a, and the preset variance threshold be N. If a is greater than N, the processing point deviates from the reference fitting curve, and the grouping needs to be interrupted at the processing point; conversely, if a is not greater than N, the processing point conforms to the reference fitting curve, and the grouping does not need to be interrupted at this point. Among them, the preset variance threshold is determined based on human experience, and the embodiment of the present invention does not impose any limitation on this.
[0056] After the points to be processed are interrupted and grouped, the number of points to be processed after grouping may be small, and the curve fitting cannot be realized, which affects the accurate calculation of the curvature. In order to overcome the above problems, optionally, after the points to be processed are grouped, the number of points to be processed in the same group can also be determined. If the preset number is not met, it is necessary to add supplementary points between the points to be processed in the same group, and curve fitting is performed on the points to be processed and the supplementary points in the same group to obtain the initial fitting curve of the corresponding group; if the preset number is met, the curve fitting is directly performed on the points to be processed in the same group to obtain the initial fitting curve of the corresponding group. Among them, the preset number is determined based on human experience, and the embodiment of the present invention does not impose any limitation on this. By determining the number of points to be processed in the same group after interrupting the grouping, the problem of being unable to realize the curve fitting due to the small number of points to be processed in the same group caused by interrupting the grouping is avoided, and the smoothness of the initial fitting curve is ensured, thereby improving the accuracy of the curvature.
[0057] Embodiment 2
[0058] Figure 2 This is a flow chart of a lane curvature detection method provided in the second embodiment of the present invention. Based on the technical solutions of the above embodiments, this embodiment refines "according to the position distribution of the points to be processed, the initial fitting curve is adjusted to obtain the target fitting curve" as "according to the position distribution of the points to be processed, the distribution intervals of the points to be processed on different coordinate axes in a rectangular coordinate system are determined; according to the interval length of each distribution interval, the initial fitting curve is adjusted to obtain the target fitting curve". It should be noted that for the parts not described in detail in the embodiments of the present invention, please refer to the relevant descriptions of other embodiments. Figure 2 As shown, the method includes:
[0059] S210, determining a point to be processed in a target lane line; wherein the point to be processed includes a target detection point and adjacent detection points corresponding to the target detection point.
[0060] S220, performing curve fitting on the points to be processed to obtain an initial fitting curve.
[0061] S230. Determine distribution intervals of the points to be processed on different coordinate axes in a rectangular coordinate system according to position distribution of the points to be processed on different coordinate axes in a rectangular coordinate system.
[0062] Among them, different coordinate axes refer to the horizontal axis and vertical axis in the rectangular coordinate system; the distribution interval refers to the coordinate distribution range of the points to be processed on different coordinate axes in the rectangular coordinate system. For example, the coordinates corresponding to the first and last points of the initial fitting curve are (5,4) and (7,7), respectively. Then, the distribution interval of the points to be processed on the horizontal axis of the rectangular coordinate system is [5,7], and the distribution interval on the vertical axis is [4,7].
[0063] S240: Adjust the initial fitting curve according to the interval length of each distribution interval to obtain the target fitting curve.
[0064] Among them, the interval length is used to characterize the size of the coordinate distribution range of the distribution interval. For example, the coordinates corresponding to the first and last points of the initial fitting curve are (5,4) and (7,7), respectively. Then, the interval length of the distribution interval of the point to be processed on the horizontal axis of the rectangular coordinate system is 2, and the interval length of the distribution interval on the vertical axis is 3.
[0065] Adjusting the initial fitting curve by the interval length helps to improve the accuracy of the curvature calculation results.
[0066] Among them, the preset horizontal axis is the expected horizontal axis of the target fitting curve, which can be determined according to the actual situation of each distribution interval, and is usually specified as the coordinate axis corresponding to the distribution interval with a larger interval length. If the actual coordinate axis with a larger interval length of the distribution interval is different from the preset horizontal axis, the initial fitting curve is rotated to obtain the target fitting curve; if the interval lengths of the distribution intervals are the same, the initial fitting curve is no longer adjusted.
[0067] Exemplarily, two points (e.g., the first and last points) of the initial fitting curve are taken, the difference dx of the horizontal axis coordinates of the two points and the difference dy of the vertical axis coordinates of the two points are calculated, and the size of dx and dy is determined. Where dx represents the interval length of the distribution interval of the points to be processed on the horizontal axis of the rectangular coordinate system, and dy represents the interval length of the distribution interval of the points to be processed on the vertical axis of the rectangular coordinate system. If dx is not less than dy, the initial fitting curve is no longer adjusted, and the initial fitting curve is directly used as the target fitting curve; if dx is less than dy, the initial fitting curve is rotated and adjusted until dx is not less than dy, and the adjusted initial fitting curve is used as the target fitting curve.
[0068] When rotating and adjusting the initial fitting curve, if it is randomly rotated clockwise or counterclockwise, the curve rotation operation will be too cumbersome, affecting the efficiency of determining the target fitting curve. Therefore, the rotation angle value can be introduced to accurately control the curve rotation process to improve the efficiency of determining the target fitting curve.
[0069] Optionally, two reference points are selected from the points to be processed; a rotation angle is determined according to the angle between the reference point and the preset direction; and the initial fitting curve is rotated according to the rotation angle to obtain a target fitting curve. The preset direction is determined based on human experience and may be the true north direction, which is not limited in any way in the embodiments of the present invention.
[0070] For example, two reference points a and b are selected from the points to be processed. Reference points a and b can form a straight line segment l. The preset direction is due north, and the angle between the straight line segment l and the preset direction is ∠α. The initial fitting curve is directly rotated according to ∠α so that the coordinate axis corresponding to the distribution interval with a larger interval length after rotation matches the preset horizontal axis.
[0071] In a specific implementation, if ∠α is not greater than 90°, the initial fitting curve is rotated counterclockwise until the coordinate axis corresponding to the distribution interval with a larger interval length after the rotation matches the preset horizontal axis (that is, the horizontal axis coordinate difference between the first and last points of the fitting curve is greater than the vertical axis coordinate difference); if ∠α is greater than 90°, the initial fitting curve is rotated clockwise until the coordinate axis corresponding to the distribution interval with a larger interval length after the rotation matches the preset horizontal axis (that is, the horizontal axis coordinate difference between the first and last points of the fitting curve is greater than the vertical axis coordinate difference).
[0072] Due to the random selection of reference points, it may be necessary to repeatedly determine the rotation angle, resulting in cumbersome steps for the rotation processing of the initial fitting curve, which reduces the efficiency of determining the target fitting curve. Optionally, two points to be processed located at the endpoints of the initial fitting curve are selected as reference points. The above technical solution takes the points to be processed at the endpoints of the initial fitting curve as reference points, which can take into account the distribution range of the entire initial fitting curve, improve the accuracy of determining the rotation angle, and improve the efficiency of determining the target fitting curve.
[0073] S250: Determine the curvature of the target detection point according to the target fitting curve.
[0074] The technical solution of the embodiment of the present invention determines the points to be processed in the target lane line; performs curve fitting on the points to be processed to obtain an initial fitting curve; determines the distribution intervals of the points to be processed on different coordinate axes in a rectangular coordinate system according to the position distribution of the points to be processed; adjusts the initial fitting curve according to the interval lengths of each distribution interval to obtain a target fitting curve; and determines the curvature of the target detection point according to the target fitting curve. The initial fitting curve is adjusted by the interval lengths of the distribution intervals of the points to be processed on different coordinate axes in a rectangular coordinate system, thereby avoiding the problem of large curvature calculation errors introduced by the presentation position of the fitting curve and improving the accuracy of the curvature calculation results.
[0075] Embodiment 3
[0076] Figure 3 This is a flowchart of a lane curvature detection method provided in Example 3 of the present invention. Based on the technical solutions of the above-mentioned embodiments, this embodiment refines "according to the position distribution of the points to be processed, the initial fitting curve is adjusted to obtain a target fitting curve" as "according to the position distribution of the points to be processed on a preset horizontal axis in a rectangular coordinate system, the position change trend of the points to be processed is determined; according to the position change trend, the initial fitting curve is adjusted to obtain the target fitting curve". It should be noted that for the parts not described in detail in the embodiments of the present invention, please refer to the relevant descriptions of other embodiments. Figure 3 As shown, the method includes:
[0077] S310, determining a point to be processed in a target lane line; wherein the point to be processed includes a target detection point and an adjacent detection point corresponding to the target detection point.
[0078] S320, performing curve fitting on the points to be processed to obtain an initial fitting curve.
[0079] S330. Determine, according to the position distribution of the points to be processed, a position change trend of a preset horizontal axis of the points to be processed in a rectangular coordinate system.
[0080] The position change trend is used to characterize the change trend of the coordinate size of the processing point, and the position change trend is increasing, decreasing or unchanged. For example, if there are two processing points A and B, and the coordinates of point A and point B are (3,4) and (2,5) respectively, then the position change trend of the processing point is: the horizontal coordinate decreases, and the vertical coordinate increases.
[0081] S340: Adjust the initial fitting curve according to the position change trend to obtain the target fitting curve.
[0082] The initial fitting curve is adjusted according to the position change trend. The position change trend of the preset horizontal axis of the curve coordinate after adjustment is in line with expectations, avoiding the curvature calculation error introduced by the position change trend, thereby improving the accuracy of the curvature calculation result.
[0083] Optionally, if the position change trend is a decreasing trend, the initial fitting curve is rotated to obtain a target fitting curve; if the position change trend is a constant or increasing trend, the initial fitting curve is no longer rotated.
[0084] Taking the horizontal coordinate change trend of the processing point in the rectangular coordinate system as an example, the horizontal coordinate of the first point of the curve is taken as a, and the horizontal coordinate of the last point is taken as b, and the size relationship between a and b is determined; if a is less than b, the position change trend of the processing point is increasing, and the initial fitting curve is no longer rotated; if a is equal to b, the position change trend of the processing point is unchanged, and the initial fitting curve is no longer rotated; if a is greater than b, the position change trend of the processing point is decreasing, and the initial fitting curve needs to be rotated.
[0085] S350: Determine the curvature of the target detection point according to the target fitting curve.
[0086] The technical solution of the embodiment of the present invention determines the points to be processed in the target lane line; performs curve fitting on the points to be processed to obtain an initial fitting curve; determines the position change trend of the preset horizontal axis of the points to be processed in the rectangular coordinate system according to the position distribution of the points to be processed; adjusts the initial fitting curve according to the position change trend to obtain the target fitting curve; determines the curvature of the target detection point according to the target fitting curve. The above technical solution adjusts the initial fitting curve according to the position change trend of the points to be processed, so that the position change trend of the preset horizontal axis of the curve coordinates after adjustment meets expectations, avoids the curvature calculation error introduced by the position change trend, and thus improves the accuracy of the curvature calculation result.
[0087] Optionally, the distribution intervals of the points to be processed on different coordinate axes in the rectangular coordinate system and the position change trend of the points to be processed on the preset horizontal axis in the rectangular coordinate system can be determined respectively according to the position distribution of the points to be processed; the initial fitting curve is adjusted according to the interval length of each distribution interval and the position change trend of the points to be processed to obtain the target fitting curve. Specifically, the initial fitting curve is no longer rotated only when the coordinate axis corresponding to the distribution interval with a larger interval length matches the preset horizontal axis and the position change trend of the points to be processed is increasing or unchanged.
[0088] In a specific implementation, the initial fitting curve can also be adjusted by considering the interval length of each distribution interval and the position change trend of the point to be processed at the same time. The adjusted curve coordinates are more consistent with the curve equation and the calculation of the curve curvature, further improving the accuracy of the curvature calculation results.
[0089] Embodiment 4
[0090] Figure 4 A schematic diagram of the structure of a lane curvature detection device provided in Embodiment 3 of the present invention.
[0091] like Figure 4 As shown, the device comprises:
[0092] The to-be-processed point determination module 410 is used to determine the to-be-processed points in the target lane line; wherein the to-be-processed points include the target detection points and the adjacent detection points corresponding to the target detection points.
[0093] The curve fitting module 420 is used to perform curve fitting on the points to be processed to obtain an initial fitting curve.
[0094] The curve adjustment module 430 is used to adjust the initial fitting curve according to the position distribution of the points to be processed to obtain a target fitting curve.
[0095] The curvature determination module 440 is used to determine the curvature of the target detection point according to the target fitting curve.
[0096] The technical solution of the embodiment of the present invention is to determine the points to be processed in the target lane line; wherein the points to be processed include the target detection points and the adjacent detection points corresponding to the target detection points; curve fitting is performed on the points to be processed to obtain an initial fitting curve; the initial fitting curve is adjusted according to the position distribution of the points to be processed to obtain a target fitting curve; and the curvature of the target detection points is determined according to the target fitting curve. By introducing the position distribution of the points to be processed, the initial fitting curve is adjusted, and the curvature of the target detection points is determined based on the target fitting curve, the accuracy of the curvature calculation is improved while realizing the automation of the curvature calculation.
[0097] Optionally, the curve adjustment module 430 includes:
[0098] The interval determination unit is used to determine the distribution interval of the points to be processed on different coordinate axes in the rectangular coordinate system according to the position distribution of the points to be processed on different coordinate axes in the rectangular coordinate system.
[0099] The curve adjustment unit is used to adjust the initial fitting curve according to the interval length of each distribution interval to obtain the target fitting curve.
[0100] Optionally, a curve adjustment unit is used to:
[0101] If the coordinate axis corresponding to the distribution interval with a larger interval length does not match the preset horizontal axis, the initial fitting curve is rotated to obtain the target fitting curve.
[0102] Optionally, a curve adjustment unit is used to:
[0103] Two reference points are selected from the points to be processed; a rotation angle is determined according to an angle between the reference point and a preset direction; and the initial fitting curve is rotated according to the rotation angle to obtain the target fitting curve.
[0104] Wherein, the curve adjustment unit, when selecting two reference points from the points to be processed, is specifically used for:
[0105] Two points to be processed located at the end points of the initial fitting curve are selected as the reference points.
[0106] Optionally, the curve adjustment module 430 includes:
[0107] A trend determination unit is used to determine the position change trend of the points to be processed according to the position distribution of the points to be processed.
[0108] The curve determination unit is used to adjust the initial fitting curve according to the position change trend to obtain the target fitting curve.
[0109] Optionally, the curve determination unit is specifically used for:
[0110] If the position change trend is a decreasing trend, the initial fitting curve is rotated to obtain the target fitting curve.
[0111] Optionally, the device further comprises:
[0112] A detection point determination module, which includes:
[0113] The initial point determination unit is used to select at least one point adjacent to the position of the to-be-processed point from the target lane line along the extension direction of the lane line as the initial point.
[0114] The reference point determination unit is used to select at least two reference points from the initial points according to the position change amplitude of each of the initial points and the target detection point.
[0115] The supplementary point determination unit is used to select points between different reference points from the target lane line as supplementary points.
[0116] The detection point generating unit is used to generate adjacent detection points including the initial point and the supplementary point.
[0117] Optionally, the curve fitting module 420 includes:
[0118] The to-be-processed point grouping unit is used to group the to-be-processed points according to the position change amplitude of the to-be-processed points in a rectangular coordinate system; wherein the positions of the to-be-processed points in the same group are adjacent.
[0119] The curve fitting unit is used to perform curve fitting on the points to be processed in the same group to obtain an initial fitting curve of the corresponding group.
[0120] Optionally, the to-be-processed point grouping unit is specifically used for:
[0121] Perform curve fitting on the points to be processed to obtain a reference fitting curve, and group the points to be processed according to the deviation of the points to be processed from the reference fitting curve; or determine a reference angle between adjacent points to be processed and a preset direction, and group the points to be processed according to the reference angle.
[0122] The lane line curvature detection device provided in the embodiment of the present invention can execute each lane line curvature detection method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing each lane line curvature detection method.
[0123] Embodiment 5
[0124] Figure 5 A schematic diagram of an electronic device 510 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0125] like Figure 5As shown, the electronic device 510 includes at least one processor 511, and a memory connected to the at least one processor 511 in communication, such as a read-only memory (ROM) 512, a random access memory (RAM) 513, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 511 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 512 or the computer program loaded from the storage unit 518 to the random access memory (RAM) 513. In the RAM 513, various programs and data required for the operation of the electronic device 510 can also be stored. The processor 511, the ROM 512, and the RAM 513 are connected to each other via a bus 514. An input / output (I / O) interface 515 is also connected to the bus 514.
[0126] A number of components in the electronic device 510 are connected to the I / O interface 515, including: an input unit 516, such as a keyboard, a mouse, etc.; an output unit 517, such as various types of displays, speakers, etc.; a storage unit 518, such as a disk, an optical disk, etc.; and a communication unit 519, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 519 allows the electronic device 510 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0127] The processor 511 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 511 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 511 executes the various methods and processes described above, such as the method of lane curvature detection.
[0128] In some embodiments, the method algorithm environment loading can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 518. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 510 via the ROM 512 and / or the communication unit 519. When the computer program is loaded into the RAM 513 and executed by the processor 511, one or more steps of the method algorithm environment loading described above can be performed. Alternatively, in other embodiments, the processor 511 can be configured to perform the method lane curvature detection in any other appropriate manner (e.g., by means of firmware).
[0129] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0130] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0131] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0133] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0134] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0135] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A lane curvature detection method, characterized in that: include: Determine a point to be processed in the target lane line; wherein the point to be processed includes a target detection point and an adjacent detection point corresponding to the target detection point; Performing curve fitting on the points to be processed to obtain an initial fitting curve; According to the position distribution of the points to be processed, the initial fitting curve is adjusted to obtain a target fitting curve; The curvature of the target detection point is determined according to the target fitting curve.
2. The method according to claim 1, characterized in that The step of adjusting the initial fitting curve according to the position distribution of the points to be processed to obtain a target fitting curve includes: According to the position distribution of the points to be processed, determining the distribution intervals of the points to be processed on different coordinate axes in a rectangular coordinate system; The initial fitting curve is adjusted according to the interval length of each distribution interval to obtain the target fitting curve.
3. The method according to claim 2, characterized in that The adjusting the initial fitting curve according to the interval lengths of each distribution interval to obtain the target fitting curve includes: If the coordinate axis corresponding to the distribution interval with a larger interval length does not match the preset horizontal axis, the initial fitting curve is rotated to obtain the target fitting curve.
4. The method according to claim 3, characterized in that The step of rotating the initial fitting curve to obtain the target fitting curve includes: Select two reference points from the points to be processed; Determine the rotation angle according to the angle between the reference point and the preset direction; The initial fitting curve is rotated according to the rotation angle to obtain the target fitting curve.
5. The method according to claim 4, characterized in that The selecting two reference points from the points to be processed comprises: Two points to be processed located at the end points of the initial fitting curve are selected as the reference points.
6. The method according to any one of claims 1 to 5, characterized in that: The step of adjusting the initial fitting curve according to the position distribution of the points to be processed to obtain a target fitting curve includes: Determine, according to the position distribution of the to-be-processed points, the position change trend of the to-be-processed points on a preset horizontal axis in a rectangular coordinate system; According to the position change trend, the initial fitting curve is adjusted to obtain the target fitting curve.
7. The method according to claim 6, characterized in that The adjusting the initial fitting curve according to the position change trend to obtain the target fitting curve includes: If the position change trend is a decreasing trend, the initial fitting curve is rotated to obtain the target fitting curve.
8. The method according to any one of claims 1 to 5, characterized in that: The adjacent detection points corresponding to the target detection point are determined in the following manner: Along the extension direction of the lane line, select at least one point adjacent to the position of the to-be-processed point from the target lane line as the initial point; Selecting at least two reference points from the initial points according to the position change amplitudes of the initial points and the target detection points; Selecting points between different reference points from the target lane line as supplementary points; A neighboring detection point including the initial point and the supplementary point is generated.
9. The method according to any one of claims 1 to 5, characterized in that: The performing curve fitting on the points to be processed to obtain an initial fitting curve comprises: The points to be processed are grouped according to the position change amplitude of the points to be processed in the rectangular coordinate system; wherein the positions of the points to be processed in the same group are adjacent; Curve fitting is performed on the points to be processed in the same group to obtain the initial fitting curve of the corresponding group.
10. The method according to claim 9, characterized in that The step of grouping the points to be processed according to the position change amplitude of the points to be processed in the rectangular coordinate system comprises: Performing curve fitting on the points to be processed to obtain a reference fitting curve, and grouping the points to be processed according to the deviation of the points to be processed from the reference fitting curve; or, A reference angle between adjacent points to be processed and a preset direction is determined, and the points to be processed are grouped according to the reference angle.
11. A lane curvature detection device, characterized in that: include: A to-be-processed point determination module is used to determine the to-be-processed points in the target lane line; wherein the to-be-processed points include the target detection points and the adjacent detection points corresponding to the target detection points; A curve fitting module, used for performing curve fitting on the points to be processed to obtain an initial fitting curve; A curve adjustment module, used to adjust the initial fitting curve according to the position distribution of the points to be processed to obtain a target fitting curve; The curvature determination module is used to determine the curvature of the target detection point according to the target fitting curve.
12. An electronic device, characterized in that: include: one or more processors; A memory 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 a lane curvature detection method as described in any one of claims 1-10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a lane curvature detection method as described in any one of claims 1 to 10 is implemented.
