Lane detection method, device, electronic device, storage medium and program product
By using the Manhattan distance reference value to segment the lane line and constructing the moving curve equation in the lane line detection method, the problems of insufficient detection capabilities and detection errors of lateral cameras in the prior art are solved, and efficient and accurate detection of lane lines in different directions are achieved.
Patent Information
- Application Number
- CN202111016013.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2041-08-31
AI Technical Summary
The existing lane line detection method does not have the detection capability of the lateral lane line to be detected by the lateral camera, and the detection is prone to errors or requires the multi-directional image to be fused and converted into a top view before detection.
By obtaining the forward or horizontal lane line image to be detected, selecting the reference starting point and end point of the lane line, image segmentation is performed based on the preset Manhattan distance reference value, the movement curve equation of multiple line segments is constructed, and the trajectory of the lane line is determined in combination with the curve detection algorithm.
It realizes efficient and accurate detection of lane lines to be detected in different directions, avoids errors in image detection of lateral cameras, and does not need to fusion of multi-direction images, which improves the accuracy of detection.
Smart Images

Figure CN113887298B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent assisted driving technology, and in particular to a lane line detection method, device, electronic equipment, storage medium and program product. Background Art
[0002] When driving, especially when maintaining a safe lateral distance, changing lanes, or overtaking, all kinds of cars need to determine the lane lines in front and on both sides. A slight mistake may cause a traffic accident. Therefore, the decision-making process of competing for lane rights, occupying and giving up lane rights in intelligent assisted driving requires an important prerequisite, which is the need to detect lane lines.
[0003] The common lane line detection method mainly uses a forward camera to detect lane lines. The above detection method refers to the forward camera obtaining the forward lane line image to be detected, and applying the corresponding forward image processing method to detect the trajectory of the lane line. Although this method can detect lane lines, once the forward camera is damaged or installed unstably, it is very easy to cause errors in lane line detection. In addition, various cars are equipped with side cameras. Since the side cameras will reverse the horizontal coordinates and vertical coordinates (UV coordinates) of the lane line detection, the above detection method does not have the ability to detect the lateral lane line image to be detected obtained by the side camera.
[0004] Some people have also proposed a method for detecting lane lines based on multiple directions. However, this method requires fusing the lane line images to be detected in multiple directions and then transforming them into a bird's-eye view image before lane line detection can be performed on the bird's-eye view image. In addition, the starting point and end point of a line segment are predicted in each cell detection layer. The operation is relatively complicated, and the accuracy of lane line detection by this method is not high.
[0005] Therefore, there is an urgent need for a lane line detection method that can overcome the above-mentioned defects. Summary of the invention
[0006] The present invention provides a lane line detection method, device, electronic device, storage medium and program product, which are used to overcome the defects of common lane line detection methods in the prior art, such as the lack of detection capability for lateral lane lines to be detected by lateral cameras, prone to detection errors or requiring top view images transformed after multi-directional fusion for detection, so as to achieve efficient and accurate detection of lane lines to be detected in different directions.
[0007] The present invention provides a lane line detection method, comprising:
[0008] S10, acquiring a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected;
[0009] S20, selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line;
[0010] S30, based on a preset Manhattan distance reference value, performing image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments;
[0011] S40, constructing corresponding movement curve equations for the multiple line segments respectively;
[0012] S50: Determine the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm.
[0013] According to the lane line detection method provided by the present invention, the step S50, determining the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments, combined with a curve detection algorithm, includes:
[0014] S51, selecting a line segment from the multiple line segments as the current line segment, and determining an initial starting point of the current line segment, and based on the initial starting point of the current line segment, predicting a quantization error from the initial starting point of the current line segment to a center point corresponding to its actual position, so as to obtain a corrected starting point of the current line segment by adding the quantization error from the initial starting point of the current line segment to the center point corresponding to its actual position to the initial starting point of the current line segment;
[0015] S52, predicting the moving direction deviation between the correction starting point of the current line segment and the current end point of the lane line based on the correction starting point of the current line segment, so as to predict the current end point of the lane line, and controlling the moving point to move from the correction starting point of the current line segment to the direction of the current end point of the lane line according to the moving curve equation corresponding to the current line segment by a Manhattan distance reference value to reach the end point of the current line segment;
[0016] S53, determining whether the corrected starting point of the current line segment falls within a preset termination condition range; if so, stopping the loop, and adding the current termination point of the lane line predicted by the corrected starting point of the current line segment to a candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, continuing to loop to the next step;
[0017] S54, taking the end point of the current line segment as the initial starting point of the next line segment, predicting the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position based on the initial starting point of the next line segment, so as to obtain the corrected starting point of the next line segment by adding the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position to the initial starting point of the next line segment;
[0018] S55, predicting the moving direction deviation between the correction starting point of the next line segment and the next end point of the lane line based on the correction starting point of the next line segment, so as to predict the next end point of the lane line, and controlling the moving point to move from the correction starting point of the next line segment to the direction of the next end point of the lane line according to the moving curve equation corresponding to the next line segment by a Manhattan distance reference value to reach the end point of the next line segment;
[0019] S56, determining whether the corrected starting point of the next line segment falls within the preset termination condition range; if so, stopping the loop, and adding the next termination point of the lane line predicted by the corrected starting point of the next line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, continuing to loop to the next step;
[0020] S57, repeating the above steps S51-S56 until the moving direction deviation between the correction starting point of the last line segment and the last end point of the lane line is predicted based on the correction starting point of the last line segment, so as to predict the last end point of the lane line, and controlling the moving point to move from the correction starting point of the last line segment to the direction of the last end point of the lane line according to the moving curve equation corresponding to the last line segment by a Manhattan distance reference value to reach the end point of the last line segment;
[0021] S58, determining whether the corrected starting point of the last line segment falls within the preset termination condition range; if so, stopping the loop, and adding the final termination point of the lane line predicted by the corrected starting point of the last line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, returning to step S51 to continue the loop;
[0022] S59, determining the trajectory of the lane line based on the reference starting point of the lane line, the correction starting points of each line segment, and the final ending point of the lane line selected from the candidate list.
[0023] According to the lane line detection method provided by the present invention, the S30, based on a preset Manhattan distance reference value, performs image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments, includes:
[0024] Obtain lane line detection requirements;
[0025] Based on the lane detection requirement, a fixed step size is pre-determined as a Manhattan distance reference value;
[0026] Performing image segmentation on the lane line between the reference starting point and the reference ending point according to the Manhattan distance reference value to obtain a plurality of segmented line segments;
[0027] Among them, each line segment corresponds to a Manhattan distance benchmark value.
[0028] According to the lane line detection method provided by the present invention, in S40, when constructing the corresponding moving curve equations for the multiple line segments respectively, each key point in each line segment must participate in the calculation process of the moving curve equation, and the direction order in which each key point in each line segment participates in the calculation is: from the bottom to the top of the image or from the left to the right of the image.
[0029] According to the lane line detection method provided by the present invention, the moving direction deviation includes a horizontal coordinate deviation and a vertical coordinate deviation.
[0030] According to the lane line detection method provided by the present invention, the preset termination condition range refers to: a circular area range of a preset radius with the final termination point of the lane line as the center;
[0031] The calculation formula of the preset radius is:
[0032] Preset radius=(length of the lane line image to be detected+width of the lane line image to be detected) / preset Manhattan distance reference value.
[0033] The present invention also provides a lane line detection device, comprising:
[0034] An acquisition module, used to acquire a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected;
[0035] A selection module, used for selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line;
[0036] A detection module, configured to perform image segmentation on the lane line between the reference starting point and the reference ending point based on a preset Manhattan distance reference value to obtain a plurality of segmented line segments;
[0037] An equation construction module, used to construct corresponding movement curve equations for the plurality of line segments respectively;
[0038] The trajectory determination module is used to determine the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm.
[0039] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, all or part of the steps of the lane line detection method as described in any one of the above items are implemented.
[0040] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements all or part of the steps of the lane line detection method as described in any one of the above items.
[0041] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, all or part of the steps of the lane line detection method as described in any one of the above items are implemented.
[0042] The present invention provides a lane line detection method, device, electronic device, storage medium and program product. The method obtains a lane line image to be detected including a forward lane line image to be detected and / or a lateral lane line image to be detected, selects a lane line in the lane line image to be detected as the lane line to be currently detected, and identifies a reference starting point and a reference ending point of the lane line, and then performs image segmentation on the lane line based on a preset Manhattan distance reference value to obtain a plurality of segmented line segments, respectively constructs corresponding moving curve equations for the plurality of line segments, and determines the trajectory of the lane line based on the plurality of line segments and the corresponding moving curve equations of the plurality of line segments in combination with a curve detection algorithm. That is, the method is a universal lane line detection method applicable to the detection process of lane line images to be detected collected by cameras in various directions, and does not need to fuse lane line images in different directions, but can directly perform lane line detection on various images based on the same processing method network, and can also effectively improve the accuracy of lane line detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 This is one of the flow charts of the lane line detection method provided by the present invention;
[0045] Figure 2 This is the second flow chart of the lane line detection method provided by the present invention;
[0046] Figure 3 It is a structural schematic diagram of the lane line detection device provided by the present invention;
[0047] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention.
[0048] Reference numerals:
[0049] 310: acquisition module; 320: selection module; 330: detection module; 340: equation building module; 350: trajectory determination module; 410: processor; 420: communication interface; 430: memory; 440: communication bus. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] The following is combined with Figure 1-4 The lane line detection method, device, electronic device, storage medium and program product provided by the present invention are described in detail.
[0052] The present invention provides a lane line detection method. Figure 1 is one of the flow charts of the lane line detection method provided by the present invention, such as Figure 1 As shown, the method includes:
[0053] S10, acquiring a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected;
[0054] S20, selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line;
[0055] S30, based on a preset Manhattan distance reference value, performing image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments;
[0056] S40, constructing corresponding movement curve equations for the multiple line segments respectively;
[0057] S50: Determine the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm.
[0058] Among them, the forward lane line image to be detected refers to the image with the lane line to be detected acquired by the forward camera and related sensors, and the lateral lane line image to be detected refers to the image with the lane line to be detected acquired by the lateral camera and related sensors. The lane line detection method of the present invention can perform lane line detection on the forward lane line image to be detected alone, and can also perform lane line detection on the lateral lane line image to be detected alone, and can also perform lane line detection on two different images at the same time, and even this method can detect the lane line image to be detected in any direction acquired by the vehicle-mounted camera installed in any other direction.
[0059] Moreover, the Manhattan distance reference value is a Manhattan distance with a preset fixed step size. Based on the preset Manhattan distance reference value, the lane line between the reference starting point and the reference end point is segmented to obtain multiple segmented line segments, which can be understood as segmenting a whole lane line to be detected in the image according to the size of multiple identical Manhattan distance reference values (corresponding to the sum of the length and width of a line segment) to segment the lane line into multiple line segments.
[0060] Furthermore, for each of the multiple line segments, a corresponding moving curve equation is constructed respectively, which can also be understood as performing corresponding param prediction for the line segment within each Manhattan distance defined by the Manhattan distance reference value, and the param prediction process needs to be performed based on the starting point of the line segment itself.
[0061] The various embodiments of the present invention are described by taking the example that the lane line image to be detected includes only one lane line to be detected, but the lane line image to be detected may include multiple images, and each image may include multiple lane lines to be detected. In this scenario, the method detects each lane line to be detected independently at the same time, and since each lane line to be detected has its own clear trajectory, there is no mutual interference between the detection processes of each lane line to be detected, and all can be carried out smoothly.
[0062] The lane line detection method provided by the present invention obtains a lane line image to be detected including a forward lane line image to be detected and / or a lateral lane line image to be detected, selects a lane line in the lane line image to be detected as the lane line to be currently detected, and identifies a reference starting point and a reference ending point of the lane line, and then performs image segmentation on the lane line based on a preset Manhattan distance reference value to obtain a plurality of segmented line segments, constructs corresponding moving curve equations for the plurality of line segments respectively, and determines the trajectory of the lane line based on the plurality of line segments and the corresponding moving curve equations of the plurality of line segments in combination with a curve detection algorithm, that is, the method is a universal lane line detection method applicable to the detection process of lane line images to be detected collected by cameras in various directions, and does not need to fuse lane line images in different directions, but can directly perform lane line detection on various images based on the same processing method network, and can also effectively improve the accuracy of lane line detection.
[0063] According to the lane line detection method provided by the present invention, Figure 2 This is the second flow chart of the lane line detection method provided by the present invention, such as Figure 2 As shown, in Figure 1 On the basis of the illustrated embodiment, the step S50, based on the multiple line segments and the movement curve equations corresponding to the multiple line segments, combined with a curve detection algorithm, determines the trajectory of the lane line, including:
[0064] S51, selecting a line segment from the multiple line segments as the current line segment, and determining the starting point of the current line segment, and predicting the quantization error from the initial starting point of the current line segment to the center point corresponding to its actual position based on the initial starting point of the current line segment, so as to obtain the corrected starting point of the current line segment by adding the quantization error from the initial starting point of the current line segment to the center point corresponding to its actual position to the initial starting point of the current line segment;
[0065] S52, predicting the moving direction deviation between the correction starting point of the current line segment and the current end point of the lane line based on the correction starting point of the current line segment, so as to predict the current end point of the lane line, and controlling the moving point to move from the correction starting point of the current line segment to the direction of the current end point of the lane line according to the moving curve equation corresponding to the current line segment by a Manhattan distance reference value to reach the end point of the current line segment;
[0066] S53, determining whether the corrected starting point of the current line segment falls within a preset termination condition range; if so, stopping the loop, and adding the current termination point of the lane line predicted by the corrected starting point of the current line segment to a candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, continuing to loop to the next step;
[0067] S54, taking the end point of the current line segment as the initial starting point of the next line segment, predicting the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position based on the initial starting point of the next line segment, so as to obtain the corrected starting point of the next line segment by adding the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position to the initial starting point of the next line segment;
[0068] S55, predicting the moving direction deviation between the correction starting point of the next line segment and the next end point of the lane line based on the correction starting point of the next line segment, so as to predict the next end point of the lane line, and controlling the moving point to move from the correction starting point of the next line segment to the direction of the next end point of the lane line according to the moving curve equation corresponding to the next line segment by a Manhattan distance reference value to reach the end point of the next line segment;
[0069] S56, determining whether the corrected starting point of the next line segment falls within the preset termination condition range; if so, stopping the loop, and adding the next termination point of the lane line predicted by the corrected starting point of the next line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, continuing to loop to the next step;
[0070] S57, repeating the above steps S51-S56 until the moving direction deviation between the correction starting point of the last line segment and the last end point of the lane line is predicted based on the correction starting point of the last line segment, so as to predict the last end point of the lane line, and controlling the moving point to move from the correction starting point of the last line segment to the direction of the last end point of the lane line according to the moving curve equation corresponding to the last line segment by a Manhattan distance reference value to reach the end point of the last line segment;
[0071] S58, determining whether the corrected starting point of the last line segment falls within the preset termination condition range; if so, stopping the loop, and adding the final termination point of the lane line predicted by the corrected starting point of the last line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, returning to step S51 to continue the loop;
[0072] S59, determining the trajectory of the lane line based on the reference starting point of the lane line, the correction starting points of each line segment, and the final ending point of the lane line selected from the candidate list.
[0073] Specifically, in step S51, the reference starting point A and the reference ending point B of the lane line to be detected are recorded, and the lane line to be detected is divided into multiple line segments. And each line segment has constructed the moving curve equation corresponding to the line segment. Select any one of the multiple line segments as the current line segment. Of course, the first line segment of the multiple line segments can also be selected as the current line segment, and the second line segment is the next line segment of the first line segment, and so on. The multiple line segments include the first line segment, the second line segment, the third line segment...the nth line segment. And, when the first line segment is selected as the current line segment, the reference starting point A of the lane line is the same as the starting point a1 of the first line segment. The moving curve equations are recorded as: θ (starting point of the line segment), that is, the curve equation corresponding to the first line segment is θ(a1), the curve equation corresponding to the second line segment is θ(a2),..., the curve equation corresponding to the nth line segment is θ(a n ).
[0074] The initial starting point of the first line segment is also the reference starting point of the lane line, and detection starts from this point. At the same time, it is assumed that the initial starting point of the first line segment and the correction starting point are at the same position, or it is understood that the quantization error between the initial starting point of the first line segment and the correction starting point of the first line segment is 0.
[0075] It should also be noted that the center point corresponding to its actual position refers to the point on the center line between the initial starting point of the current line segment and the actual position of the current line segment correction starting point. The quantization error refers to the quantization error between the initial starting point of the current line segment and the center point corresponding to its actual position.
[0076] Based on the initial starting point of the first line segment, predict the quantization error (Δ a1 x,Δ a1 y), the quantization error (Δ a1 x,Δ a1y), the correction starting point of the first line segment is obtained, and the quantization error between the initial starting point of the first line segment and the correction starting point of the first line segment is 0, so the correction starting point a1 of the first line segment is recorded;
[0077] Based on the correction starting point a1 of the first line segment, the moving direction deviation (d a1 x,d a1 y), to predict the first end point (x n1 ,y n1 ), and control the moving point (movable key point) on the first line segment, from the correction starting point a1 of the first line segment to the first end point (x) of the lane line according to the moving curve equation θ(a1) corresponding to the first line segment. n1 ,y n1 ), the moving point reaches the end point b1 of the first line segment after moving a Manhattan distance benchmark value.
[0078] Determine whether the correction starting point a1 of the first line segment falls within the preset termination condition range, where the preset termination condition range refers to the predicted final termination point of the lane line (in this case, the first termination point (x n1 ,y n1 )) is the circular area formed by a specific radius of the center of the circle; if it falls into the circular area, it proves that it is very close to the real end point of the lane line, then the loop is stopped, and the first end point (x n1 ,y n1 ) is added to the candidate list of lane line endpoints to participate in the voting count, and the lane line endpoint with the most votes is selected from the candidate list as the final lane line endpoint. At this time, only the first endpoint (x n1 ,y n1 ) is selected as the final end point of the lane line. Therefore, at this point, it is considered that the final end point of the lane line has been found.
[0079] If the correction starting point a1 of the first line segment does not fall within the preset termination condition range, the next step is continuously executed in a loop.
[0080] Calculate the starting point of the second line segment (the starting point after quantization deviation correction, which is different from the original starting point of the segmented second line segment). Take the end point b1 of the first line segment as the initial starting point of the second line segment, and predict the quantization error (Δ a2 x,Δ a2y), the correction starting point a2 of the second line segment is obtained by adding the quantization error from the initial starting point of the second line segment to the center point corresponding to its actual position, that is, the position coordinate of a2 = the position coordinate of b1 + (Δ a2 x,Δ a2 y). Based on the correction starting point a2 of the second line segment, the moving direction deviation (d a2 x,d a2 y), to predict the second end point (x n2 ,y n2 ), and control the moving point on the second line segment, from the correction starting point a2 of the second line segment to the second end point (x) of the lane line according to the moving curve equation θ(a2) corresponding to the second line segment n2 ,y n2 ), the moving point reaches the end point b2 of the second line segment after moving a Manhattan distance benchmark value.
[0081] Determine whether the correction starting point a2 of the second line segment falls within the preset termination condition range; wherein the preset termination condition range refers to the predicted final termination point of the lane line (in this case, the first termination point (x n1 ,y n1 ) or the second end point (x n2 ,y n2 )) is the circular area formed by a specific radius of the center; if it falls into the circular area, it proves that it is very close to the real end point of the lane line, then the loop is stopped, and the second end point (x n2 ,y n2 ) is also added to the candidate list of lane line end points to participate in the voting count, and the lane line end point with the most votes is selected from the candidate list as the final end point of the lane line. At this time, the candidate list contains the first end point (x n1 ,y n1 ) and the second end point (x n2 ,y n2 ) The two predicted lane line endpoints, and the probability of selecting one of the two endpoints as the final endpoint based on the voting mechanism is the same, both 1 / 2. For example, the second endpoint (x n2 ,y n2 ) as the final end point of the lane line. And when a termination point is selected as the final termination point, the center of the preset termination condition range is the termination point. At this time, it is also considered that the final termination point of the lane line has been found.
[0082] If the correction starting point a2 of the second line segment does not fall within the preset termination condition range, the next step is continued.
[0083] Calculate the starting point of the third line segment (the starting point after quantization deviation correction). Take the end point b2 of the second line segment as the initial starting point of the third line segment, and predict the quantization error (Δ a3 x,Δ a3 y), the correction starting point a3 of the third line segment is obtained by adding the quantization error from the initial starting point of the third line segment to the center point corresponding to its actual position, that is, the position coordinate of a3 = the position coordinate of b2 + (Δ a3 x,Δ a3 y).
[0084] The moving direction deviation (d) between the correction starting point a2 of the second line segment and the third end point of the lane line is predicted based on the correction starting point a3 of the third line segment. a3 x,d a3 y), to predict the third end point (x n3 ,y n3 ), and control the moving point on the third line segment, from the correction starting point a3 of the third line segment to the third end point (x) of the lane line according to the moving curve equation θ(a3) corresponding to the third line segment n3 ,y n3 ), the moving point reaches the end point b3 of the third line segment after moving a Manhattan distance benchmark value.
[0085] Determine whether the correction starting point a3 of the third line segment falls within the preset termination condition range; wherein the preset termination condition range refers to the predicted final termination point of the lane line (in this case, the first termination point (x n1 ,y n1 ) or the second end point (x n2 ,y n2 ) or the third end point (x n3 ,y n3 )) is the circular area formed by a specific radius of the center; if it falls into it, it proves that it is very close to the real end point of the lane line, then the loop is stopped, and the third end point (x n3 ,y n3 ) is also added to the candidate list of lane line end points to participate in the voting count, and the lane line end point with the most votes is selected from the candidate list as the final end point of the lane line. At this time, the candidate list contains the first end point (x n1 ,y n1 ) and the second end point (xn2 ,y n2 ) and the third end point (x n3 ,y n3 ) The three predicted lane line endpoints. At this time, the one with the highest number of votes is selected from the three endpoints based on the voting mechanism as the final endpoint, for example, the second endpoint with the highest number of votes (x n2 ,y n2 ) as the final end point of the lane line. And when a termination point is selected as the final termination point, the center of the preset termination condition range is the termination point, that is, the center of the preset termination condition range is the second termination point (x n2 ,y n2 ). At this point, it is also considered that the final end point of the lane line has been found.
[0086] If the correction starting point a3 of the third line segment still does not fall within the preset termination condition range, the next step is continued.
[0087] Repeat the above steps.
[0088] Correction starting point a based on the nth line segment (the last line segment) n Predict the moving direction deviation (d an x,d an y), to predict the nth end point of the lane line (x nn ,y nn )(final end point), and control the moving point on the nth line segment, from the correction starting point a of the nth line segment n According to the moving curve equation θ(a n ) to the nth end point (x nn ,y nn ), the moving point reaches the end point b of the nth line segment after moving a Manhattan distance benchmark value n . .
[0089] Determine the correction starting point a of the nth line segment n Whether it falls within the preset termination condition range; wherein the preset termination condition range refers to the predicted final termination point of the lane line (in this case, the first termination point (x n1 ,y n1 ) or the second end point (x n2 ,y n2 ) or the third end point (x n3 ,y n3 )... or the nth end point (x nn ,y nn)) is the circular area formed by a specific radius of the center of the circle; if it falls into it, it proves that it is very close to the actual end point of the lane line, then the loop is stopped and the correction starting point a of the nth line segment is set to n The predicted nth end point of the lane line (x nn ,y nn ) is also added to the candidate list of lane line end points to participate in the voting count, and the lane line end point with the most votes is selected from the candidate list as the final end point of the lane line. At this time, the candidate list contains the first end point (x n1 ,y n1 ) and the second end point (x n2 ,y n2 ) and the third end point (x n3 ,y n3 )... and the nth end point (x nn ,y nn ) The n predicted lane line endpoints. At this time, the one with the highest number of votes is selected from the n endpoints based on the voting mechanism as the final endpoint, for example, the third endpoint with the highest number of votes (x n3 ,y n3 ) as the final end point of the lane line. And when a termination point is selected as the final termination point, the center of the preset termination condition range is the termination point, that is, the center of the preset termination condition range is the third termination point (x n3 ,y n3 ). At this point, it is also considered that the final end point of the lane line has been found.
[0090] If the starting point a of the nth line segment n If it still does not fall within the preset termination condition range, it proves that the lane line detection process cycle is terminated, and the final termination point of the lane line has not been found. At this time, return to step S51 and re-execute the entire lane line detection process to continue the cycle.
[0091] In each of the above effective loop judgment steps, an accurate final end point of the lane line is determined. For example, when the starting point of the first line segment falls within the end condition range, the first end point of the lane line (x n1 ,y n1 ) is the final end point of the lane line. Alternatively, when the starting point of the first line segment does not fall within the end condition range, and the starting point of the second line segment falls within the end condition range, the second end point of the lane line (x n2 ,y n2 ) is the final end point of the lane line. Alternatively, when the starting point of the first line segment does not fall within the end condition range, and the starting point of the second line segment does not fall within the end condition range, and the starting point of the third line segment falls within the end condition range, the second end point of the lane line (xn2 ,y n2 ) is the final end point of the lane line. ... That is, the above detection process can accurately predict a predicted end point of the lane line, which is called the final end point of the lane line. Finally, based on the reference starting point A of the lane line, the starting points a1, a2, a3...a n The final end point of the lane line is determined, and the trajectory of the lane line is smoothly drawn, that is, the lane line detection process is completed.
[0092] It should also be noted that the predicted moving curve equations corresponding to each line segment in the above embodiments, the quantization error from the initial starting point of the current line segment to the center point corresponding to its actual position, and the moving direction deviation between the corrected starting point of the current line segment and the current end point of the lane line, etc., are all obtained by calculating and outputting the same processing method network combined with the neural network algorithm. And the processing method network also outputs a thermal diagram representing the position of the initial starting point of each line segment when necessary, so as to provide an effective reference for relevant personnel in their research.
[0093] The lane line detection method provided by the embodiment of the present invention continuously corrects the starting point of each line segment by using the initial starting point of the line segment to predict the quantization error of the center point corresponding to its actual position, thereby forming a cyclic correction process, and continuously starts from a new starting point to move according to the corresponding curve equation, and finally finds multiple end points of the lane line, and combines each cycle process, each time finds the most accurate end point from the continuously updated candidate list as the final end point, so that the lane line can be smoothly drawn based on the aforementioned points and the final end point. The method has small error, easy operation, and effectively improves the accuracy of lane line detection as a whole.
[0094] According to the lane line detection method provided by the present invention, the S30, based on a preset Manhattan distance reference value, performs image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments, includes:
[0095] Obtain lane line detection requirements;
[0096] Based on the lane detection requirement, a fixed step size is pre-determined as a Manhattan distance reference value;
[0097] Performing image segmentation on the lane line between the reference starting point and the reference ending point according to the Manhattan distance reference value to obtain a plurality of segmented line segments;
[0098] Among them, each line segment corresponds to a Manhattan distance benchmark value.
[0099] The Manhattan distance reference value is a Manhattan distance with a preset fixed step length stride. Based on the preset Manhattan distance reference value, the lane line between the reference starting point and the reference end point is segmented to obtain multiple segmented line segments. It can be understood that a whole lane line to be detected in the image is segmented according to the size of multiple identical Manhattan distance reference values (corresponding to the sum of the length and width of a line segment) to divide the lane line into multiple line segments. It can also be understood as moving from the starting point of the first line segment according to the Manhattan distance, stopping the extension of the first line segment when it moves to a Manhattan distance, and using the stop point at this time as the end point of the first line segment. The principle of moving each line segment according to the Manhattan distance is the same.
[0100] Setting a fixed Manhattan distance benchmark value makes it easier to segment the image or convert the lane lines into multiple line segments for separate processing, which can effectively improve the accuracy of lane line detection.
[0101] According to the lane line detection method provided by the present invention, in S40, when constructing the corresponding moving curve equations for the multiple line segments respectively, each key point in each line segment must participate in the calculation process of the moving curve equation, and the direction order in which each key point in each line segment participates in the calculation is: from bottom to top or from left to right.
[0102] When constructing the corresponding moving curve equation for each line segment, each key point in each line segment needs to participate in the construction of the moving curve equation, especially the starting point of each line segment. It can even be said that the moving curve equation is predicted based on the starting point of each line segment. And the order of the direction of the key points (including the starting point) in each line segment participating in the calculation is: from bottom to top or from left to right. Specifically, it means that when generating gt, the y direction of the line should be followed. max ->y min and x min ->x max This order is generated. That is, if it is a forward lane line image to be detected (front view), then y max Start from the bottom of the image and go up. If it is a horizontal lane line image to be detected (left and right view), then start from x min That is, start from the left side of the image and go from left to right.
[0103] This design allows the method to fully avoid the influence of inversion interference of UV coordinates of the image of the lane line to be detected by cameras in different directions, so that no matter it is a forward lane line image to be detected, a lateral lane line image to be detected, or a lane line image to be detected in any other direction, the method can perform lane line detection on each image in the same direction sequence based on this, for example, starting from the upper left corner point of the lane line image to be detected and then performing lane line detection in a downward and rightward direction.
[0104] According to the lane line detection method provided by the present invention, the moving direction deviation includes a horizontal coordinate deviation and a vertical coordinate deviation.
[0105] For the correction starting point of each line segment, a moving direction deviation between the starting point of the line segment and the corresponding end point of the lane line is predicted, and the moving direction deviation includes a horizontal coordinate deviation and a vertical coordinate deviation.
[0106] For example: the correction starting point a1 of the first line segment and the first end point (x n1 ,y n1 ) between the moving directions (d a1 x,d a1 y). The correction starting point a2 of the second line segment and the second end point (x n2 ,y n2 ) between the moving directions (d a2 x,d a2 y). The correction starting point a3 of the third line segment and the third end point (x n3 ,y n3 ) between the moving directions (d a3 x,d a3 y). Etc. This deviation enables the corrected starting point of each line segment to more accurately predict the predicted end point of its corresponding lane line.
[0107] According to the lane line detection method provided by the present invention, the preset termination condition range refers to: a circular area range of a preset radius with the final termination point of the lane line as the center;
[0108] The calculation formula of the preset radius is:
[0109] Preset radius=(length of the lane line image to be detected+width of the lane line image to be detected) / preset Manhattan distance reference value.
[0110] Specifically, the final end point of the lane line can be one of the current end point of the lane line in the candidate list, the next end point of the lane line, or the last end point of the lane line, etc. A circular area range surrounded by a preset radius R is determined with the final end point of the lane line as the center as the preset termination condition range.
[0111] The value of the preset radius R is determined based on the lane line image to be detected and the preset Manhattan distance reference value, and the calculation formula is as follows:
[0112] R = (L + W) / M;
[0113] Wherein, R represents a preset radius, L represents the length of the lane line image to be detected, W represents the width of the lane line image to be detected, M represents a preset Manhattan distance reference value, and M is equal to a preset fixed step length stride value.
[0114] By limiting the preset termination condition range, in each loop process, it is determined whether the corrected starting point of the line segment is within the circular range formed by a specific radius with the final termination point of the lane line predicted by the starting point of the line segment as the center. If it falls within the termination condition range, it proves that it is very close to the actual end point of the lane line, and the loop can be stopped.
[0115] Of course, according to the lane line detection requirements, the preset termination condition range can be further limited to a part of the above circular area range, such as a semicircular area range or a fan-shaped area range, which can be specifically set according to actual needs.
[0116] The present invention also provides a lane line device, which can be understood as a device for executing the above-mentioned lane line method. The working principles of the two are consistent and can be referenced to each other, so they will not be described in detail here.
[0117] The present invention also provides a lane line detection device, Figure 3 is a schematic diagram of the structure of the program detection device provided by the present invention, such as Figure 3 As shown, the device includes: an acquisition module 310, a selection module 320, a segmentation module 330, an equation construction module 340 and a trajectory determination module 350, wherein:
[0118] An acquisition module 310 is used to acquire a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected;
[0119] A selection module 320, configured to select a lane line in the lane line image to be detected as the lane line to be currently detected, and identify a reference starting point and a reference ending point of the lane line;
[0120] A detection module 330, configured to perform image segmentation on the lane line between the reference starting point and the reference ending point based on a preset Manhattan distance reference value to obtain a plurality of segmented line segments;
[0121] An equation construction module 340 is used to construct corresponding movement curve equations for the plurality of line segments respectively;
[0122] The trajectory determination module 350 is used to determine the trajectory of the lane line based on the multiple line segments and the movement curve equations corresponding to the multiple line segments in combination with a curve detection algorithm.
[0123] The lane line detection device provided by the present invention includes an acquisition module 310, a selection module 320, a detection module 330, an equation construction module 340 and a trajectory determination module 350. The modules work in conjunction with each other, so that the device does not need to fuse lane line images in different directions, but can directly perform lane line detection on various images based on the same processing method network, and can also effectively improve the accuracy of lane line detection.
[0124] The present invention also provides an electronic device, Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute all or part of the steps of the lane line detection method, which includes:
[0125] S10, acquiring a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected;
[0126] S20, selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line;
[0127] S30, based on a preset Manhattan distance reference value, performing image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments;
[0128] S40, constructing corresponding movement curve equations for the multiple line segments respectively;
[0129] S50: Determine the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm.
[0130] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the lane line detection method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0131] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the lane line detection method provided in the above embodiments, the method comprising:
[0132] S10, acquiring a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected;
[0133] S20, selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line;
[0134] S30, based on a preset Manhattan distance reference value, performing image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments;
[0135] S40, constructing corresponding movement curve equations for the multiple line segments respectively;
[0136] S50: Determine the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm.
[0137] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, all or part of the steps of the lane line detection method described in the above embodiments are implemented. The method includes:
[0138] S10, acquiring a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected;
[0139] S20, selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line;
[0140] S30, based on a preset Manhattan distance reference value, performing image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments;
[0141] S40, constructing corresponding movement curve equations for the multiple line segments respectively;
[0142] S50: Determine the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm.
[0143] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. Those of ordinary skill in the art may understand and implement them without creative effort.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the lane line detection method described in each embodiment or some parts of the embodiment.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lane line detection method, characterized in that: include: S10, acquiring a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected; S20, selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line; S30, based on a preset Manhattan distance reference value, performing image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments; S40, constructing corresponding movement curve equations for the multiple line segments respectively; S50, determining the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm; The step S50, determining the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments in combination with a curve detection algorithm, includes: S51, selecting a line segment from the multiple line segments as the current line segment, and determining an initial starting point of the current line segment, and based on the initial starting point of the current line segment, predicting a quantization error from the initial starting point of the current line segment to a center point corresponding to its actual position, so as to obtain a corrected starting point of the current line segment by adding the quantization error from the initial starting point of the current line segment to the center point corresponding to its actual position to the initial starting point of the current line segment; S52, predicting the moving direction deviation between the correction starting point of the current line segment and the current end point of the lane line based on the correction starting point of the current line segment, so as to predict the current end point of the lane line, and controlling the moving point to move from the correction starting point of the current line segment to the direction of the current end point of the lane line according to the moving curve equation corresponding to the current line segment by a Manhattan distance reference value to reach the end point of the current line segment; S53, determining whether the corrected starting point of the current line segment falls within a preset termination condition range; if so, stopping the loop, and adding the current termination point of the lane line predicted by the corrected starting point of the current line segment to a candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, continuing to loop to the next step; S54, taking the end point of the current line segment as the initial starting point of the next line segment, predicting the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position based on the initial starting point of the next line segment, so as to obtain the corrected starting point of the next line segment by adding the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position to the initial starting point of the next line segment; S55, predicting the moving direction deviation between the correction starting point of the next line segment and the next end point of the lane line based on the correction starting point of the next line segment, so as to predict the next end point of the lane line, and controlling the moving point to move from the correction starting point of the next line segment to the direction of the next end point of the lane line according to the moving curve equation corresponding to the next line segment by a Manhattan distance reference value to reach the end point of the next line segment; S56, determining whether the corrected starting point of the next line segment falls within the preset termination condition range; if so, stopping the loop, and adding the next termination point of the lane line predicted by the corrected starting point of the next line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, continuing to loop to the next step; S57, repeating the above steps S51-S56 until the moving direction deviation between the correction starting point of the last line segment and the last end point of the lane line is predicted based on the correction starting point of the last line segment, so as to predict the last end point of the lane line, and controlling the moving point to move from the correction starting point of the last line segment to the direction of the last end point of the lane line according to the moving curve equation corresponding to the last line segment by a Manhattan distance reference value to reach the end point of the last line segment; S58, determining whether the corrected starting point of the last line segment falls within the preset termination condition range; if so, stopping the loop, and adding the final termination point of the lane line predicted by the corrected starting point of the last line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, returning to step S51 to continue the loop; S59, determining the trajectory of the lane line based on the reference starting point of the lane line, the correction starting points of each line segment, and the final ending point of the lane line selected from the candidate list.
2. The lane line detection method according to claim 1, characterized in that: The step S30, based on a preset Manhattan distance reference value, performs image segmentation on the lane line between the reference starting point and the reference ending point to obtain a plurality of segmented line segments, including: Obtain lane line detection requirements; Based on the lane detection requirement, a fixed step size is pre-determined as a Manhattan distance reference value; Performing image segmentation on the lane line between the reference starting point and the reference ending point according to the Manhattan distance reference value to obtain a plurality of segmented line segments; Among them, each line segment corresponds to a Manhattan distance benchmark value.
3. The lane line detection method according to claim 1, characterized in that: In S40, when constructing the corresponding moving curve equations for the multiple line segments respectively, each key point in each line segment must participate in the calculation process of the moving curve equation, and the direction order in which each key point in each line segment participates in the calculation is: from the bottom to the top of the image or from the left to the right of the image.
4. The lane line detection method according to claim 1, characterized in that: The moving direction deviation includes a horizontal coordinate deviation and a vertical coordinate deviation.
5. The lane line detection method according to claim 1, characterized in that: The preset termination condition range refers to: a circular area range with a preset radius and the final termination point of the lane line as the center; The calculation formula of the preset radius is: Preset radius=(length of the lane line image to be detected+width of the lane line image to be detected) / preset Manhattan distance reference value.
6. A lane line detection device, characterized in that: include: An acquisition module, used to acquire a lane line image to be detected, wherein the lane line image to be detected includes at least one of a forward lane line image to be detected and a lateral lane line image to be detected; A selection module, used for selecting a lane line in the lane line image to be detected as the lane line currently being detected, and identifying a reference starting point and a reference ending point of the lane line; A detection module, configured to perform image segmentation on the lane line between the reference starting point and the reference ending point based on a preset Manhattan distance reference value to obtain a plurality of segmented line segments; An equation construction module, used to construct corresponding movement curve equations for the plurality of line segments respectively; A trajectory determination module, configured to determine the trajectory of the lane line based on the multiple line segments and the moving curve equations corresponding to the multiple line segments, in combination with a curve detection algorithm; The trajectory determination module is used to perform the following steps: S51, selecting a line segment from the multiple line segments as the current line segment, and determining an initial starting point of the current line segment, and based on the initial starting point of the current line segment, predicting a quantization error from the initial starting point of the current line segment to a center point corresponding to its actual position, so as to obtain a corrected starting point of the current line segment by adding the quantization error from the initial starting point of the current line segment to the center point corresponding to its actual position to the initial starting point of the current line segment; S52, predicting the moving direction deviation between the correction starting point of the current line segment and the current end point of the lane line based on the correction starting point of the current line segment, so as to predict the current end point of the lane line, and controlling the moving point to move from the correction starting point of the current line segment to the direction of the current end point of the lane line according to the moving curve equation corresponding to the current line segment by a Manhattan distance reference value to reach the end point of the current line segment; S53, determining whether the corrected starting point of the current line segment falls within a preset termination condition range; if so, stopping the loop, and adding the current termination point of the lane line predicted by the corrected starting point of the current line segment to a candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; If it does not fall into, continue to loop to the next step; S54, taking the end point of the current line segment as the initial starting point of the next line segment, predicting the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position based on the initial starting point of the next line segment, so as to obtain the corrected starting point of the next line segment by adding the quantization error from the initial starting point of the next line segment to the center point corresponding to its actual position to the initial starting point of the next line segment; S55, predicting the moving direction deviation between the correction starting point of the next line segment and the next end point of the lane line based on the correction starting point of the next line segment, so as to predict the next end point of the lane line, and controlling the moving point to move from the correction starting point of the next line segment to the direction of the next end point of the lane line according to the moving curve equation corresponding to the next line segment by a Manhattan distance reference value to reach the end point of the next line segment; S56, determining whether the corrected starting point of the next line segment falls within the preset termination condition range; if so, stopping the loop, and adding the next termination point of the lane line predicted by the corrected starting point of the next line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; if not, continuing to loop to the next step; S57, repeating the above steps S51-S56 until the moving direction deviation between the correction starting point of the last line segment and the last end point of the lane line is predicted based on the correction starting point of the last line segment, so as to predict the last end point of the lane line, and controlling the moving point to move from the correction starting point of the last line segment to the direction of the last end point of the lane line according to the moving curve equation corresponding to the last line segment by a Manhattan distance reference value to reach the end point of the last line segment; S58, determining whether the corrected starting point of the last line segment falls within the preset termination condition range; if so, stopping the loop, and adding the final termination point of the lane line predicted by the corrected starting point of the last line segment to the candidate list of the termination point of the lane line to participate in the voting count, and selecting the termination point of the lane line with the most votes from the candidate list as the final termination point of the lane line; If not, return to step S51 and continue the cycle; S59, determining the trajectory of the lane line based on the reference starting point of the lane line, the correction starting points of each line segment, and the final ending point of the lane line selected from the candidate list.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, all or part of the steps of the lane line detection method according to any one of claims 1-5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, all or part of the steps of the lane line detection method according to any one of claims 1 to 5 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, all or part of the steps of the lane line detection method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and apparatus for obtaining lane line
CN108052904A
Method, device and device for determining lane lines
DE102016124879A1