Lane line fitting method and device, electronic equipment, moving tool and readable medium
By selecting the appropriate fitting strategy and B-spline probability model when detecting lane line data in autonomous driving, the problem of large amount of lane line fitting is solved, and real-time and smooth lane line curve fitting is achieved.
Patent Information
- Application Number
- CN202310519490.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2024-11-12
AI Technical Summary
In the field of autonomous driving, the full data fitting of lane lines is large and time-consuming, and the prior art has failed to effectively solve this problem.
When detecting the newly added lane line data, determine the number of control points, and select a segmented fitting strategy or a direct fitting strategy based on the number comparison results, and use the B-spline probability model for incremental fit to reduce the amount of calculation.
The calculation amount of lane line fitting is reduced and real-time improvement is achieved, which avoids the unsmooth problem caused by full fitting and ensures the C2 continuity of the curve.
Smart Images

Figure CN118942059A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a lane line fitting method, device, electronic device, mobile tool and readable medium. Background Art
[0002] In the field of autonomous driving, lane line detection, recognition, and fitting is a very important topic. Usually, the lane line pixels are recognized by perception based on the image, and then restored to the actual 3D physical space to obtain the sampling points in the three-dimensional space. Finally, these sampling points are fitted to obtain the equation of a curve. However, in actual situations, lane lines are tens or even hundreds of kilometers long, and fitting a full amount of data is generally too computationally intensive and time-consuming.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The present application provides a lane line fitting method, device, electronic device, mobile tool and readable medium to solve the technical problem in the above-mentioned prior art that directly fitting with full data consumes too much calculation amount.
[0005] According to one aspect of an embodiment of the present application, the present application provides a lane line fitting method, including: when newly added first lane line data is detected, determining the number of control points of the lane line control points based on the first lane line data; comparing the number of control points with a preset number, and determining a target fitting strategy based on the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy, and the segmented fitting strategy is an incremental fitting strategy by performing fixed lag smoothing on the lane line control points; performing lane line fitting according to the target fitting strategy, and obtaining a target lane line equation that characterizes the lane line through a preset curve probability model.
[0006] Optionally, a target fitting strategy is determined based on the comparison result, specifically including: if the comparison result indicates that the number of control points is greater than a preset number, the segmented fitting strategy is determined as the target fitting strategy; if the comparison result indicates that the number of control points is less than or equal to the preset number, the direct fitting strategy is determined as the target fitting strategy, wherein the direct fitting strategy is a strategy for performing lane line fitting based on lane line control points to obtain a target lane line equation.
[0007] Optionally, lane line fitting is performed according to a target fitting strategy, specifically including executing a segmented fitting strategy in the following manner: dividing the lane line control points into first control points and second control points, wherein the first control points include the most recently appearing control points corresponding to a preset number; marginalizing the second control points, and determining a first lane line equation corresponding to the second control points, wherein the target lane line equation includes the first lane line equation; executing a direct fitting strategy on the first control point to obtain the target position of the first control point.
[0008] Optionally, the second control point is marginalized, specifically including: determining a joint probability density function of the first control point and the second control point, wherein the joint probability density function includes a covariance matrix; converting the covariance matrix into an information matrix; integrating the second control point to obtain a probability distribution of the first control point to complete the marginalization of the second control point.
[0009] Optionally, lane line fitting is performed according to a target fitting strategy, specifically including executing a direct fitting strategy in the following manner: obtaining a preset lane line and an initial position of a third control point based on the first lane line data, wherein the preset lane line is a lane line that matches the actual lane line, and the lane line control point includes a third control point; obtaining an initial lane line corresponding to the lane line control point; fitting the initial position of the third control point based on the deviation between the initial lane line and the preset lane line, and obtaining a target position of the updated third control point, so that the deviation between the initial lane line and the preset lane line is less than a deviation threshold.
[0010] Optionally, after obtaining the target position, the method also includes: detecting whether there is newly added second lane line data; when it is detected that there is no second lane line data, outputting a target lane line equation corresponding to the target position through a curve probability model; when it is detected that there is second lane line data, formulating a fitting strategy based on the second lane line data, and continuing to fit according to the fitting strategy until the target lane line equation is obtained.
[0011] Optionally, the curve probability model is a B-spline curve probability model.
[0012] According to another aspect of an embodiment of the present application, the present application provides a lane line fitting device, including: a first determination module, used to determine the number of control points of the lane line control points based on the first lane line data when newly added first lane line data is detected; a second determination module, used to compare the number of control points with a preset number, and determine a target fitting strategy based on the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy; a fitting module, used to perform lane line fitting according to the target fitting strategy, and obtain a target lane line equation that characterizes the lane line through a preset curve probability model.
[0013] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the steps of the above method are implemented when the processor executes the computer program.
[0014] According to another aspect of an embodiment of the present application, the present application provides a mobile tool, including the above-mentioned electronic device.
[0015] According to another aspect of an embodiment of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above method.
[0016] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:
[0017] The present application provides a lane line fitting method, including: when the newly added first lane line data is detected, determining the number of control points of the lane line control points based on the first lane line data; comparing the number of control points with the preset number, and determining the target fitting strategy according to the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy, and the segmented fitting strategy is an incremental fitting strategy by performing fixed hysteresis smoothing on the lane line control points; performing lane line fitting according to the target fitting strategy, and obtaining the target lane line equation representing the lane line through a preset curve probability model. First, as the number of control points increases, an incremental fitting strategy is formulated, and then the lane line equation is obtained through the curve probability model, which solves the problem in the prior art that directly fitting with the full amount of data consumes too much computation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 A flowchart of an optional lane line fitting method provided according to an embodiment of the present application;
[0021] Figure 2 A flowchart of another optional lane line fitting method provided according to an embodiment of the present application;
[0022] Figure 3 A block diagram of an optional lane line fitting device provided according to an embodiment of the present application;
[0023] Figure 4 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0025] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0026] In the field of autonomous driving, lane line detection, recognition, and fitting are very important topics. Usually, the lane line pixels are recognized by perception based on the image, and then restored to the actual 3D physical space to obtain the sampling points in the three-dimensional space. Finally, these sampling points are fitted to obtain the equation of a curve. There are many options for curve equations, such as quadratic, cubic, and even 5th-order polynomial curve equations, B-spline curves, etc. Compared with ordinary polynomial curves, B-spline curves have inherent advantages in ensuring the continuity between multiple segments. For example: a third-order B-spline curve can ensure C2 continuity (i.e., second-order smoothness) between different segments. Therefore, the B-spline curve itself is a form that is very suitable for lane line fitting.
[0027] Generally, lane lines are long, such as tens of kilometers or even hundreds of kilometers. Fitting a full amount of data generally requires too much calculation and is too time-consuming. The general approach is to process the lane line in sections, dividing it into multiple sections, fitting each section once, forming a curve equation, and recording the starting point of the curve at the same time. The starting points of multiple curves are connected to obtain a complete lane line. However, this method of lane line fitting has certain problems. For example, between the two curve ends, only C0 continuity is guaranteed.
[0028] In order to solve the problem mentioned in the background technology, according to one aspect of the embodiment of the present application, an embodiment of a lane line fitting method is provided, such as Figure 1 As shown, including:
[0029] Step 101, when newly added first lane line data is detected, determining the number of control points of the lane line control points based on the first lane line data;
[0030] Step 103, comparing the number of control points with a preset number, and determining a target fitting strategy according to the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy, and the segmented fitting strategy is an incremental fitting strategy by performing fixed hysteresis smoothing on the lane line control points;
[0031] Step 105 , performing lane line fitting according to the target fitting strategy, and obtaining a target lane line equation representing the lane line through a preset curve probability model.
[0032] Specifically, the curve probability model in the present application may be a B-spline curve probability model.
[0033] In order to solve the problem of too much calculation for full fitting and the unevenness caused by segmented fitting, this application proposes an incremental lane line fitting method based on B-spline curves, which ensures continuity without generating a large amount of calculation and can run in real time on the vehicle side.
[0034] Specifically, the first lane line data is the data of lane line extension collected during the vehicle driving process. For example, the first frame image collected at point A can identify the lane line in the first frame image through the recognition model, thereby obtaining the 3D lane line in the first frame image, and determining the position and number of control points of the first frame image based on the 3D lane line. After driving a certain distance, the second frame image is collected at point B, and the data of the second frame image (3D lane line, control point position and number) is determined in the same way. By comparing the data of the two frames of images, the newly added first lane line data of the second frame image compared with the previous frame image (including newly added control points and their positions, and newly added 3D lane lines) can be obtained.
[0035] The number of lane line control points refers to the control points of all lane lines currently collected, including existing control points and newly added control points. The relevant data of the newly added control points can be obtained based on the first lane line data. Among them, the control points in this application are all three-dimensional control points.
[0036] It should be noted that the present application is described using fitting a single lane line as an example embodiment, and the present application can also be applied to the scenario of fitting multiple lane lines at the same time.
[0037] Specifically, the lane line equation of the present application is a third-order B-spline curve parameter equation. The B-spline curve is an improvement based on the Bezier curve, which is more handy in overall curve control. The second-order and third-order B-spline curves are commonly used, and the third-order B-spline curve is used as an example for explanation.
[0038] If four control points are given as P0, P1, P2, and P3, the parametric equation of the generated single-segment third-order B-spline curve is:
[0039]
[0040] Wherein: P is the control point matrix, which is formed by arranging the column vectors of the control points in order horizontally, t is a vector composed of the powers of the parameters, 0<=t<=1, and C is the polynomial coefficient of the third-order B-spline curve.
[0041] If there are multiple control points, such as m control points, they are denoted as P0, P1…P m-1 , then the construction method of multi-segment B-spline curve is:
[0042] P0, P1, P2, P3 form the first section of the curve; P1, P2, P3, P4 form the second section of the curve; P2, P3, P4, P5 form the third section of the curve, and so on.
[0043] Since the lane line equation provided in this application is a third-order B-spline curve equation, there are repeated control points between adjacent curves. In this way, the edges of the connecting parts of the curve ends can achieve C2 continuity, solving the problem of uneven fitting curves.
[0044] As an optional embodiment, a target fitting strategy is determined based on the comparison result, specifically including: if the comparison result indicates that the number of control points is greater than a preset number, the segmented fitting strategy is determined as the target fitting strategy; if the comparison result indicates that the number of control points is less than or equal to the preset number, the direct fitting strategy is determined as the target fitting strategy, wherein the direct fitting strategy is a strategy for performing lane line fitting based on lane line control points to obtain a target lane line equation.
[0045] The preset number is used to divide the lane line control points for incremental fitting. The preset number can be set according to actual conditions, and this application does not limit this.
[0046] If the number of lane control points exceeds the preset number, we can assume that the workload of full fitting is too large, so we will single out some of the earliest determined control points for marginalization, leaving only the lane control points that match the preset number for fitting.
[0047] If the number of lane control points is less than or equal to the preset number, then we can assume that the workload of full fitting will not be too large and there is no need to marginalize the lane control points.
[0048] As an optional embodiment, lane line fitting is performed according to a target fitting strategy, specifically including executing a segmented fitting strategy in the following manner: dividing the lane line control points into first control points and second control points, wherein the first control points include the most recently appearing control points corresponding to a preset number; marginalizing the second control points, and determining a first lane line equation corresponding to the second control points, wherein the target lane line equation includes the first lane line equation; executing a direct fitting strategy on the first control point to obtain the target position of the first control point.
[0049] Specifically, by marginalizing the second control point, the probability distribution of the first control point can be obtained. At this time, the second control point is fixed in the fitting process and does not participate in subsequent calculations, so as to maintain a fixed size (i.e., a preset number) of control points, thereby achieving the purpose of incrementally fitting the lane line.
[0050] The first lane line equation corresponding to the second control point is output through the B-spline curve probability model.
[0051] Next, a B-spline curve probability model provided by this application is described.
[0052] Assume that the control point matrix of the third-order B-spline curve is P, which obeys the Gaussian prior distribution:
[0053]
[0054] Among them, vec() means that the matrix is operated by column vectorization. represents Gaussian distribution, ^ represents the prior value, and ∑ represents the covariance.
[0055] To facilitate subsequent marginalization operations, the inverse of the information matrix is used instead of the covariance:
[0056]
[0057] Among them, ∧ represents the information matrix.
[0058] Then according to the position calculation formula of the point with parameter t on the curve, the observation model can be obtained as:
[0059]
[0060] in represents the Kronecker product of matrices, I 3×3 represents the unit matrix with three rows and three columns.
[0061] If you Among them, R 12×3 Represents a matrix space with 12 rows and 3 columns, then the position with parameter t follows a Gaussian distribution:
[0062]
[0063] Given n data points to be fitted, the matrix is expressed as:
[0064] The measurement error of a single data point follows a zero-mean Gaussian distribution: (in ), then the covariance of the vectorized data point matrix is
[0065] For a data point (i.e., observation value) x i For example, the parameter of the nearest neighbor point on the curve is t i , where: The matrix of all data points with parameters as Foot Point is expressed as We think x i is the Gaussian probability distribution P(t i ). According to the Bayesian formula, the posterior probability of the control point matrix is Maximizing the posterior probability and constructing an optimization problem with the objective function as the negative logarithm of the posterior probability can be seen as a least squares problem:
[0066]
[0067] As an optional embodiment, the second control point is marginalized, specifically including: determining a joint probability density function of the first control point and the second control point, wherein the joint probability density function includes a covariance matrix; converting the covariance matrix into an information matrix; integrating the second control point to obtain a probability distribution of the first control point to complete the marginalization of the second control point.
[0068] Specifically, the first control point includes a preset number of lane line control points, and the second control point includes at least one lane line control point.
[0069] For example, if the point set of the first control point is denoted by y, and the point set of the second control point is denoted by x, since x and y follow a Gaussian distribution: That is, the joint probability density function of x and y is:
[0070]
[0071] Use the information matrix instead of the covariance matrix in the above formula:
[0072]
[0073] Integrating x (i.e. marginalizing x) gives the probability distribution of y:
[0074]
[0075] As an optional embodiment, lane line fitting is performed according to a target fitting strategy, specifically including executing a direct fitting strategy in the following manner: obtaining a preset lane line and an initial position of a third control point based on the first lane line data, wherein the preset lane line is a lane line that matches the actual lane line, and the lane line control point includes the third control point; obtaining an initial lane line corresponding to the lane line control point; fitting the initial position of the third control point based on the deviation between the initial lane line and the preset lane line, and obtaining a target position of the updated third control point, so that the deviation between the initial lane line and the preset lane line is less than a deviation threshold.
[0076] Specifically, the first lane line data includes a preset lane line output by a recognition model, the preset lane line is consistent with the real lane line, and the initial position of the newly added third control point is set according to the preset lane line.
[0077] At this time, there is a deviation between the preset lane line and the initial lane line. The initial position of the third control point is updated by fitting so that the initial lane line and the preset lane line overlap as much as possible, that is, the deviation between the initial lane line and the preset lane line is less than the deviation threshold, where the deviation threshold is a value close to 0, and the specific value is not limited.
[0078] Specifically, the initial position of the third control point is updated by fitting according to the update formula of the Kalman filter, including:
[0079]
[0080] or K=(J T Λ v J+Λ) -1 J T Λ v
[0081]
[0082]
[0083] Λ←Λ+J T Λ v J
[0084] Wherein, K represents the Kalman gain.
[0085] Preferably, a direct fitting strategy is performed on the first control point to obtain the target position of the first control point in a manner similar to the manner of determining the target position of the third control point.
[0086] As an optional embodiment, after obtaining the target position, the method also includes: detecting whether there is newly added second lane line data; when it is detected that there is no second lane line data, outputting a target lane line equation corresponding to the target position through a curve probability model; when it is detected that there is second lane line data, formulating a fitting strategy based on the second lane line data, and continuing to fit according to the fitting strategy until the target lane line equation is obtained.
[0087] When it is detected that there is no second lane line data, the target lane line equation is obtained based on all lane line control points currently obtained.
[0088] Through the target position corresponding to the updated control point and the B-spline curve probability model, multiple lane line equations can be obtained, and the first lane line equation corresponding to the marginalized second control point is added to obtain the complete target lane line equation. How to obtain the target lane line equation has been described in the above explanation of the B-spline curve probability model and will not be repeated here.
[0089] Figure 2 A flowchart of another optional lane line fitting method provided according to an embodiment of the present application.
[0090] The incremental fitting method provided in the embodiment of the present application has low computational complexity and strong real-time performance, and has great advantages in electronic devices with low computing power.
[0091] The present application provides a lane line fitting method, including: when the newly added first lane line data is detected, determining the number of control points of the lane line control points based on the first lane line data; comparing the number of control points with the preset number, and determining the target fitting strategy according to the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy, and the segmented fitting strategy is an incremental fitting strategy by performing fixed hysteresis smoothing on the lane line control points; performing lane line fitting according to the target fitting strategy, and obtaining the target lane line equation representing the lane line through a preset curve probability model. First, as the number of control points increases, an incremental fitting strategy is formulated, and then the lane line equation is obtained through the curve probability model, which solves the problem in the prior art that directly fitting with the full amount of data consumes too much computation.
[0092] According to another aspect of the embodiment of the present application, the present application provides a lane line fitting device, such as Figure 3 As shown, including:
[0093] A first determination module 302 is used to determine the number of control points of the lane line control point based on the first lane line data when the newly added first lane line data is detected;
[0094] A second determination module 304 is used to compare the number of control points with a preset number, and determine a target fitting strategy according to the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy, and the segmented fitting strategy is an incremental fitting strategy by performing fixed hysteresis smoothing on the lane line control points;
[0095] The fitting module 306 is used to perform lane line fitting according to the target fitting strategy, and obtain a target lane line equation representing the lane line through a preset curve probability model.
[0096] It should be noted that the first determination module 302 in this embodiment can be used to execute step 101 in the embodiment of the present application, the second determination module 304 in this embodiment can be used to execute step 103 in the embodiment of the present application, and the fitting module 306 in this embodiment can be used to execute step 105 in the embodiment of the present application.
[0097] Optionally, the second determination module 304 is specifically used to determine the segmented fitting strategy as the target fitting strategy if the comparison result indicates that the number of control points is greater than a preset number; if the comparison result indicates that the number of control points is less than or equal to the preset number, then the direct fitting strategy is determined as the target fitting strategy, wherein the direct fitting strategy is a strategy for performing lane line fitting based on lane line control points to obtain a target lane line equation.
[0098] Optionally, the fitting module 306 includes:
[0099] A division submodule, used to divide the lane line control points into first control points and second control points, wherein the first control points include the latest control points corresponding to a preset number;
[0100] The marginalization submodule is used to perform marginalization processing on the second control point and determine the first lane line equation corresponding to the second control point, wherein the target lane line equation includes the first lane line equation; and execute a direct fitting strategy on the first control point to obtain the target position of the first control point.
[0101] Optionally, the marginalization submodule is specifically used to determine the joint probability density function of the first control point and the second control point, wherein the joint probability density function includes a covariance matrix; convert the covariance matrix into an information matrix; integrate the second control point to obtain the probability distribution of the first control point to complete the marginalization processing of the second control point.
[0102] Optionally, the fitting module 306 is also used to execute the direct fitting strategy in the following manner: obtain a preset lane line and an initial position of a third control point based on the first lane line data, wherein the preset lane line is a lane line that matches the actual lane line, and the lane line control point includes a third control point; obtain an initial lane line corresponding to the lane line control point; fit the initial position of the third control point based on the deviation between the initial lane line and the preset lane line, and obtain the target position of the updated third control point so that the deviation between the initial lane line and the preset lane line is less than a deviation threshold.
[0103] Optionally, the fitting module 306 is also used to detect whether there is newly added second lane line data after obtaining the target position; when it is detected that there is no second lane line data, output the target lane line equation corresponding to the target position through the curve probability model; when it is detected that there is second lane line data, formulate a fitting strategy based on the second lane line data, and continue to fit according to the fitting strategy until the target lane line equation is obtained.
[0104] Optionally, the curve probability model in the fitting module 306 is a B-spline curve probability model.
[0105] It should be noted here that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.
[0106] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 4 As shown, it includes a memory 401, a processor 403, a communication interface 405 and a communication bus 407. The memory 401 stores a computer program that can be run on the processor 403. The memory 401 and the processor 403 communicate through the communication interface 405 and the communication bus 407. When the processor 403 executes the computer program, the steps of the above method are implemented.
[0107] The memory and processor in the above electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
[0108] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0109] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0110] According to another aspect of the embodiments of the present application, a mobile tool is provided, including the above-mentioned electronic device.
[0111] The mobile tools of the present application can be all devices with mobile capabilities, including vehicles with automatic driving or intelligent driving (including vehicles with passenger functions (such as cars, buses, large buses, minibuses, etc.), vehicles with cargo functions (such as ordinary trucks, vans, trailers, closed trucks, tank trucks, flatbed trucks, container trucks, dump trucks, special structure trucks), special vehicles (such as logistics distribution vehicles, automatic guided transport vehicles AGV, patrol cars, cranes, cranes, excavators, bulldozers, forklifts, rollers, loaders, off-road engineering vehicles, armored engineering vehicles, sewage treatment vehicles, sanitation vehicles, vacuum trucks, floor washing vehicles, sprinkler trucks, sweeping robots, food delivery robots, shopping guide robots, lawn mowers, golf carts, etc.), vehicles with entertainment functions (such as entertainment vehicles, amusement park automatic driving devices, balance cars, etc.), rescue vehicles (such as fire trucks, ambulances, power repair vehicles, engineering rescue vehicles, etc.)) and robots (such as sweeping robots, food delivery robots, etc.), etc.
[0112] According to another aspect of the embodiments of the present application, a computer-readable medium having a non-volatile program code executable by a processor is provided.
[0113] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0114] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.
[0115] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0116] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0119] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0122] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. 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 that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0123] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A lane line fitting method, characterized in that: include: When newly added first lane line data is detected, determining the number of control points of the lane line control points based on the first lane line data; Comparing the number of control points with a preset number, and determining a target fitting strategy according to the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy, and the segmented fitting strategy is an incremental fitting strategy by performing fixed hysteresis smoothing on the lane line control points; Lane line fitting is performed according to the target fitting strategy, and a target lane line equation representing the lane line is obtained through a preset curve probability model.
2. The method according to claim 1, characterized in that Determining the target fitting strategy according to the comparison result specifically includes: If the comparison result indicates that the number of control points is greater than the preset number, determining the segmented fitting strategy as the target fitting strategy; If the comparison result indicates that the number of control points is less than or equal to the preset number, the direct fitting strategy is determined as the target fitting strategy, wherein the direct fitting strategy is a strategy for performing lane line fitting based on the lane line control points to obtain the target lane line equation.
3. The method according to claim 2, characterized in that The performing lane line fitting according to the target fitting strategy specifically includes executing the segmented fitting strategy in the following manner: Dividing the lane line control points into first control points and second control points, wherein the first control points include the most recently appeared control points corresponding to the preset number; Performing marginal processing on the second control point, and determining a first lane line equation corresponding to the second control point, wherein the target lane line equation includes the first lane line equation; The direct fitting strategy is performed on the first control point to obtain a target position of the first control point.
4. The method according to claim 3, characterized in that The performing marginalization processing on the second control point specifically includes: Determine a joint probability density function of the first control point and the second control point, wherein the joint probability density function includes a covariance matrix; Converting the covariance matrix into an information matrix; The second control point is integrated to obtain the probability distribution of the first control point to complete the marginalization processing of the second control point.
5. The method according to claim 2, characterized in that: Performing lane line fitting according to the target fitting strategy specifically includes executing the direct fitting strategy in the following manner: Acquire a preset lane line and an initial position of a third control point according to the first lane line data, wherein the preset lane line is a lane line that matches a real lane line, and the lane line control point includes the third control point; Obtaining an initial lane line corresponding to the lane line control point; The initial position of the third control point is fitted based on the deviation between the initial lane line and the preset lane line to obtain the updated target position of the third control point so that the deviation between the initial lane line and the preset lane line is less than a deviation threshold.
6. The method according to claim 3 or 5, characterized in that: After acquiring the target position, the method further includes: Detect whether there is newly added second lane line data; When it is detected that the second lane line data does not exist, outputting the target lane line equation corresponding to the target position through the curve probability model; When the presence of the second lane line data is detected, a fitting strategy is formulated based on the second lane line data, so as to continue fitting according to the fitting strategy until the target lane line equation is obtained.
7. The method according to claim 1, characterized in that The curve probability model is a B-spline curve probability model.
8. A lane line fitting device, characterized in that: include: A first determination module, configured to determine the number of control points of the lane line control points based on the first lane line data when the newly added first lane line data is detected; A second determination module is used to compare the number of control points with a preset number, and determine a target fitting strategy according to the comparison result, wherein the target fitting strategy includes a segmented fitting strategy and a direct fitting strategy; The fitting module is used to perform lane line fitting according to the target fitting strategy, and obtain a target lane line equation representing the lane line through a preset curve probability model.
9. An electronic device, comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate through the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A mobile tool, characterized in that: Comprising the electronic device as claimed in claim 9.
11. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Laser point cloud lane line extraction method and electronic equipment
CN111783722A
Three-dimensional lane line generation method and device, electronic equipment and computer readable medium
CN114399589A
Lane line fitting method and device and computer readable storage medium
CN114882145A
Method, apparatus and device for detecting lane lines
US20180060677A1
Landmark detection using curve fitting for autonomous driving applications
US20210166052A1
