A lane line matching method and device

By representing lane lines using polynomial curves and constructing a matching cost function, the problem of slow lane line matching speed in existing technologies is solved, achieving faster lane line matching and a wider range of applications.

CN116110017BActive Publication Date: 2026-06-23SHENZHEN MINIEYE INNOVATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN MINIEYE INNOVATION TECH CO LTD
Filing Date
2023-01-13
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing lane line matching methods involve large computational loads, slow matching speeds, and difficulty in determining the same lane line observations at different times and in different spaces.

Method used

By identifying lane lines in video footage, representing lane lines using polynomial curves, predicting the similarity between any two lane lines, constructing a matching cost function, solving the matching cost matrix, and determining whether the optimal matching lane line meets preset conditions, fast lane line matching is achieved.

Benefits of technology

It reduces computational load, improves matching speed, is applicable to the same lane line observation at different times and in different spaces, and simplifies the matching process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116110017B_ABST
    Figure CN116110017B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of automatic driving, and discloses a lane line matching method and device, which comprises the following steps: identifying lane lines in a video picture, adopting a polynomial curve to represent the lane lines to be matched, and obtaining lane line equations; predicting the similarity between any two lane lines based on the lane line equations; constructing a matching cost function according to the similarity; obtaining a matching cost matrix of the lane lines to be matched through the matching cost function; solving the matching cost matrix to obtain two optimally matched lane lines; and judging whether the two optimally matched lane lines satisfy preset conditions, and matching the two lane lines satisfying the preset conditions as the same lane line at different time points or in different spaces. The application has small calculation amount, faster matching speed, can be used for matching the observation of the same lane line at different time points and in different spaces, has a larger application range, and achieves a simpler effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous driving technology, and in particular to a lane matching method and apparatus. Background Technology

[0002] Currently, in order to ensure that vehicles can be accurately located on high-precision maps, a multi-sensor fusion positioning method based on lane line and map matching can be used to obtain lane line recognition results for vehicle positioning.

[0003] However, because vehicles are moving, it is difficult to determine whether lane lines appearing in video footage acquired at different times or in different spaces are the same lane lines, which is not conducive to the fusion of subsequent data. Existing lane line matching methods require first determining the captured lane line points and their corresponding map lane line points, obtaining the matching relationship between the lane line points and their corresponding points on the map, and then determining the matching between observations of the same lane line in different coordinate systems at the same time through point-to-point matching. This method involves a large amount of computation and a slow matching speed.

[0004] Regarding the aforementioned technologies, the inventors discovered that existing lane line matching methods suffer from slow matching speeds. Summary of the Invention

[0005] To improve the lane matching speed, this application provides a lane matching method and apparatus.

[0006] Firstly, this application provides a lane line matching method.

[0007] This application is achieved through the following technical solution:

[0008] A lane line matching method includes the following steps:

[0009] Identify lane lines in the video frame, represent the lane lines to be matched using polynomial curves, and obtain the lane line equations;

[0010] Based on the lane line equation, predict the similarity between any two lane lines;

[0011] Based on the similarity, a matching cost function is constructed;

[0012] The matching cost matrix of the lane line to be matched is obtained through the matching cost function;

[0013] Solve the matching cost matrix to obtain the two lane lines with the optimal match;

[0014] Determine whether the two optimally matched lane lines meet preset conditions, and match the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces.

[0015] In a preferred embodiment, this application can be further configured such that the step of predicting the similarity between any two lane lines based on the lane line equation includes:

[0016] Based on the lane line equation, calculate the difference function between the two lane lines;

[0017] Based on the difference function, calculate the average width of the two lane lines;

[0018] Based on the average width, and combined with the difference function, the normalized loss of the two lane lines is calculated.

[0019] A preset level threshold is used to compare the normalized loss with the level threshold to determine the parallel similarity level between the two lane lines.

[0020] In a preferred embodiment, this application can be further configured such that the step of obtaining the matching cost matrix of the lane line to be matched through the matching cost function includes,

[0021] Based on the matching cost function, the matching costs of the two lane lines are obtained;

[0022] A preset cost threshold and an initialized matching cost matrix are used to compare the matching cost with the cost threshold.

[0023] If the matching cost is less than or equal to the cost threshold, then the matching cost is stored in the matching cost matrix;

[0024] If the matching cost is greater than the cost threshold, the matching cost is uniformly reset to a new element and then stored in the matching cost matrix. The new element is different from all other elements stored in the matching cost matrix.

[0025] In a preferred embodiment, this application can be further configured such that the step of solving the matching cost matrix to obtain the two optimally matched lane lines includes,

[0026] The KM algorithm is used to solve the matching cost matrix to obtain the total matching cost of the two lane lines;

[0027] The two lane lines corresponding to the minimum total matching cost are selected as the two lane lines for optimal matching.

[0028] In a preferred embodiment, this application can be further configured as follows: the step of determining whether the two optimally matched lane lines meet preset conditions, and matching the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces includes,

[0029] A preset ideal threshold is used to compare the total matching cost corresponding to the two optimally matched lane lines with the ideal threshold.

[0030] If the total matching cost corresponding to the two optimally matched lane lines is less than or equal to the ideal threshold, then the two lane lines will be matched as the same lane line at different times or in different spaces.

[0031] If the total matching cost corresponding to the two lane lines of the optimal match is greater than the ideal threshold, then the match fails by default.

[0032] In a preferred embodiment, this application can be further configured such that the expression for the average width includes,

[0033]

[0034] a = max(l1.start, l2.start)

[0035] b=max(min(l1.end,l2.end),a+5)

[0036] In the formula, w represents the average width of any two lane lines, a represents the lower limit of the matching area, b represents the upper limit of the matching area, df(x) represents the difference function, l1.start represents the longitudinal starting point of lane line l1, l1.end represents the longitudinal ending point of lane line l1, l2.start represents the longitudinal starting point of another lane line l2, and l2.end represents the longitudinal ending point of another lane line l2.

[0037] In a preferred example, this application can be further configured such that the expression for the normalized loss includes,

[0038]

[0039] In the formula, loss represents the normalized loss, df(x) represents the interpolation function, w represents the average width of any two lane lines, α represents the lower limit of the matching region, and b represents the upper limit of the matching region.

[0040] In a preferred example, this application can be further configured such that the step of constructing a matching cost function based on the similarity includes:

[0041] Based on the average width of the two lane lines, the normalized loss, and the parallel similarity level, a matching cost function is constructed. The expression of the matching cost function includes:

[0042] cost_ij=(abs(w)+loss)*(Z-similarity)

[0043] In the formula, cost_ij represents the matching cost between any two lane lines, w represents the average width between any two lane lines, loss represents the normalized loss between any two lane lines, similarity represents the numerical value representing the parallel similarity level between any two lane lines, and Z>similarity.

[0044] In a preferred embodiment, this application can be further configured such that the expression for the lane line equation includes,

[0045] l=f(x=c0+c1·x+c2·x 2 +c3·x 3

[0046] In the formula, l represents the lane line, f(x) represents the function value of the lane line equation, and c0, c1, c2 and c3 are constants.

[0047] Secondly, this application provides a lane line matching device.

[0048] This application is achieved through the following technical solution:

[0049] A lane line matching device, comprising,

[0050] The lane line representation module is used to identify lane lines in the video image, and uses a polynomial curve to represent the lane line to be matched to obtain the lane line equation.

[0051] A similarity module is used to predict the similarity between any two lane lines based on the lane line equation.

[0052] The matching cost function module is used to construct a matching cost function based on the similarity.

[0053] The matching cost matrix module is used to obtain the matching cost matrix of the lane line to be matched through the matching cost function;

[0054] The optimal matching module is used to solve the matching cost matrix to obtain the two lane lines with the optimal match.

[0055] The filtering module is used to determine whether the two optimally matched lane lines meet preset conditions, and to match the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces.

[0056] Thirdly, this application provides a computer device.

[0057] This application is achieved through the following technical solution:

[0058] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the lane matching methods described above.

[0059] Fourthly, this application provides a computer-readable storage medium.

[0060] This application is achieved through the following technical solution:

[0061] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the lane matching methods described above.

[0062] In summary, compared with the prior art, the beneficial effects of the technical solution provided in this application include at least the following:

[0063] The similarity between two lane lines is calculated using only the equations of the two lane lines to be matched, and a matching cost function is constructed to predict the matching cost matrix. Compared with the traditional matching matrix constructed based on the rotation matrix R between the captured lane line and the map lane line and the lateral translation variable t, the computation is smaller, the matching speed is faster, and it can be used to match observations of the same lane line at different times and in different spaces, thus having a wider range of applications. It does not require prior acquisition of the matching relationship between the captured lane line points and the corresponding points on the map lane lines, making it simpler to implement. Attached Figure Description

[0064] Figure 1 This is a schematic diagram of the main process of a lane line matching method provided for an exemplary embodiment of this application.

[0065] Figure 2 This is a flowchart illustrating a lane matching method for predicting the similarity between any two lane lines, which is yet another exemplary embodiment of this application.

[0066] Figure 3 This is a structural block diagram of a lane line matching device provided as an exemplary embodiment of this application. Detailed Implementation

[0067] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of this application.

[0068] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0069] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0070] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0071] Reference Figure 1 This application provides a lane line matching method, the main steps of which are described below.

[0072] S1: Identify lane lines in the video frame, use a polynomial curve to represent the lane lines to be matched, and obtain the lane line equation;

[0073] S2: Based on the lane line equation, predict the similarity between any two lane lines;

[0074] S3: Construct a matching cost function based on the similarity;

[0075] S4: Obtain the matching cost matrix of the lane line to be matched through the matching cost function;

[0076] S5: Solve the matching cost matrix to obtain the two lane lines with the best matching;

[0077] S6: Determine whether the two lane lines that are optimally matched meet the preset conditions, and match the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces.

[0078] Specifically, when the vehicle is moving, a camera captures video of the vehicle's movement to obtain lane lines appearing in video footage at different times or in different spaces.

[0079] Based on the target detector, lane lines in the video image are automatically identified, and polynomial curves are used to represent the lane lines to be matched, such as cubic polynomials, quartic polynomials, or quintic polynomials, in order to obtain the lane line equations.

[0080] Based on lane line equations, area integral comparison and distance measurement are performed to predict the similarity between any two lane lines.

[0081] Based on the obtained similarity data, a matching cost function is constructed to increase the similarity factor to quantify the lane lines, which is beneficial for more accurate comparison of lane line matching.

[0082] By using a matching cost function, the matching cost matrix of the lane line to be matched is obtained, so that the matching cost matrix is ​​only associated with the similarity of the lane line to be matched. This is different from the traditional matching matrix constructed based on the rotation matrix R and the lateral translation variable t between the captured lane line and the map lane line. Moreover, it does not require prior knowledge of the matching relationship between the captured lane line point and the corresponding point of the map lane line, making it simpler to implement and requiring less computation.

[0083] Solve for the matching cost matrix, and use one of the Gale-Shapley algorithm, Hungarian algorithm or KM algorithm to perform optimal matching on the matching cost matrix to obtain the two lane lines with the optimal matching.

[0084] Finally, it is determined whether the two optimally matched lane lines meet the preset conditions. The two lane lines that meet the preset conditions are matched as the same lane line at different times or in different spaces, so as to filter out the two lane lines that meet the matching conditions and ensure the accuracy of the matching results.

[0085] In one embodiment, the step of predicting the similarity between any two lane lines based on the lane line equation includes,

[0086] Based on the lane line equation, calculate the difference function between the two lane lines;

[0087] Based on the difference function, calculate the average width of the two lane lines;

[0088] Based on the average width, and combined with the difference function, the normalized loss of the two lane lines is calculated.

[0089] A preset level threshold is used to compare the normalized loss with the level threshold to determine the parallel similarity level between the two lane lines.

[0090] Specifically, the expression for the lane line equation can be:

[0091] l=f(x=c0+c1·x+c2·x 2 +c3·x 3

[0092] In the formula, l represents the lane line, f(x) represents the function value of the lane line equation, and c0, c1, c2 and c3 are constants.

[0093] This application uses a cubic polynomial curve to represent the lane lines appearing in the video image, so as to facilitate the selection of area integration method for solving the equation, and the solution method is simpler.

[0094] Reference Figure 2 For example, let the two lane lines (also known as candidate lines) be l1 and l2, and the third-order polynomial expressions for the two lane lines l1 and l2 are as follows:

[0095] l1=f1(x=c 10 +c 11 ·x+c 12 ·x 2 +c 13 ·x 3

[0096] l2=f2(x=c 20 +c 21 ·x+c 22 ·x 2 +c 23 ·x 3

[0097] In the formula, c 10 c 11 c 12 c 13 c 20 c 21 c 22 and c 23 All are constants.

[0098] Based on the lane line equation, calculate the difference function between any two lane lines. The expression for the difference function is:

[0099] df(x) = f1(x) - f2(x)

[0100] In the formula, df(x) represents the difference function.

[0101] Another lane line l1 has a longitudinal start point of l1.start and an end point of l1.end, and another lane line l2 has a longitudinal start point of l2.start and an end point of l2.end. Then compare the start point a = max(l1.start, l2.start) and compare the end point b = max(min(l1.end, l2.end), a+5) to determine the comparison area [a, b] of the lane lines to be matched.

[0102] The average width of the two lane lines is calculated based on the difference function. The expression for the average width is as follows:

[0103]

[0104] a = max(l1.start, l2.start)

[0105] b=max(min(l1.end, l2.end), a+5)

[0106] In the formula, w represents the average width of any two lane lines, a represents the lower limit of the matching area, b represents the upper limit of the matching area, df(x) represents the difference function, l1.start represents the longitudinal starting point of lane line l1, l1.end represents the longitudinal ending point of lane line l1, l2.start represents the longitudinal starting point of another lane line l2, and l2.end represents the longitudinal ending point of another lane line l2.

[0107] Based on the average width and combined with the difference function, the normalized loss of the two lane lines is calculated. The expression for the normalized loss includes...

[0108]

[0109] In the formula, loss represents the normalized loss, df(x) represents the interpolation function, w represents the average width of any two lane lines, a represents the lower limit of the matching region, and b represents the upper limit of the matching region.

[0110] Preset level threshold, such as setting the level threshold to [T] h T m The normalized loss is compared with the level threshold. If the normalized loss is less than T... h If the parallel similarity level between the two lane lines is high, then the normalized loss is further assessed as being less than T. m If the normalized loss is less than T m If the parallel similarity level between the two lane lines is determined to be medium, then the normalized loss is greater than or equal to T. m If the parallel similarity level between the two lane lines is determined, it is classified as low; thus, the parallel similarity level between the two lane lines is determined to measure the similarity between them. In this application, 1 represents low similarity, 2 represents medium similarity, and 3 represents high similarity.

[0111] The preset level threshold is set based on the similarity (shape) of the lane lines. In this application, the level threshold is set as (constant - similarity value) * base threshold, so that the level threshold setting is more reasonable, and the similarity judgment result between two lane lines is more accurate.

[0112] In one embodiment, the step of constructing a matching cost function based on the similarity includes,

[0113] Based on the average width of the two lane lines, the normalized loss, and the parallel similarity level, a matching cost function is constructed. The expression of the matching cost function includes:

[0114] cost_ij=(abs(w)+loss)*(Z-similarity)

[0115] In the formula, cost_ij represents the matching cost between any two lane lines, w represents the average width between any two lane lines, loss represents the normalized loss between any two lane lines, similarity represents the numerical value representing the parallel similarity level between any two lane lines, and Z>similarity.

[0116] In this embodiment, since 1 represents low similarity, 2 represents medium similarity, and 3 represents high similarity, the value of Z can be 4, so that the matching cost_ij of any two lane lines is negatively correlated with the similarity level, that is, the higher the similarity level, the smaller the cost_ij. In one embodiment, the step of obtaining the matching cost matrix through the matching cost function includes,

[0117] Based on the matching cost function, the matching costs of the two lane lines are obtained;

[0118] A preset cost threshold and an initialized matching cost matrix are used to compare the matching cost with the cost threshold.

[0119] If the matching cost is less than or equal to the cost threshold, then the matching cost is stored sequentially in the matching cost matrix;

[0120] If the matching cost is greater than the cost threshold, the matching cost is uniformly reset to a new element and then stored in the matching cost matrix. The new element is different from all other elements stored in the matching cost matrix.

[0121] Specifically, suppose we obtain two sets of lane lines X and Y that need to be matched from video footage appearing at different times or in different spaces. Among them, the X set has m lane lines {x1,x2,...,xm}, and the Y set has n lane lines {y1,y2,...,yn}.

[0122] Choose one lane line from each of groups X and Y, such as xi (i ≥ 1 and ≤ m) and yj (j ≥ 1 and ≤ n). Calculate the average width and normalized loss of these two lane lines to measure their similarity. Construct a matching cost function corresponding to the two lane lines to obtain the matching cost cost_ij.

[0123] The preset cost threshold cost_thresh and the initialization of the matching cost matrix C are determined by the number of lane lines in the two sets to be matched, such as m rows and n columns.

[0124] The matching costs corresponding to the two selected lane lines are compared with the cost threshold.

[0125] If the matching cost is less than or equal to the cost threshold, meaning the two lanes are relatively well matched, then the matching cost is stored in position (i, j) of the matching cost matrix.

[0126] If the matching cost is greater than the cost threshold, meaning the matching degree between the two lanes does not meet the requirements, the matching cost will be uniformly reset to a new element and stored in the matching cost matrix. The new element is different from all other elements stored in the matching cost matrix.

[0127] To simplify calculations, if the matching cost is greater than the cost threshold, the matching cost is uniformly reset to a large number, such as 100, to better distinguish lane lines whose matching cost is less than or equal to the cost threshold, and to reduce the interference and confusion of lane lines that do not meet the matching requirements on subsequent matching algorithms.

[0128] After all traversals and calculations are completed, an m-row, n-column matching cost matrix C is obtained, which is a weighted bipartite graph where lane lines are vertices and the matching cost_ij of two lane lines represents the weight of the edge between these two vertices.

[0129] In one embodiment, the step of solving the matching cost matrix to obtain the two optimally matched lane lines includes,

[0130] The KM algorithm is used to solve the matching cost matrix to obtain the total matching cost of the two lane lines;

[0131] The two lane lines corresponding to the minimum total matching cost are selected as the two lane lines for optimal matching.

[0132] By employing the KM algorithm to solve the maximum weight matching under the optimal matching in bipartite graph matching, the total matching cost of two lane lines is obtained. The two lane lines corresponding to the minimum total matching cost are then taken as the optimal matching among multiple lane lines, thus obtaining the optimal matching solution and making the matching results more accurate.

[0133] In one embodiment, the step of determining whether the two optimally matched lane lines meet preset conditions, and matching the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces, includes:

[0134] A preset ideal threshold is used to compare the total matching cost corresponding to the two optimally matched lane lines with the ideal threshold.

[0135] If the total matching cost corresponding to the two optimally matched lane lines is less than or equal to the ideal threshold, then the two lane lines will be matched as the same lane line at different times or in different spaces.

[0136] If the total matching cost corresponding to the two lane lines of the optimal match is greater than the ideal threshold, then the match fails by default.

[0137] Specifically, the smaller the ideal threshold, the more difficult it is to match, while the larger the preset level threshold, the easier it is to match. Considering the actual matching accuracy requirements, the ideal threshold is designed based on human experience, and the relationship between the total matching cost corresponding to the two lane lines with the best match and the ideal threshold is compared.

[0138] If the total matching cost of the two optimally matched lane lines is less than or equal to the ideal threshold, meaning the matching accuracy meets the requirements, then the two lane lines are matched as the same lane line at different times or in different spaces. For example, if xi and yj are a successful match, then xi and yj are considered to be the same lane line, just observed at different times or in different spaces.

[0139] If the total matching cost corresponding to the two lane lines of the optimal match is greater than the ideal threshold, the match is considered to have failed by default, so as to remove the matching relationship whose total matching cost does not meet the matching accuracy requirement from the optimal matching solution.

[0140] In summary, this lane matching method calculates the similarity between two lane lines using only their equations and constructs a matching cost function to predict the matching cost matrix. Compared to traditional matching matrices constructed based on the rotation matrix R and lateral translation variable t between the captured lane line and the map lane line, this method requires less computation, has a faster matching speed, and can be used to match observations of the same lane line at different times and in different spaces, thus having a wider range of applications. Furthermore, it does not require prior knowledge of the matching relationship between the captured lane line points and their corresponding points on the map lane lines, making it simpler to implement.

[0141] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0142] Reference Figure 3 This application also provides a lane line matching device, which corresponds one-to-one with the lane line matching method described in the above embodiments. The lane line matching device includes...

[0143] The lane line representation module is used to identify lane lines in the video image, and uses a polynomial curve to represent the lane line to be matched to obtain the lane line equation.

[0144] A similarity module is used to predict the similarity between any two lane lines based on the lane line equation.

[0145] The matching cost function module is used to construct a matching cost function based on the similarity.

[0146] The matching cost matrix module is used to obtain the matching cost matrix through the matching cost function;

[0147] The optimal matching module is used to solve the matching cost matrix to obtain the two lane lines with the optimal match.

[0148] The filtering module is used to determine whether the two optimally matched lane lines meet preset conditions, and to match the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces.

[0149] For specific limitations regarding a lane matching device, please refer to the limitations of a lane matching method described above, which will not be repeated here. Each module in the aforementioned lane matching device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0150] In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements any of the lane matching methods described above.

[0151] In one embodiment, a computer-readable storage medium is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0152] S1: Identify lane lines in the video frame, use a polynomial curve to represent the lane lines to be matched, and obtain the lane line equation;

[0153] S2: Based on the lane line equation, predict the similarity between any two lane lines;

[0154] S3: Construct a matching cost function based on the similarity;

[0155] S4: Obtain the matching cost matrix of the lane line to be matched through the matching cost function;

[0156] S5: Solve the matching cost matrix to obtain the two lane lines with the best matching;

[0157] S6: Determine whether the two lane lines that are optimally matched meet the preset conditions, and match the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces.

[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0159] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.

Claims

1. A lane line matching method, characterized in that, Includes the following steps, Lane lines in a video frame are identified, and the lane lines to be matched are represented by polynomial curves to obtain lane line equations. Based on the lane line equations, the similarity between any two lane lines is predicted. Based on the similarity, a matching cost function is constructed; the matching cost matrix of the lane lines to be matched is obtained through the matching cost function; the matching cost matrix is ​​solved to obtain the two optimal matching lane lines; it is determined whether the two optimal matching lane lines meet the preset conditions, and the two lane lines that meet the preset conditions are matched as the same lane line at different times or in different spaces. The step of predicting the similarity between any two lane lines based on the lane line equation includes: calculating a difference function between the two lane lines based on the lane line equation; calculating the average width of the two lane lines based on the difference function; calculating a normalized loss for the two lane lines based on the average width and the difference function; comparing the normalized loss with a preset level threshold to determine the parallel similarity level between the two lane lines; and constructing a matching cost function based on the similarity includes: constructing a matching cost function based on the average width, the normalized loss, and the parallel similarity level of the two lane lines, wherein the expression of the matching cost function includes... cost_ij =(abs(w)+ loss ) * (Z - similarity), where, cost_ij Let represent the matching cost between any two lane lines, and w represent the average width of any two lane lines. loss Z represents the normalized loss between any two lane lines, and similarity represents the numerical value representing the parallel similarity level between any two lane lines, where Z>similarity; the expression for the average width includes... , a=max ( l 1. start , l 2. start ), b=max (min( l 1. end , l 2. end ), a +5), where w represents the average width of any two lane lines. a Indicates the lower limit of the matching region. b Indicates the upper limit of the matching region. df (x) represents the difference function. l 1. start Indicates a lane line l The longitudinal starting point of 1, l 1. end Indicates a lane line l The longitudinal termination point of 1, l 2. start Indicates another lane line l The longitudinal starting point of 2, l 2. end Indicates another lane line l The longitudinal termination point of 2; the expression for the normalized loss includes, In the formula, loss Indicates normalized loss. df (x) represents the difference function, and w represents the average width of any two lane lines. a Indicates the lower limit of the matching region. b This indicates the upper limit of the matching region.

2. The lane line matching method according to claim 1, characterized in that, The step of obtaining the matching cost matrix of the lane line to be matched using the matching cost function includes: Based on the matching cost function, the matching costs of the two lane lines are obtained; A preset cost threshold and an initialized matching cost matrix are used to compare the matching cost with the cost threshold. If the matching cost is less than or equal to the cost threshold, then the matching cost is stored in the matching cost matrix; If the matching cost is greater than the cost threshold, the matching cost is uniformly reset to a new element and then stored in the matching cost matrix. The new element is different from all other elements stored in the matching cost matrix.

3. The lane line matching method according to claim 1, characterized in that, The steps for solving the matching cost matrix to obtain the two optimally matched lane lines include: The KM algorithm is used to solve the matching cost matrix to obtain the total matching cost of the two lane lines; The two lane lines corresponding to the minimum total matching cost are selected as the two lane lines for optimal matching.

4. The lane line matching method according to claim 3, characterized in that, The step of determining whether the two optimally matched lane lines meet preset conditions, and matching the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces, includes: A preset ideal threshold is used to compare the total matching cost corresponding to the two optimally matched lane lines with the ideal threshold. If the total matching cost corresponding to the two optimally matched lane lines is less than or equal to the ideal threshold, then the two lane lines will be matched as the same lane line at different times or in different spaces. If the total matching cost corresponding to the two lane lines of the optimal match is greater than the ideal threshold, then the match fails by default.

5. A lane line matching device, characterized in that, include, The lane line representation module is used to identify lane lines in the video image, and uses a polynomial curve to represent the lane line to be matched to obtain the lane line equation. A similarity module is used to predict the similarity between any two lane lines based on the lane line equation, including calculating the difference function between the two lane lines based on the lane line equation. Based on the difference function, calculate the average width of the two lane lines; based on the average width, and in conjunction with the difference function, calculate the normalized loss of the two lane lines. A preset level threshold is used to compare the normalized loss with the level threshold to determine the parallel similarity level between the two lane lines; The matching cost function module is used to construct a matching cost function based on the similarity, including constructing the matching cost function based on the average width of the two lane lines, the normalized loss, and the parallel similarity level. The expression of the matching cost function includes... cost_ij =(abs(w)+ loss ) * (Z - similarity) In the formula, cost_ij Let represent the matching cost between any two lane lines, and w represent the average width of any two lane lines. loss Z represents the normalized loss between any two lane lines, and similarity represents the numerical value representing the parallel similarity level between any two lane lines, where Z>similarity; the expression for the average width includes... , a=max ( l 1. start , l 2. start ), b=max (min( l 1. end , l 2. end ), a +5), where w represents the average width of any two lane lines. a Indicates the lower limit of the matching region. b Indicates the upper limit of the matching region. df (x) represents the difference function. l 1. start Indicates a lane line l The longitudinal starting point of 1, l 1. end Indicates a lane line l The longitudinal termination point of 1, l 2. start Indicates another lane line l The longitudinal starting point of 2, l 2. end Indicates another lane line l The longitudinal termination point of 2; the expression for the normalized loss includes, In the formula, loss Indicates normalized loss. df (x) represents the difference function, and w represents the average width of any two lane lines. a Indicates the lower limit of the matching region. b Indicates the upper limit of the matching region; The matching cost matrix module is used to obtain the matching cost matrix of the lane line to be matched through the matching cost function; The optimal matching module is used to solve the matching cost matrix to obtain the two lane lines with the optimal match. The filtering module is used to determine whether the two optimally matched lane lines meet preset conditions, and to match the two lane lines that meet the preset conditions as the same lane line at different times or in different spaces.

6. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 4.