Road line acquisition method, device, equipment and medium
By adopting iterative processing based on discrete sampling points and monotonic interval selection technology in the route acquisition method, the problem of low accuracy in road acquisition in the existing technology is solved, and the effect of more accurately fitting the real road is achieved.
Patent Information
- Application Number
- CN202210511079.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-05-11
AI Technical Summary
The prior art is not very accurate when acquiring a route, and it is prone to deviation from the real route. The main reason is that the existence of noise causes multiple monotonic intervals to be present in the fitted line, which violates the monotonic trend of the real route.
Through the iterative processing method based on discrete sampling points, the real road route is gradually approached. In each iteration process, the target discrete sampling point is obtained, and the initial fit line is fitted. A target monotonic interval is selected from all monotonic intervals of the initial fit line to determine the target discrete sampling point for the next iteration process and/or generate the road fit line until the preset end condition is reached.
Through iterative processing and monotonic interval selection methods, the acquired roads show a monotonic trend, which can more accurately fit the real roads, effectively improving the accuracy of the road acquisition.
Smart Images

Figure CN114942027B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a road line acquisition method, device, equipment and medium. Background Art
[0002] In fields such as unmanned driving and intelligent logistics, road lines are the key perception targets of autonomous vehicles or robots. Whether the road lines in the driving environment can be accurately acquired (also called detection) will directly affect the normal operation of the autonomous vehicle or robot. However, the existing technology for acquiring road lines is not good, and in many cases, the acquired road lines deviate greatly from the actual road lines. Summary of the invention
[0003] In order to improve the above technical problems, the present disclosure provides a road line acquisition method, device, equipment and medium.
[0004] In a first aspect, an embodiment of the present disclosure provides a road line acquisition method, the method comprising: acquiring discrete sampling points corresponding to a target road line; performing at least one iterative process based on the discrete sampling points, until the iteration is stopped when a preset end condition is reached; acquiring a road fitting line corresponding to the last iterative process, and obtaining the target road line based on the road fitting line corresponding to the last iterative process; wherein each iterative process is performed according to the following steps: acquiring the target discrete sampling points corresponding to the iterative process; fitting the target discrete sampling points to obtain an initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line, the target monotonic interval being used to determine the target discrete sampling points corresponding to the next iterative process and / or for generating the road fitting line corresponding to the iterative process.
[0005] In a second aspect, an embodiment of the present disclosure further provides a road line acquisition device, comprising: a sampling point acquisition module, used to acquire discrete sampling points corresponding to a target road line; an iterative processing module, used to perform at least one iterative processing based on the discrete sampling points, until the iteration is stopped when a preset end condition is reached; a road line acquisition module, used to acquire a road fitting line corresponding to the last iterative processing, and obtain the target road line based on the road fitting line corresponding to the last iterative processing; wherein each iterative processing is performed according to the following steps: acquiring the target discrete sampling points corresponding to the iterative processing; fitting the target discrete sampling points to obtain an initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line; the target monotonic interval is used to determine the target discrete sampling points corresponding to the next iterative processing and / or to generate the road fitting line corresponding to the iterative processing.
[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement a road line acquisition method as provided in an embodiment of the present disclosure.
[0007] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the road line acquisition method provided by the embodiment of the present disclosure.
[0008] The above technical solution provided by the embodiment of the present disclosure can perform at least one iterative process based on the discrete sampling points corresponding to the target road line, and stop the iteration until the preset end condition is reached; in each iteration, the target discrete sampling points corresponding to the iterative process are obtained; the target discrete sampling points are fitted to obtain the initial fitting line; and a target monotonic interval is selected from all monotonic intervals of the initial fitting line, and the target monotonic interval is used to determine the target discrete sampling points corresponding to the next iterative process and / or to generate the road fitting line corresponding to the iterative process. After the iteration is completed, the road fitting line corresponding to the last iterative process can be obtained, and the target road line can be obtained based on the road fitting line corresponding to the last iterative process. The above method fully considers that the real road line generally presents a monotonic trend, and the target road line obtained by the above method also presents a monotonic trend and can fit the real road line as closely as possible through iterative processing, which effectively improves the accuracy of road line acquisition.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0012] Figure 1 A schematic diagram of a roadside line provided in an embodiment of the present disclosure;
[0013] Figure 2 A schematic diagram of a roadside fitting line provided in an embodiment of the present disclosure;
[0014] Figure 3 A schematic diagram of a process of obtaining a road line provided by an embodiment of the present disclosure;
[0015] Figure 4 A schematic diagram of a process of obtaining a road line provided by an embodiment of the present disclosure;
[0016] Figure 5 A schematic diagram of a roadside fitting line provided in an embodiment of the present disclosure;
[0017] Figure 6 A schematic diagram of the structure of a road line acquisition device provided in an embodiment of the present disclosure;
[0018] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0020] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0021] Intelligent driving devices such as autonomous vehicles or robots need to acquire (also known as detect) road lines in the environment (such as lane lines, curbs, tunnel walls, etc.). The accuracy of the road line acquisition results usually directly affects whether the intelligent driving device can drive normally in the environment. For example, if the road line acquisition is inaccurate, the intelligent driving device may drive along the wrong path or fail to successfully avoid obstacles. Therefore, how to accurately and reliably acquire the road lines in the environment is crucial.
[0022] In the related art, most of the methods for obtaining road lines are to directly perform curve fitting based on the discrete sampling points of the actual road line, and use the obtained fitting line as the obtained road line. However, the inventors have found through research that the road line obtained in this way is prone to deviate from the actual road line. The main reason is that there will inevitably be some noise points in the obtained discrete sampling points, which will cause the fitting line to have multiple monotonic intervals, that is, there will be multiple increasing or decreasing intervals. However, in real scenes, the actual road line generally only shows a monotonic trend and basically does not have multiple twists and turns. Take the road line as an example, see Figure 1The roadside line diagram shown in the figure is a monotonically increasing line. Figure 1 At the same time, the dashed arrows also indicate the trend of the roadside line in the image. In order to extract the roadside line from the image, most of the related technologies only obtain some discrete sampling points of the roadside line first, and then use the discrete sampling points to perform curve fitting, and use the fitted line (referred to as the fitted line) as the detected roadside line. However, due to the presence of noise points, the obtained fitting line will mostly deviate from the actual roadside line, and the overall trend of the fitting line does not conform to the actual situation. For example, the fitting line obtained based on the discrete sampling points in the related technology can be seen in Figure 2 As shown, the fitting line decreases first, then increases, and then decreases again, that is, there are 3 monotonic intervals. Figure 2 At the same time, three dotted arrows are used to indicate the trend of the three monotonic intervals of the fitting line. Obviously, there is a large deviation between the fitting line and the actual roadside line, and the trend does not conform to the actual situation.
[0023] In order to improve the above problems and enhance the accuracy of road line acquisition (detection accuracy) so that the acquired road lines can more accurately fit the real road lines, the embodiments of the present disclosure fully consider the trend of road lines in real scenes and propose a road line acquisition method, device, equipment and medium, which are explained in detail below.
[0024] First, see Figure 3 The present invention provides a flow chart of a road line acquisition method provided in an embodiment of the present invention. The method can be executed by a road line acquisition device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 3 As shown, the method mainly includes the following steps S302 to S306:
[0025] Step S302: Obtain discrete sampling points corresponding to the target road line.
[0026] In some specific implementations, the environment detection data may be first acquired; then instance semantic segmentation may be performed on the environment detection data to obtain discrete sampling points corresponding to the target road line.
[0027] The above-mentioned environmental detection data can be in the form of images or point clouds. For example, images captured by a camera device can be used as environmental detection data, and point cloud data captured by a lidar can be used as environmental detection data. The embodiments of the present disclosure do not limit the form of environmental detection data.
[0028] In order to conveniently perceive the road lines in the environment, the disclosed embodiment may process the environment detection data using the instance semantic segmentation technology, thereby obtaining discrete sampling points corresponding to each road line contained in the environment detection data. The specific implementation method may refer to the relevant technology and will not be described in detail here. In practical applications, each road line in the environment detection data may be used as a target road line. The discrete sampling points of the target road line obtained by the instance semantic segmentation technology can be further fitted based on the discrete sampling points of the target road line to obtain a complete target road line.
[0029] Step S304, performing at least one iterative process based on the discrete sampling points, and stopping the iteration when a preset end condition is reached.
[0030] Each iteration process is performed according to the following steps: obtaining the target discrete sampling points corresponding to the iteration process; fitting the target discrete sampling points to obtain the initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line, and the target monotonic interval is used to determine the target discrete sampling points corresponding to the next iteration process and / or to generate the road fitting line corresponding to the iteration process. Exemplarily, the discrete sampling points in the target monotonic interval obtained by the non-last iteration process can be used as the target discrete sampling points corresponding to the next iteration process, and the fitting line corresponding to the target monotonic interval obtained by the last iteration process can be used as the last road fitting line.
[0031] Compared with the related art that directly uses discrete sampling points for fitting and uses the obtained fitting line as the road line, in order to make the fitting line fit the real road line as much as possible, the embodiment of the present disclosure not only gradually approaches the real road line through iterative processing, but also only selects one monotonic interval in each iterative processing to match the monotonic trend of the real road line, so as to avoid the situation where the trend of the finally obtained fitting road line is inconsistent with the real road line.
[0032] In practical applications, the termination condition of the iterative processing can be flexibly set according to the requirements. For example, the termination condition includes one or more of the following (1) to (4):
[0033] (1) The current number of iterations reaches the preset iteration threshold.
[0034] (2) The current processing time reaches the preset time threshold.
[0035] The above-mentioned iteration number threshold and preset time threshold can be flexibly set according to needs or experience, and are not limited here. When the iteration number threshold or the preset time threshold is reached, it is usually that multiple iterations or processing have been completed for a long time. At this time, the obtained road line can generally achieve the expected accuracy, so the iteration can be terminated.
[0036] (3) The initial fitting line corresponding to the current iteration process contains only one monotonic interval. Specifically, if the initial fitting line corresponding to the current iteration process contains only one monotonic interval, it means that the trend of the fitting line obtained by the current iteration process is consistent with the actual situation, and there are no noise points inconsistent with the trend of the road curve, so the iteration can be terminated.
[0037] (4) The number of discrete sampling points contained in the target monotonic interval obtained by the current iterative processing reaches the preset point threshold. The preset point threshold is also the minimum discrete sampling points that the target monotonic interval can contain. If the discrete sampling points are less than the preset point threshold, effective and reliable line fitting cannot be achieved. Since each iterative processing only retains the target monotonic interval, that is, the discrete sampling points of the non-target monotonic interval are filtered out, as the number of iterative processing increases, the number of discrete sampling points in the target monotonic interval will gradually decrease until it reaches the preset point threshold, then the iteration is terminated, so as to avoid the discrete sampling points that do not meet the quantity requirements in the next iteration and cannot be effectively fitted.
[0038] The above iteration end conditions are only examples given in the embodiments of the present disclosure and should not be considered as limitations. Any desired condition for ending the iteration is acceptable. In addition, in practical applications, after each iteration, it can be determined whether the preset end condition is currently reached, and the iteration process can be ended when any end condition is reached.
[0039] Step S306, obtaining the road fitting line corresponding to the last iterative process, and obtaining the target road line based on the road fitting line corresponding to the last iterative process.
[0040] In some implementation examples, the initial fitting line corresponding to the target monotonic interval obtained by the last iteration can be first obtained; then the initial fitting line corresponding to the target monotonic interval is used as the road fitting line corresponding to the last iteration, and then the target road line is obtained based on the road fitting line corresponding to the last iteration. Specifically, the interval segment of the initial fitting line corresponding to the target monotonic interval is consistent with the monotonic trend, which can fully avoid the problem that the target road line obtained by fitting is inconsistent with the trend of the target road line in the real scene. In addition, the fitting line can be gradually optimized through multiple iterations, so that the fitting line corresponding to the last iteration is more in line with the actual road line.
[0041] In summary, the above method provided by the embodiment of the present disclosure fully takes into account that the real road line generally presents a monotonous trend, and the target road line obtained by the above method also presents a monotonous trend and can be as close to the real road line as possible through iterative processing, thereby effectively improving the accuracy of road line acquisition.
[0042] For ease of understanding, the following describes several key steps (i) to (iii) required for each iterative process:
[0043] (a) Obtain target discrete sampling points.
[0044] Each iteration process needs to obtain the target discrete sampling points corresponding to the iteration process. In the specific implementation, different target discrete sampling point acquisition methods can be adopted according to whether the iteration process is the first iteration process:
[0045] (1) When the current iteration process is the first iteration process, all discrete sampling points corresponding to the target road line are used as the target discrete sampling points corresponding to the current iteration process. That is, when the current iteration process is the first iteration process, processing is performed based on all discrete sampling points obtained from the environment detection data.
[0046] (2) When the current iteration is not the first iteration, the discrete sampling points in the target monotonic interval obtained in the previous iteration are used as the target discrete sampling points corresponding to the current iteration. That is, when the current iteration is not the first iteration, the discrete sampling points other than the target monotonic interval in the previous iteration can be directly filtered out as noise points that do not match the trend of the road line, and only the discrete sampling points in the target monotonic interval in the previous iteration are used for further fitting in the current iteration, thereby reducing the influence of noise points on the fitting results, so that the fitting line obtained in this processing is more closely aligned with the real road line.
[0047] (ii) Fit the target discrete sampling points to obtain the initial fitting line.
[0048] For each iterative process, fitting may be performed based on the target discrete sampling points corresponding to the iterative process to obtain an initial fitting line corresponding to the iterative process.
[0049] In some implementations, in order to obtain a relatively accurate and effective initial fitting line, the number of target discrete sampling points may be first obtained; then, when the number of target discrete sampling points is not less than a preset point threshold, multiple curve fitting processes are performed on the target discrete sampling points to obtain an initial fitting line. The above method sets a preset point threshold to ensure the number of target discrete sampling points, and can relatively accurately and reliably fit the initial fitting line, making the initial fitting line more accurate.
[0050] The embodiments of the present disclosure do not limit the specific method of multiple curve fitting processing. In some specific implementation examples, the step of performing multiple curve fitting processing on the target discrete sampling points includes: performing cubic curve fitting processing on the target discrete sampling points based on the least squares method. The method of using the least squares method to perform cubic curve fitting processing is convenient and feasible, requires less computing power, and can obtain a fitting line that meets actual needs without complex calculation processing. In addition, the above is only an example. In actual applications, you can also choose a quartic curve fitting process, etc., which is not limited here.
[0051] (iii) Select a target monotonic interval from all monotonic intervals of the initial fitting line.
[0052] The initial fitting line obtained from each iterative process may contain at least one monotonic interval. For the initial fitting line containing only one monotonic interval, the only monotonic interval is the target monotonic interval. For the initial fitting line containing multiple monotonic intervals, it is necessary to select a monotonic interval as the target monotonic interval. The line corresponding to the initial fitting line in the target monotonic interval can be used as the road line obtained from the iterative process, and the discrete sampling points in the target monotonic interval can be used as the target discrete sampling points for fitting in the next iterative process.
[0053] In practical applications, the target monotonic interval is the main interval, and the remaining monotonic intervals are the secondary intervals. The discrete sampling points in the remaining monotonic intervals can be removed, and only the discrete sampling points in the main interval are retained. The above method fully considers that the real road line is in a single monotonic interval in most cases. Therefore, by selecting the target monotonic interval, the discrete sampling points that do not match the trend of the real road line can be filtered as much as possible.
[0054] The embodiment of the present disclosure provides an implementation example of reasonably selecting a target monotonic interval, which can be implemented by referring to the following steps A to B:
[0055] Step A: Obtain the number of discrete sampling points contained in each monotonic interval of the initial fitting line.
[0056] Step B: According to the number of discrete sampling points contained in each monotonic interval, a target monotonic interval is selected from all monotonic intervals of the initial fitting line; wherein, the number of discrete sampling points of the target monotonic interval is not less than the number of discrete sampling points of other monotonic intervals. That is, the monotonic interval with the largest number of discrete sampling points is selected as the target monotonic interval. Under normal circumstances, the line obtained by fitting based on discrete sampling points will have a main interval containing the largest number of discrete sampling points, and there are other sub-intervals generated by a smaller number of discrete sampling points. It can be understood that, in theory, the line obtained by fitting discrete sampling points is consistent with the real road line, but due to the existence of factors such as noise points, there is a certain deviation between the fitted line and the real road line, and multiple monotonic intervals may appear, so that the trend of the fitted line is inconsistent with the real road line, but under normal circumstances, the main trend of the fitted line (that is, the line trend of the target monotonic interval) is basically consistent with the real road line, so only the target monotonic interval can be retained, and other monotonic intervals can be discarded to filter out noise points that are inconsistent with the road trend.
[0057] After the iteration is completed, the initial fitting line corresponding to the target monotonic interval obtained by the last iteration can be obtained; then the initial fitting line corresponding to the target monotonic interval is used as the road fitting line corresponding to the last iteration, and then the road fitting line corresponding to the last iteration can be used as the target road line, or the road fitting line corresponding to the last iteration can be corrected and the corrected road fitting line can be used as the target road line. For example, the road fitting line corresponding to the last iteration can be corrected by smoothing, so that the corrected road fitting line is closer to the real road line.
[0058] Based on the above implementation example, see Figure 4 The schematic flow chart of a road line acquisition method shown in FIG. 1 mainly includes the following steps S402 to S420:
[0059] Step S402, obtaining environmental detection data; the environmental detection data includes environmental images or environmental point cloud data.
[0060] Step S404: Perform instance semantic segmentation processing on the environment detection data to obtain discrete sampling points of the target road line. Each road line in the environment detection data can be used as the target road line.
[0061] Step S406 , starting to perform an iterative operation on the discrete sampling points of the target road line.
[0062] Step S408a: the current iterative process is the first iterative process, and all discrete sampling points corresponding to the target road line are used as target discrete sampling points corresponding to the current iterative process.
[0063] Step S408b: the current iteration process is not the first iteration process, and the discrete sampling points in the main interval obtained in the previous iteration process are used as the target discrete sampling points corresponding to the current iteration process, wherein the main interval is the aforementioned target monotonic interval.
[0064] Step S410: When the number of target discrete sampling points is not less than a preset point number threshold, a cubic curve fitting process is performed on the target discrete sampling points based on the least squares method to obtain an initial fitting line corresponding to the current iterative process.
[0065] The preset point number threshold is related to the number of points required for reasonable curve fitting. For example, for cubic curve fitting processing, the preset point number threshold can be set to 4, that is, at least 4 discrete sampling points are required to perform a normal cubic curve fitting operation.
[0066] Assume that the cubic road curve equation is:
[0067] y=ax3+bx 2 +cx+d
[0068] Assuming the parameter to be estimated is P, we have:
[0069]
[0070] Assume the information matrix X, Y associated with the coordinates of the discrete sampling points, then:
[0071]
[0072]
[0073] Among them, (x1, y1) is the coordinate value of discrete sampling point 1, (x n ,y n ) is the coordinate value of the discrete sampling point n.
[0074] According to the matrix operation rules:
[0075] P=(X T X) -1 X T Y
[0076] Among them, T is the transposition operator and -1 is the inversion operator.
[0077] The parameter P to be estimated can be calculated through the above formula, and the cubic fitting can be realized to obtain the specific parameters of the cubic road curve equation, that is, the initial fitting line corresponding to the current iterative processing can be obtained by fitting based on the target discrete sampling points.
[0078] Step S412, obtaining the number of discrete sampling points contained in each monotonic interval of the initial fitting line.
[0079] Specifically, the initial fitting line may be analyzed first to obtain the monotonic interval contained in the initial fitting line. For example, the method of obtaining the monotonic interval contained in the initial fitting line may be implemented as follows:
[0080] First, the cubic road curve equation is derived to obtain its derivative form:
[0081] y′=3ax 2 +2bx+c
[0082] Then calculate the discriminant of the quadratic curve in the above derivative form:
[0083] Δ=4b 2 -12aC
[0084] It can be seen that when Δ<0, the curve y' is monotonic (increasing or decreasing) in the entire real number domain. At this time, there is only one monotonic interval, so let R1=(-∞, +∞);
[0085] When Δ≥0, the curve y' corresponds to two zero solutions (when Δ=0, the two zero solutions are equal), which are:
[0086]
[0087]
[0088] Sort s1 and s2, assuming that s1 is less than s2, then three monotonic intervals can be obtained: R1 = (-∞, s1], R2 = (s1, s2], R3 = (s2, +∞). In addition, it should be noted that when Δ = 0, since s1 = s2, it can be regarded as having two monotonic intervals. Although these two monotonic intervals are uniformly increasing or uniformly decreasing, there are inflection points, which also do not conform to the actual road trend.
[0089] Step S414: taking a monotonic interval with the largest number of discrete sampling points as a primary interval, and taking the remaining monotonic intervals as secondary intervals.
[0090] In specific implementation, the discrete sampling points belonging to each monotonic interval can be counted. For example, the number of discrete sampling points of the three monotonic intervals R1 is N1, the number of discrete sampling points of R2 is N2, and the number of discrete sampling points of R3 is N3. Then N1, N2 and N3 can be sorted, and the monotonic interval with the largest number of discrete sampling points is selected as the main interval corresponding to the current iteration.
[0091] If the initial fitting line has only one monotonic interval, then the monotonic interval is directly used as the main interval.
[0092] Step S416: remove the discrete sampling points in all the secondary intervals and only keep the discrete sampling points in the primary interval.
[0093] Step S418, determine whether the preset iteration end condition is currently met. If yes, execute step S420, if not, execute step S408b.
[0094] Step S420, ending the iteration, obtaining the road fitting line corresponding to the last iterative process, and obtaining the target road line based on the road fitting line corresponding to the last iterative process.
[0095] Furthermore, the relevant parameters of the corresponding road fitting line may be processed based on the last iteration.
[0096] Figure 4The above-mentioned road line acquisition method proposed is a cubic fitting method for road curves based on monotonic interval search, which fully considers the trend of the real road line. By iteratively performing the "fitting-searching monotonic interval-filtering the sampling points of the secondary interval (or retaining the sampling points of the main interval)" operation, it can more fully remove the noise points that are inconsistent with the trend of the road line, so that the final road line is more consistent with the real road line.
[0097] Still based on the road line Figure 1 For example, see Figure 5 The schematic diagram of the fitting line of the roadside line obtained by the road line acquisition method provided by the embodiment of the present disclosure is shown in FIG. Figure 2 Compared with the roadside lines obtained by the related technology shown in the figure, the above method provided by the embodiment of the present disclosure can significantly improve the accuracy of road line acquisition, so that the acquired road line can be more consistent with the real road line.
[0098] In summary, the target road line obtained by the above method provided by the embodiment of the present disclosure also presents a monotonous trend and can be as close to the real road line as possible through iterative processing, which effectively improves the accuracy of road line acquisition, effectively reduces the deviation between the detected road line and the real road line, and improves the overall perception ability of intelligent devices such as unmanned vehicles and robots on road lines, thereby achieving a more stable intelligent driving function. Furthermore, the above method provided by the embodiment of the present disclosure has the characteristics of simple calculation and requires less computing power, so it can efficiently detect road lines, and is suitable for running on real-time platforms, with strong universality.
[0099] Corresponding to the road line acquisition method provided by the embodiment of the present disclosure, the embodiment of the present disclosure provides a road line acquisition device, Figure 6 FIG. 1 is a schematic diagram of a road line acquisition device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated in an electronic device, such as Figure 6 As shown, including:
[0100] The sampling point acquisition module 602 is used to acquire discrete sampling points corresponding to the target road line;
[0101] Iterative processing module 604, used to perform at least one iterative processing based on discrete sampling points until the iteration is stopped when a preset end condition is reached;
[0102] A road line acquisition module 606 is used to acquire a road fitting line corresponding to the last iterative process, and obtain a target road line based on the road fitting line corresponding to the last iterative process;
[0103] Among them, each iterative processing is performed according to the following steps: obtaining the target discrete sampling points corresponding to the iterative processing; fitting the target discrete sampling points to obtain the initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line; the target monotonic interval is used to determine the target discrete sampling points corresponding to the next iterative processing and / or to generate the road fitting line corresponding to the iterative processing.
[0104] The above device fully considers that the real road line generally presents a monotonous trend. The target road line obtained by the above method also presents a monotonous trend and can fit the real road line as closely as possible through iterative processing, which effectively improves the accuracy of road line acquisition.
[0105] In some implementations, the sampling point acquisition module 602 is specifically used to: acquire environmental detection data; and perform instance semantic segmentation processing on the environmental detection data to obtain discrete sampling points corresponding to the target road line.
[0106] In some embodiments, the termination conditions include one or more of the following: the current number of iterations reaches a preset iteration number threshold, the current processing time reaches a preset time threshold, the initial fitting line corresponding to the current iterative processing contains only one monotonic interval, and the number of discrete sampling points contained in the target monotonic interval obtained by the current iterative processing reaches a preset point threshold.
[0107] In some embodiments, the iterative processing module 604 is specifically used to: when the iterative processing is the first iterative processing, all discrete sampling points corresponding to the target road line are used as the target discrete sampling points corresponding to the iterative processing; when the iterative processing is not the first iterative processing, the discrete sampling points in the target monotonic interval obtained by the previous iterative processing are used as the target discrete sampling points corresponding to the iterative processing.
[0108] In some embodiments, the iterative processing module 604 is specifically used for: the step of selecting a target monotonic interval from all monotonic intervals of the initial fitting line includes: obtaining the number of discrete sampling points contained in each monotonic interval of the initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line according to the number of discrete sampling points contained in each monotonic interval; wherein the number of discrete sampling points of the target monotonic interval is not less than the number of discrete sampling points of other monotonic intervals.
[0109] In some implementations, the iterative processing module 604 is specifically used to: obtain the number of the target discrete sampling points; and when the number of the target discrete sampling points is not less than a preset point number threshold, perform multiple curve fitting processes on the target discrete sampling points to obtain an initial fitting line.
[0110] In some implementations, the iterative processing module 604 is specifically configured to perform a cubic curve fitting process on the target discrete sampling points based on the least squares method.
[0111] In some implementations, the road line acquisition module 606 is specifically used to: acquire an initial fitting line corresponding to the target monotonic interval obtained in the last iterative process; and use the initial fitting line corresponding to the target monotonic interval as the road fitting line corresponding to the last iterative process.
[0112] In some implementations, the road line acquisition module 606 is specifically used to: use the road fitting line corresponding to the last iterative processing as the target road line, or correct the road fitting line corresponding to the last iterative processing and use the corrected road fitting line as the target road line.
[0113] The road line acquisition device provided in the embodiments of the present disclosure can execute the road line acquisition method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0114] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device embodiment can refer to the corresponding process in the method embodiment, and will not be repeated here.
[0115] The present disclosure also provides an electronic device, the electronic device comprising: a processor;
[0116] A memory for storing processor executable instructions; a processor for reading the executable instructions from the memory and executing the instructions to implement the above-mentioned road line acquisition method.
[0117] Figure 7 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the electronic device 700 includes one or more processors 701 and a memory 702 .
[0118] The processor 701 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 700 to perform desired functions.
[0119] The memory 702 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 701 may run the program instructions to implement the road line acquisition method of the embodiment of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0120] In one example, the electronic device 700 may further include: an input device 703 and an output device 704, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0121] In addition, the input device 703 may also include, for example, a keyboard, a mouse, and the like.
[0122] The output device 704 can output various information to the outside, including the determined distance information, direction information, etc. The output device 704 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0123] Of course, to simplify, Figure 7 Only some of the components related to the present disclosure in the electronic device 700 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 700 may also include any other appropriate components.
[0124] In addition to the above-mentioned method and device, the embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the processor executes the road line acquisition method provided by the embodiment of the present disclosure.
[0125] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0126] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the road line acquisition method provided by the embodiment of the present disclosure.
[0127] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 above.
[0128] The embodiment of the present disclosure also provides a computer program product, including a computer program / instruction, which implements the road line acquisition method in the embodiment of the present disclosure when executed by a processor.
[0129] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0130] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0131] In summary, the road line acquisition method provided in the embodiment of the present disclosure can be performed as follows:
[0132] A1. A method for obtaining a road line, comprising:
[0133] Obtain discrete sampling points corresponding to the target road line;
[0134] Perform at least one iterative process based on the discrete sampling points until the iteration is stopped when a preset end condition is reached;
[0135] Acquire a road fitting line corresponding to the last iterative process, and obtain the target road line based on the road fitting line corresponding to the last iterative process;
[0136] Among them, each iterative processing is performed according to the following steps: obtaining the target discrete sampling points corresponding to the iterative processing; fitting the target discrete sampling points to obtain the initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line, and the target monotonic interval is used to determine the target discrete sampling points corresponding to the next iterative processing and / or to generate the road fitting line corresponding to the iterative processing.
[0137] A2. According to the method described in A1, the step of obtaining discrete sampling points corresponding to the target road line comprises:
[0138] Obtain environmental testing data;
[0139] The environment detection data is subjected to instance semantic segmentation processing to obtain discrete sampling points corresponding to the target road line.
[0140] A3. According to the method described in A1, the termination conditions include one or more of the following: the current number of iterations reaches a preset iteration number threshold, the current processing time reaches a preset time threshold, the initial fitting line corresponding to the current iterative processing contains only one monotonic interval, and the number of discrete sampling points contained in the target monotonic interval obtained by the current iterative processing reaches a preset point threshold.
[0141] A4. According to the method described in A1, the step of obtaining the target discrete sampling points corresponding to the iterative processing includes:
[0142] When the iterative processing is the first iterative processing, all discrete sampling points corresponding to the target road line are used as target discrete sampling points corresponding to the iterative processing;
[0143] When the iterative processing is not the first iterative processing, the discrete sampling points in the target monotonic interval obtained in the previous iterative processing are used as the target discrete sampling points corresponding to the iterative processing.
[0144] A5. According to the method described in A1, the step of selecting a target monotonic interval from all monotonic intervals of the initial fitting line comprises:
[0145] Obtain the number of discrete sampling points contained in each monotonic interval of the initial fitting line;
[0146] According to the number of discrete sampling points contained in each monotonic interval, a target monotonic interval is selected from all monotonic intervals of the initial fitting line; wherein the number of discrete sampling points of the target monotonic interval is not less than the number of discrete sampling points of other monotonic intervals.
[0147] A6. According to the method described in A1, the step of fitting the target discrete sampling points to obtain an initial fitting line comprises:
[0148] Obtaining the number of target discrete sampling points;
[0149] When the number of the target discrete sampling points is not less than a preset point number threshold, multiple curve fitting processes are performed on the target discrete sampling points to obtain an initial fitting line.
[0150] A7. According to the method described in A6, the step of performing multiple curve fitting processes on the target discrete sampling points comprises:
[0151] A cubic curve fitting process is performed on the target discrete sampling points based on the least squares method.
[0152] A8. According to the method described in A1, the step of obtaining the road fitting line corresponding to the last iteration process comprises:
[0153] Get the initial fitting line corresponding to the target monotonic interval obtained from the last iterative process;
[0154] The initial fitting line corresponding to the target monotonic interval is used as the road fitting line corresponding to the last iteration process.
[0155] A9. According to the method described in A1, the step of obtaining the target road line based on the road fitting line corresponding to the last iterative processing comprises:
[0156] The road fitting line corresponding to the last iterative process is used as the target road line, or the road fitting line corresponding to the last iterative process is corrected and the corrected road fitting line is used as the target road line.
Claims
1. A road line acquisition method, characterized in that: include: Obtain discrete sampling points corresponding to the target road line; Perform at least one iterative process based on the discrete sampling points until the iteration is stopped when a preset end condition is reached; Acquire a road fitting line corresponding to the last iterative process, and obtain the target road line based on the road fitting line corresponding to the last iterative process; Among them, each iterative processing is performed according to the following steps: obtaining the target discrete sampling points corresponding to the iterative processing; fitting the target discrete sampling points to obtain the initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line, and the target monotonic interval is used to determine the target discrete sampling points corresponding to the next iterative processing and / or to generate the road fitting line corresponding to the iterative processing.
2. The method according to claim 1, characterized in that The step of obtaining discrete sampling points corresponding to the target road line includes: Obtain environmental testing data; The environment detection data is subjected to instance semantic segmentation processing to obtain discrete sampling points corresponding to the target road line.
3. The method according to claim 1, characterized in that The step of obtaining the target discrete sampling points corresponding to the iterative processing includes: When the iterative processing is the first iterative processing, all discrete sampling points corresponding to the target road line are used as target discrete sampling points corresponding to the iterative processing; When the iterative processing is not the first iterative processing, the discrete sampling points in the target monotonic interval obtained in the previous iterative processing are used as the target discrete sampling points corresponding to the iterative processing.
4. The method according to claim 1, characterized in that: The step of selecting a target monotonic interval from all monotonic intervals of the initial fitting line comprises: Obtain the number of discrete sampling points contained in each monotonic interval of the initial fitting line; According to the number of discrete sampling points contained in each monotonic interval, a target monotonic interval is selected from all monotonic intervals of the initial fitting line; wherein the number of discrete sampling points of the target monotonic interval is not less than the number of discrete sampling points of other monotonic intervals.
5. The method according to claim 1, characterized in that The step of fitting the target discrete sampling points to obtain an initial fitting line comprises: Obtaining the number of the target discrete sampling points; When the number of the target discrete sampling points is not less than a preset point number threshold, multiple curve fitting processes are performed on the target discrete sampling points to obtain an initial fitting line.
6. The method according to claim 1, characterized in that The step of obtaining the road fitting line corresponding to the last iteration process includes: Get the initial fitting line corresponding to the target monotonic interval obtained from the last iterative process; The initial fitting line corresponding to the target monotonic interval is used as the road fitting line corresponding to the last iteration process.
7. The method according to claim 1, characterized in that The step of obtaining the target road line based on the road fitting line corresponding to the last iterative processing comprises: The road fitting line corresponding to the last iterative process is used as the target road line, or the road fitting line corresponding to the last iterative process is corrected and the corrected road fitting line is used as the target road line.
8. A road line acquisition device, characterized in that: include: A sampling point acquisition module is used to obtain discrete sampling points corresponding to the target road line; An iterative processing module, used to perform at least one iterative processing based on the discrete sampling points until the iteration is stopped when a preset end condition is reached; A road line acquisition module, used to acquire a road fitting line corresponding to the last iterative process, and obtain the target road line based on the road fitting line corresponding to the last iterative process; Each iterative process is performed according to the following steps: obtaining the target discrete sampling points corresponding to the iterative process; fitting the target discrete sampling points to obtain an initial fitting line; selecting a target monotonic interval from all monotonic intervals of the initial fitting line; The target monotonic interval is used to determine the target discrete sampling points corresponding to the next iterative process and / or to generate the road fitting line corresponding to the iterative process.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the road line acquisition method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the road line acquisition method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and apparatus for determining lane line on road, and equipment
CN108256446A
Lane line detection method and device and computer readable storage medium
CN111178193A