Lane line detection method, vehicle and storage medium
In the lane line detection method, the lane line cluster matching relationship in the environmental image is used to classify the lane line point set to generate the lane line point set, which solves the problem of poor effect of conventional detection solutions in complex scenarios, and achieves higher detection accuracy and stability.
Patent Information
- Application Number
- CN202411603010.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
Conventional lane line detection schemes have poor detection effects in complex lane line scenarios, especially in underground parking lots and other scenarios, making it difficult to accurately detect lane lines.
A lane line detection method is proposed. By acquiring the environment image of the vehicle, determining the lane line clusters in each row of pixel points sequences, and classifying them according to the matching relationship between adjacent lane line clusters, forming a lane line point set corresponding to the lane line, and finally generating the lane line in the environment image.
In complex or changeable lane line orientation scenarios, lane line can be detected better, improving the accuracy and stability of the detection.
Smart Images

Figure CN119559600A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a lane detection method, a vehicle, and a storage medium. Background Art
[0002] In the field of autonomous driving, lane line detection is one of the most common functions. In order to achieve lane changes and path planning in various scenarios, stable and accurate lane line detection is required. At present, conventional lane line detection perception solutions include segmentation-based, anchor-based, and parameter-based methods. However, it should be noted that the above solutions are basically based on driving scenarios, that is, detection is performed in regular long-line lane line scenarios, but it is difficult to achieve good detection results in complex lane line scenarios. For example, the lane lines in underground parking lots appear more complex than in long-distance driving scenarios. In such scenarios, conventional lane line detection solutions are prone to detection errors.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of this application is to provide a lane line detection method, a vehicle and a storage medium, aiming to solve the technical problem that conventional lane line detection schemes have poor detection effects in complex lane line scenarios.
[0005] To achieve the above object, the present application proposes a lane line detection method, which comprises the following steps:
[0006] Acquire an environment image of the vehicle, and determine a lane line cluster in each row of a pixel point sequence in the environment image, wherein the lane line cluster is composed of adjacent pixel points in the pixel point sequence that belong to a lane line area;
[0007] For any classified lane line cluster in the environment image, determine a pixel point sequence of adjacent rows in a preset direction of the row where the classified lane line cluster is located, and a target lane line cluster that matches the classified lane line cluster, wherein the classified lane line cluster is a lane line cluster to which the lane line point set has been determined to belong;
[0008] Assigning the cluster center point of the target lane line cluster to the lane line point set to which the cluster center point of the classified lane line cluster belongs;
[0009] After traversing the classified lane line clusters in the environment image, the lane lines in the environment image are generated according to the obtained lane line point set.
[0010] Optionally, the step of determining a target lane line cluster that matches the classified lane line cluster in a pixel point sequence of adjacent rows of the row where the classified lane line cluster is located includes:
[0011] Based on the cluster center point of the classified lane line cluster and the direction vector of the lane line where the classified lane line cluster is located, an estimated center point that should be located in the adjacent row pixel point sequence and belongs to the same lane line as the classified lane line cluster is estimated;
[0012] Based on the lane line cluster whose cluster center point is closest to the estimated center point in the adjacent row pixel point sequence, a target lane line cluster matching the classified lane line cluster is determined.
[0013] Optionally, the step of generating lane lines in the environment image according to the obtained lane line point set includes:
[0014] For any lane line point set to be fitted in the obtained lane line point set, convert the center point of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located, so as to obtain the center point position of the lane line corresponding to the lane line point set to be fitted;
[0015] Line segment fitting is performed based on the positions of each center point to obtain the lane line of the lane line point set to be fitted in the environment image.
[0016] Optionally, before the step of converting the center points of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located, the method includes:
[0017] Determine the number of cluster center points in the lane line point set to be fitted;
[0018] When the number of cluster center points is less than or equal to a preset number threshold, discarding the lane line point set to be fitted;
[0019] When the number of cluster center points is greater than the preset number threshold, the step of converting the center points of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located is performed.
[0020] Optionally, after the step of generating lane lines in the environment image according to the obtained lane line point set, the method includes:
[0021] For any lane line to be matched in the environment image, matching the lane line to be matched with a recorded lane line of the vehicle;
[0022] If there is a recorded lane line that matches the lane line to be matched, the matching number of the recorded lane lines that matches the lane line to be matched is increased once;
[0023] If there is no recorded lane line that matches the lane line to be matched, the lane line to be matched is used as a newly added recorded lane line;
[0024] Output the recorded lane lines whose matching number is greater than a preset first number threshold.
[0025] Optionally, after the step of matching the lane line to be matched with the recorded lane line of the vehicle, the method includes:
[0026] When there are recorded lane lines of the vehicle that do not match any lane lines in the environment image, reducing the number of matches of the recorded lane lines that do not match any lane lines in the environment image;
[0027] Discard recorded lane lines whose matching number is less than a preset second number threshold, wherein the preset second number threshold is less than the first number threshold, and the preset second number threshold is less than or equal to zero.
[0028] Optionally, the step of outputting recorded lane lines whose matching number is greater than a preset first number threshold comprises:
[0029] For any target recorded lane line whose matching number is greater than a preset first number threshold, determine the lane line endpoints of the target recorded lane line in different environmental images within a preset time sliding window to obtain a first endpoint collection and a second endpoint collection, wherein the first endpoint collection is composed of lane line endpoints formed by one end of the target recorded lane line in the different environmental images, and the second endpoint collection is composed of lane line endpoints formed by the other end of the target recorded lane line in the different environmental images;
[0030] Generate a first average endpoint through the first endpoint collection, and generate a second average endpoint through the second endpoint collection;
[0031] The output after smoothing the target recorded lane line based on the first average endpoint and the second average endpoint.
[0032] Optionally, the step of matching the lane line to be matched with the recorded lane line of the vehicle includes:
[0033] Calculating a lane line distance difference between the lane line to be matched and a recorded lane line of the vehicle;
[0034] If the lane line difference between the recorded lane line and the lane line to be matched is less than the preset distance error threshold, it is determined that there is a recorded lane line that matches the lane line to be matched;
[0035] If there is no recorded lane line whose lane line distance difference with the lane line to be matched is less than a preset distance error threshold, it is determined that there is no recorded lane line that matches the lane line to be matched.
[0036] Optionally, the step of calculating the lane line distance difference between the lane line to be matched and the recorded lane line of the vehicle comprises:
[0037] For any recorded lane line to be matched among the recorded lane lines of the vehicle, determine the difference between the second coordinate values of the recorded lane line to be matched and the lane line to be matched at the same first coordinate value, and obtain the distance difference between the recorded lane line to be matched and the lane line to be matched at a position;
[0038] After selecting multiple different first coordinate values to obtain the distance difference between the recorded lane line to be matched and the lane line to be matched at different positions, the average value of each distance difference is calculated to obtain the lane line distance difference between the recorded lane line to be matched and the lane line to be matched.
[0039] Optionally, before the step of determining the lane line clusters in each row of pixel point sequence in the environment image, the method includes:
[0040] The environment image is input into a preset lane line detection model to obtain the lane line area in the environment image, the horizontal vector information of the environment image and the vertical vector information of the environment image, wherein the horizontal vector information represents the relative position relationship between any lane line pixel point in the lane line area and the cluster center point of the lane line cluster to which the lane line pixel point belongs, and is used to determine the lane line clusters in each row of pixel point sequence and the cluster center point of each lane line cluster, and the vertical vector information is used to represent the vector information between the pixel point in any lane line cluster and the pixel point in the adjacent lane line cluster, and the vector information is used to determine the direction vector of the lane line to which the lane line cluster belongs.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the lane line detection method as described above.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the lane line detection method described above are implemented.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the lane line detection method described above are implemented.
[0044] One or more technical solutions proposed in this application have at least the following technical effects:
[0045] In an embodiment of the present application, an environmental image of a vehicle is acquired, and a lane line cluster in each row of a pixel point sequence in the environmental image is determined, wherein the lane line cluster is composed of adjacent pixel points in the pixel point sequence that belong to a lane line area; for any classified lane line cluster in the environmental image, an adjacent row pixel point sequence in a preset direction of the row where the classified lane line cluster is located is determined, and a target lane line cluster that matches the classified lane line cluster is determined, wherein the classified lane line cluster is a lane line cluster to which a lane line point set has been determined to belong; the cluster center point of the target lane line cluster is assigned to the lane line point set to which the cluster center point of the classified lane line cluster belongs; after traversing the classified lane line clusters in the environmental image, the lane lines in the environmental image are generated according to the obtained lane line point set. That is, in this embodiment, the part of the pixels belonging to the road line area in each row of pixels in the vehicle environment image will be segmented to form lane line clusters, and then the lane line clusters will be classified according to the matching relationship between adjacent lane line clusters in the same lane line to form a lane line point set corresponding to the lane line, which is used for lane line generation. Moreover, since the classification is completed based on the matching relationship between adjacent lane line clusters, it does not involve the orientation type of the lane line itself. Therefore, the lane line detection scheme of the present application can still achieve good lane line detection effect when facing scenes with complex or changeable lane line orientations. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0048] Figure 1This is a flow chart of the first embodiment of the lane line detection method of the present application;
[0049] Figure 2 A schematic diagram of a local scene of horizontal vector information in the lane line detection method of this application;
[0050] Figure 3 A schematic diagram of a local scene of vertical vector information in the lane line detection method of this application;
[0051] Figure 4 This is a flow chart of the second embodiment of the lane line detection method of the present application;
[0052] Figure 5 Schematic diagram of lane line tracking in the lane line detection method of this application;
[0053] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the lane line detection method in the embodiment of the present application.
[0054] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0056] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0057] In the field of autonomous driving, lane line detection is one of the most common functions. In order to achieve lane change and path planning in various scenarios, stable and accurate lane line detection is required. At present, conventional lane line detection perception schemes include segmentation-based schemes, anchor-based methods, and parameter-based methods. However, it should be noted that the above schemes are basically based on driving scenarios, that is, detection is performed in regular long-line lane line scenarios, but it is difficult to achieve good detection results in the face of complex lane line scenarios. For example, the lane lines in underground parking lots are prone to horizontal lane lines that are close to "vertical" with the vehicle body, while in the long-distance driving scenario, the lane lines are more likely to be vertical lane lines that are close to "parallel" with the vehicle body. Therefore, in the scene of complex lane lines, conventional lane line detection schemes are prone to detection errors.
[0058] The main solution of the embodiment of the present application is: acquiring an environmental image of the vehicle, determining a lane line cluster in each row of pixel point sequences in the environmental image, wherein the lane line cluster is composed of adjacent pixel points in the pixel point sequence that belong to the lane line area; for any classified lane line cluster in the environmental image, determining an adjacent row pixel point sequence in a preset direction of the row where the classified lane line cluster is located, and a target lane line cluster that matches the classified lane line cluster, wherein the classified lane line cluster is a lane line cluster to which a lane line point set has been determined to belong; assigning a cluster center point of the target lane line cluster to a lane line point set to which a cluster center point of the classified lane line cluster belongs; after traversing the classified lane line clusters in the environmental image, generating the lane lines in the environmental image according to the obtained lane line point set.
[0059] That is, in this embodiment, the part of the pixels belonging to the road line area in each row of pixels in the vehicle environment image will be segmented to form lane line clusters, and then the lane line clusters will be classified according to the matching relationship between adjacent lane line clusters in the same lane line to form a lane line point set corresponding to the lane line, which is used for lane line generation. Moreover, since the classification is completed based on the matching relationship between adjacent lane line clusters, it does not involve the orientation type of the lane line itself. Therefore, the lane line detection scheme of the present application can still achieve good lane line detection effect when facing complex or changeable lane line orientation scenes.
[0060] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a cloud platform, a vehicle, a main controller in a vehicle, a computer, a mobile phone, etc., or an electronic device that can realize the above functions.
[0061] Based on this, the present application embodiment provides a lane line detection method, referring to Figure 1 , which is a flow chart of the first embodiment of the lane line detection method of the present application.
[0062] In this embodiment, the lane line detection method includes steps S10 to S40:
[0063] Step S10, acquiring an environment image of the vehicle, and determining a lane line cluster in each row of a pixel point sequence in the environment image, wherein the lane line cluster is composed of adjacent pixel points in the pixel point sequence that belong to a lane line area;
[0064] Exemplarily, the environmental image around the vehicle can be obtained by a camera configured on the vehicle, such as the environmental image can be a front view image obtained by the front camera of the vehicle. In this embodiment, the detection is performed based on the pixel point sequence composed of each row of pixels in the environmental image. After the environmental image is obtained, each row of pixel point sequence in the environmental image is traversed to determine the lane line cluster in each row of pixel point sequence. Among them, the lane line cluster is composed of adjacent pixels in the pixel point sequence that belong to the lane line area. It can be understood that in the actual environment, the lane line has very obvious characteristics, such as the lane line is usually white, so for the lane line area, the environmental image can be input into the pre-trained detection model for detection, so as to mark the pixels in the environmental image that belong to the lane line area. After obtaining the lane line area of the environmental image, each row of pixel point sequence can be traversed, and for any row of pixel point sequence, the collection of pixels that belong to the lane line area and are adjacent in the pixel point sequence can be used as a lane line cluster.
[0065] Step S20, for any classified lane line cluster in the environment image, determine a pixel point sequence of adjacent rows in a preset direction of the row where the classified lane line cluster is located, and a target lane line cluster that matches the classified lane line cluster, wherein the classified lane line cluster is a lane line cluster to which the lane line point set has been determined to belong;
[0066] It should be noted that, since many lane line clusters are usually determined in the environment image, and the process of lane line classification for each lane line cluster is basically similar, in this embodiment, one of the lane line clusters will be used as an example for explanation.
[0067] Exemplarily, for any classified lane line cluster in the environmental image, where the classified lane line cluster refers to a lane line cluster to which the lane line point set has been determined to belong, that is, equivalent to a lane line cluster that has been classified, determine the adjacent row pixel point sequence in the preset direction of the row where the classified lane line cluster is located. The preset direction can be determined according to the position of the starting row pixel point sequence during classification. For example, if the classification starts from the first row of the pixel point sequence with a lane line cluster in the environmental image, the preset direction can be downward, and correspondingly, the adjacent row pixel point sequence below is the next row pixel point sequence; if the classification starts from the last row of the pixel point sequence with a lane line cluster in the environmental image, the direction can be upward, and correspondingly, the adjacent row pixel point sequence above is the previous row pixel point sequence. It is worth noting that the initial classified lane line cluster is the lane line cluster of the starting row pixel point sequence for classification in the environmental image. For example, if classification starts from the last row of pixel point sequences with lane line clusters in the environment image, at the beginning of classification, each lane line point set is constructed based on each lane line cluster in the last row of pixel point sequences with lane line clusters, that is, each lane line cluster in the last row of pixel point sequences with lane line clusters corresponds to a lane line point set.
[0068] Correspondingly, a target lane line cluster matching the classified lane line cluster is found from the pixel point sequence of the adjacent rows in the preset direction of the row where the above-mentioned classified lane line cluster is located. The target lane line cluster can be determined according to the lane line cluster closest to the classified lane line cluster in the pixel point sequence of the adjacent rows. For example, the closest lane line cluster can be directly used as another target lane line cluster, or the distance to the closest lane line cluster can be compared with the preset distance. If it is greater, it is used as the target lane line cluster.
[0069] Step S30, assigning the cluster center point of the target lane line cluster to the lane line point set to which the cluster center point of the classified lane line cluster belongs;
[0070] Exemplarily, after determining the target lane line cluster, the cluster center point of the target lane line is assigned to the lane line point set to which the cluster center point of the above-classified lane line cluster belongs, thereby completing the classification of a target lane line cluster, and a lane line point set is equivalent to corresponding to a lane line. In addition, it should be noted that when the above-mentioned target lane line cluster is classified, the target lane line cluster is actually equivalent to becoming a new classified lane line cluster, and the above classification process is repeated until each classified lane line cluster is traversed. At the same time, it can be understood that since the lane line cluster is composed of adjacent pixel points that belong to the lane line area in the pixel point sequence, the lane line cluster is also a sub-pixel point sequence of the corresponding pixel point sequence. Therefore, when determining the cluster center point of the lane line cluster, it can be determined by the median pixel point of the lane line cluster.
[0071] Step S40: after traversing the classified lane line clusters in the environment image, generate the lane lines in the environment image according to the obtained lane line point set.
[0072] Exemplarily, after traversing the classified lane line clusters in the environment image, at least one lane line point set is obtained, and one lane line point set corresponds to one lane line, and the process of generating lane lines for each lane line point set is roughly the same. For example, for any lane line point set, the lane line point set includes multiple cluster center points, and the cluster center point is equivalent to the center point of the lane line, so the lane line in the environment image can be obtained by performing line segment fitting on each cluster center point in the lane line point set through the fitting algorithm.
[0073] In this implementation, an environmental image of the vehicle is acquired, and a lane line cluster in each row of a pixel point sequence in the environmental image is determined, wherein a lane line cluster is composed of adjacent pixel points in the pixel point sequence that belong to a lane line area; for any classified lane line cluster in the environmental image, an adjacent row pixel point sequence in a preset direction of the row where the classified lane line cluster is located is determined, and a target lane line cluster that matches the classified lane line cluster is determined, wherein the classified lane line cluster is a lane line cluster to which a lane line point set has been determined to belong; the cluster center point of the target lane line cluster is assigned to the lane line point set to which the cluster center point of the classified lane line cluster belongs; after traversing the classified lane line clusters in the environmental image, the lane lines in the environmental image are generated according to the obtained lane line point set. That is, in this embodiment, the part of the pixels belonging to the road line area in each row of pixels in the vehicle environment image is segmented to form lane line clusters, and then the lane line clusters are classified according to the matching relationship between adjacent lane line clusters in the same lane line to form a lane line point set corresponding to the lane line, which is used for lane line generation. Moreover, since the classification is completed based on the matching relationship between adjacent lane line clusters, it does not involve the orientation type of the lane line itself (such as approaching the horizontal or vertical orientation). Therefore, the lane line detection scheme of the present application can still achieve good lane line detection effect when facing complex or changeable lane line orientation scenes.
[0074] In a feasible implementation manner, the step of determining a target lane line cluster that matches the classified lane line cluster in a pixel point sequence of adjacent rows of the row where the classified lane line cluster is located includes steps S21 to S22:
[0075] Step S21, based on the cluster center point of the classified lane line cluster and the direction vector of the lane line where the classified lane line cluster is located, estimate the estimated center point that should be located in the adjacent row pixel point sequence and belongs to the same lane line as the classified lane line cluster;
[0076] Step S22: determining a target lane line cluster that matches the classified lane line cluster based on the lane line cluster whose cluster center point is closest to the estimated center point in the adjacent row pixel point sequence.
[0077] It should be noted that, in this embodiment, the cluster midpoint position of the lane line cluster that belongs to the same lane line as the above-classified lane line cluster and is adjacent to the classified lane line cluster is estimated.
[0078] Exemplarily, based on the cluster center point of the classified lane line cluster and the direction vector of the lane line where the classified lane line cluster is located, an estimated center point that should be located in a sequence of adjacent row pixels and belongs to the same lane line as the classified lane line cluster is estimated. The direction vector can also be identified by a pre-set detection model. For example, when training the detection model, the direction vector of the lane line where the cluster center point is located can be marked on the cluster center point of the lane line cluster in the training image. The specific form of the direction vector can be the vector between the cluster center points of the adjacent lane line clusters of the cluster center point of the lane line cluster. It can be understood that when the center point of a lane line (i.e., the cluster center point of the classified lane line cluster) and the direction vector of the lane line are known, the adjacent center point belonging to the same lane line as the known center point, i.e., the above-mentioned estimated center point, can be calculated and estimated by a mathematical geometric calculation formula. The specific estimation process will not be repeated here. After obtaining the estimated center point, the distance between the cluster center point of each lane line cluster in the adjacent row pixel point sequence and the estimated center point is calculated, and the target lane line cluster that matches the classified lane line cluster is determined based on the lane line cluster to which the cluster center point closest to the estimated center point belongs. For example, the lane line cluster whose cluster center point is closest to the estimated center point can be used as the target lane line cluster that matches the classified lane line cluster. Similarly, when the distance is less than a preset distance, the lane line cluster of the closest cluster center point can be used as the target lane line cluster.
[0079] In a feasible implementation manner, the step of generating the lane line in the environment image according to the obtained lane line point set includes steps S41 to S42:
[0080] Step S41, for any lane line point set to be fitted in the obtained lane line point set, convert the center point of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located, and obtain the center point position of the lane line corresponding to the lane line point set to be fitted;
[0081] Step S42, performing line segment fitting based on the positions of each center point to obtain the lane line of the lane line point set to be fitted in the environment image.
[0082] For example, in practical applications, multiple lane line point sets may be obtained, and the process of generating lane lines in each lane line point set is basically similar. The above-mentioned lane line point set to be fitted refers to the lane line point set that has not obtained the lane line through fitting. For any lane line point set to be fitted, the center points of each cluster in the lane line point set to be fitted are converted from the camera coordinate system corresponding to the above-mentioned environmental image to the world coordinate system where the vehicle is located, and the position of the center point of the lane line corresponding to the lane line point set to be fitted is obtained, such as the coordinate data of each center point in the world coordinate system, wherein the conversion process can be converted according to the conversion matrix of the two coordinate systems. Then, the line segment fitting is performed on the position of each center point to obtain the lane line of the lane line point set to be fitted in the environmental image, and the fitting can be performed by fitting the lane line cubic equation by the least squares method. It should be noted that the lane line fitting performed after the coordinate system conversion can ensure the smoothness and accuracy of the obtained lane line.
[0083] In a feasible implementation manner, before the step of converting the center points of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located, the method includes steps S401 to S402:
[0084] Step S401, determining the number of cluster center points in the lane line point set to be fitted;
[0085] Step S402, when the number of cluster center points is less than or equal to a preset number threshold, discarding the lane line point set to be fitted;
[0086] Step S403, when the number of the cluster center points is greater than the preset number threshold, execute the step of converting the center points of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located.
[0087] It should be noted that, in this embodiment, in order to ensure the quality of the obtained lane lines, the set of lane line points to be fitted for generating lane lines will be screened.
[0088] Exemplarily, the number of cluster center points in the lane line point set to be fitted is determined. If the number of cluster center points is too small, that is, less than or equal to a preset number threshold, the lane line point set to be fitted is discarded. On the contrary, if the number of cluster center points is sufficient, that is, greater than the above-mentioned preset number threshold, then return to the step of converting the cluster center points in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located, and perform the step of fitting to generate lane lines.
[0089] In a feasible implementation manner, before the step of determining the lane line clusters in each row of pixel point sequence in the environment image, the method includes step S01:
[0090] Step S01, input the environmental image into a preset lane line detection model to obtain the lane line area in the environmental image, the horizontal vector information of the environmental image and the vertical vector information of the environmental image, wherein the horizontal vector information represents the relative position relationship between any lane line pixel point in the lane line area and the cluster center point of the lane line cluster to which the lane line pixel point belongs, and is used to determine the lane line clusters in each row of pixel point sequence and the cluster center point of each lane line cluster, and the vertical vector information is used to represent the vector information between the pixel point in any lane line cluster and the pixel point in the adjacent lane line cluster, and the vector information is used to determine the direction vector of the lane line to which the lane line cluster belongs.
[0091] It should be noted that in this implementation, in the process of detecting lane lines in the environment image, it is necessary to identify the lane line area in the environment image, determine the cluster center point in the lane line cluster, use the direction vector of the lane line, etc.
[0092] Exemplarily, in this embodiment, the lane line area can be identified by a pre-trained lane line detection model, the cluster center point can be determined according to the output of the lane line detection model, and the direction vector of the lane line can be obtained by the output of the lane line detection model. The environment image is input into the preset lane line detection model, and the lane line detection model will output the lane line area in the environment image, the horizontal vector information of the environment image, and the vertical vector information of the environment image.
[0093] It is worth noting that the horizontal vector information represents the relative positional relationship between any lane line pixel point in the lane line area and the cluster center point of the lane line cluster to which the lane line pixel point belongs. For example, the horizontal vector information includes the horizontal vector value of a lane line pixel point, and the magnitude of the horizontal vector value represents whether the lane line pixel point is located to the left or to the right of the cluster center point of the lane line cluster to which the lane line pixel point belongs. If the horizontal vector value is greater than zero, it is located to the left of the cluster center point, and if the horizontal vector value is less than zero, it is located to the right of the cluster center point. Therefore, in the process of determining the cluster center point, it can be determined by the changing trend of the horizontal vector values of each lane line pixel point in the lane line cluster, such as taking the lane line pixel point whose horizontal vector value is at the dividing line between greater than zero and less than zero as the cluster center point. Refer to Figure 2 , is a schematic diagram of a local scene of horizontal vector information in this application, Figure 2, a lane line, a lane line cluster in the lane line, a cluster center point in the lane line cluster, and a pattern of horizontal vector values of lane line pixels in the lane line cluster are shown in FIG. It should be noted that in practical applications, the cluster center point of a lane line cluster may not be the median point of the lane line cluster, so it is necessary to determine the cluster center point through the change trend of the horizontal vector value of each lane line pixel point to ensure the accuracy of the obtained cluster center point.
[0094] The vertical vector information is used to represent the vector information between the pixel points in any lane line cluster and the pixel points in the adjacent lane line cluster. This vector information is used to determine the direction vector of the lane line to which the lane line cluster belongs. In practical applications, in order to simplify the amount of data, the vertical vector information can also only include the vector information between the cluster center point in the lane line cluster and the cluster center point of its adjacent lane line cluster, such as referring to Figure 3 , is a schematic diagram of a local scene of vertical vector information in this application, such as Figure 3 As shown in the figure, the center point of the N+1 row and the center point of the N row are the cluster centers of two adjacent lane line clusters. Correspondingly, the vector information between the center point of the N+1 row and the center point of the N row can be used as the direction vector of the lane line to which the corresponding lane line cluster belongs. It should also be noted that in actual applications, if the order of estimation is from the N+1 row to the N row, the vector information in the vertical vector information output by the lane line detection model is unit vector information, and does not include the specific position of the center point of the NN row.
[0095] In addition, it should be noted that the pixels of the lane line area, the horizontal vector values of the lane line pixels, and the vector information corresponding to the cluster center point will be annotated in the training sample images for training the preset lane line detection model. The preset lane line detection model is then iteratively trained using the above training sample images.
[0096] Reference Figure 4 , is a flow chart of a second embodiment proposed based on the first embodiment of the lane line detection method of the present application. In this embodiment, the same or similar contents as the above embodiment can be referred to the above introduction, and will not be repeated later. After the step of generating the lane line in the environment image according to the obtained lane line point set, the method includes steps S51 to S54:
[0097] Step S51, for any lane line to be matched in the environment image, matching the lane line to be matched with a recorded lane line of the vehicle;
[0098] Step S52, if there is a recorded lane line that matches the lane line to be matched, then the matching number of the recorded lane lines that match the lane line to be matched is increased once;
[0099] Step S53: if there is no recorded lane line that matches the lane line to be matched, the lane line to be matched is used as a newly added recorded lane line;
[0100] Step S54, outputting the recorded lane lines whose matching number is greater than a preset first number threshold.
[0101] It should be noted that in the underground garage scene, the lane lines are short and discontinuous, which is why the traditional lane line recognition solution has poor lane line recognition effect in complex lane line scenes such as underground garages. In this regard, in this embodiment, the lane lines are tracked and the output lane lines are dynamically adjusted.
[0102] Exemplarily, the lane line to be matched is a lane line in the environment image that has not been matched with the recorded lane line of the vehicle. For any lane line to be matched in the environment image, the lane line to be matched is matched with the recorded lane line of the vehicle, and the essence of matching is to determine whether the recorded lane line appears again in the environment image. If the lane line to be matched is compared with a recorded lane line, if the difference between the two lane lines is small, that is, less than a threshold, it can be determined that the lane line to be matched matches the recorded lane line, that is, it is determined that the lane line to be matched and the recorded lane line are the same lane line.
[0103] Correspondingly, if there is a recorded lane line that matches the lane line to be matched, the matching number of the recorded lane line that matches the lane line to be matched is increased once. Conversely, if there is no recorded lane line that matches the lane line to be matched, the lane line to be matched can be used as a newly added recorded lane line. After traversing the lane lines to be matched in the environmental image, the recorded lane lines whose output matching number is greater than the preset first number threshold (such as 5) are used for automatic driving of the vehicle (such as automatic parking). It can be understood that in the present application, the lane lines identified from the environmental image will not be directly output for automatic driving, but the identified lane lines will be tracked. When a lane line is tracked multiple times (that is, matched multiple times), it will be output. Therefore, by tracking the lane lines, the stability of the lane line detection can be improved, thereby ensuring that the lane lines can still be stably output in the scene of complex lane lines.
[0104] In a feasible implementation manner, after the step of matching the lane line to be matched with the recorded lane line of the vehicle, the method includes steps S501 to S502:
[0105] Step S501, when there are recorded lane lines of the vehicle that do not match any lane lines in the environment image, reducing the number of matches of the recorded lane lines that do not match any lane lines in the environment image;
[0106] Step S502: discarding recorded lane lines whose matching number is less than a preset second number threshold, wherein the preset second number threshold is less than the first number threshold, and the preset second number threshold is less than or equal to zero.
[0107] It should be noted that, in this embodiment, lane lines that cannot be tracked will be discarded to avoid outputting erroneous lane lines.
[0108] Exemplarily, if among the recorded lane lines of the vehicle, there are recorded lane lines that do not match any lane lines in the environmental image, the number of matches of the recorded lane lines that do not match any lane lines in the environmental image is reduced once. Recorded lane lines whose number of matches is less than a preset second number threshold will be discarded. It is worth noting that the preset second number threshold is less than the first number threshold, and the preset second number threshold is less than or equal to zero. For example, the preset second number threshold can be set to -3. If the first number threshold is 5, then in theory, a lane line is not tracked (i.e., matched) in up to 7 consecutive frames of environmental images, and the lane line will be discarded.
[0109] In a feasible implementation manner, the step of outputting the recorded lane lines whose matching number is greater than a preset first number threshold comprises steps S541 to S543:
[0110] Step S541, for any target recorded lane line whose matching number is greater than a preset first quantity threshold, determine the lane line endpoints of the target recorded lane line in different environmental images within a preset time sliding window, and obtain a first endpoint collection and a second endpoint collection, wherein the first endpoint collection is composed of lane line endpoints formed by one end of the target recorded lane line in the different environmental images, and the second endpoint collection is composed of lane line endpoints formed by the other end of the target recorded lane line in the different environmental images;
[0111] Step S542, generating a first average endpoint through the first endpoint set, and generating a second average endpoint through the second endpoint set;
[0112] Step S543: Outputting the target recorded lane line after smoothing based on the first average endpoint and the second average endpoint.
[0113] Exemplarily, for any target recorded lane line whose matching book is greater than a preset first number, the lane line endpoints of the target recorded lane line in different environmental images within a preset time sliding window are obtained, thereby obtaining a first endpoint collection and a second endpoint collection. It can be understood that the first endpoint collection is composed of lane line endpoints formed by one end of the target recorded lane line in different environmental images, and the second endpoint collection is composed of lane line endpoints formed by the other end of the target recorded lane line in different environmental images. After obtaining the first endpoint collection and the second endpoint collection, the endpoints in the first endpoint collection are averaged to obtain a first average endpoint, and the endpoints in the second endpoint collection are averaged to obtain a second average endpoint. The first average endpoint and the second average endpoint are then used to smooth the target recorded lane line, and the target recorded lane line after smoothing is output. Through the above-mentioned sliding average processing, the output recorded lane line can be made smoother and more accurate.
[0114] In a feasible implementation manner, the step of matching the lane line to be matched with the recorded lane line of the vehicle includes steps S511 to S513:
[0115] Step S511, calculating the lane line distance difference between the lane line to be matched and the recorded lane line of the vehicle;
[0116] Step S512, if the lane line difference between the recorded lane line and the lane line to be matched is less than a preset distance error threshold, it is determined that there is a recorded lane line that matches the lane line to be matched;
[0117] Step S513: If there is no recorded lane line whose lane line distance difference with the lane line to be matched is less than a preset distance error threshold, it is determined that there is no recorded lane line that matches the lane line to be matched.
[0118] It should be noted that if a lane line to be matched matches a recorded lane line of a vehicle, the lane line to be matched and the recorded lane line are the same lane line, so theoretically the two lane lines should overlap in the world coordinate system. However, considering the actual calculation error, the above-mentioned preset distance error threshold is set in this embodiment.
[0119] Exemplarily, the lane line distance difference between the lane line to be matched and each recorded lane line is calculated respectively. Then the obtained lane line distance difference is compared with the preset distance error threshold. If there is a recorded lane line whose lane line distance difference with the lane line to be matched is less than the preset distance error threshold, it is determined that there is a recorded lane line that matches the lane line to be matched. And the recorded lane line whose lane line distance difference is less than the preset distance error threshold is the recorded lane line that matches the lane line to be matched. On the contrary, if there is no recorded lane line whose lane line distance difference with the lane line to be matched is less than the preset distance error threshold, it is determined that there is no recorded lane line that matches the lane line to be matched.
[0120] In a feasible implementation manner, the step of calculating the lane line distance difference between the lane line to be matched and the recorded lane line of the vehicle includes steps S5111 to S5112:
[0121] Step S5111, for any recorded lane line to be matched among the recorded lane lines of the vehicle, determine the difference in second coordinate values between the recorded lane line to be matched and the lane line to be matched at the same first coordinate value, and obtain the distance difference between the recorded lane line to be matched and the lane line to be matched at a position;
[0122] Step S5112, after selecting multiple different first coordinate values and obtaining the distance difference between the recorded lane line to be matched and the lane line to be matched at different positions, calculate the average value of each distance difference to obtain the lane line distance difference between the recorded lane line to be matched and the lane line to be matched.
[0123] Exemplarily, for any recorded lane line to be matched among the recorded lane lines of the vehicle, the recorded lane line to be matched refers to a recorded lane line whose distance to the lane line to be matched is not calculated. Determine the difference in the second coordinate values of the recorded lane line to be matched and the lane line to be matched at the same first coordinate value. For example, let the first coordinate be the ordinate in the world coordinate system of the vehicle, and the second coordinate be the abscissa in the world coordinate system. Determine the second coordinate values of the recorded lane line to be matched and the lane line to be matched at the same ordinate value, respectively, and then calculate the difference between the two second coordinate values to obtain the second coordinate value difference, and the second coordinate value difference is the distance difference between the recorded lane line to be matched and the lane line to be matched at a certain position.
[0124] Select multiple different first coordinate values (such as selecting multiple different first coordinate values at preset intervals) and repeat the above process to obtain the distance difference between the recorded lane line to be matched and the lane line to be matched at different positions. Then calculate the average value of each distance difference to obtain the lane line distance difference between the recorded lane line to be matched and the lane line to be matched. Figure 5, is a schematic diagram of lane line tracking in this application. Figure 5 As shown, it includes two frames of images, namely, the image corresponding to the recorded lane line and the current environment image. The current frame includes lane lines A to lane line C, and the previous frame includes lane lines 1 to 3. Taking lane line A as an example, when calculating the average distance between lane line A and lane line 1, a ordinate y value can be selected according to the previously set selection rule (such as selecting according to a preset interval), and the horizontal coordinate x1 value corresponding to the y value of lane line A and the horizontal coordinate x2 value corresponding to the y value of lane line 1 are determined respectively, and the difference between the x1 value and the x2 value is the distance difference between lane line A and lane line 1 at the coordinate y value, and then multiple different ordinate y values are calculated. n The distance difference corresponding to the value is averaged to obtain the lane line distance difference between lane line A and lane line 1. Similarly, the lane line distance difference between lane line A and vehicle-to-line 2 and lane line 3 is calculated through the above process. If the lane line distance difference between lane line A and lane line 1 is less than the threshold, the matching number of lane line A (lane line 1) is increased by 1. For lane line C, since no matching recorded lane line can be found, lane line C is used as a newly added recorded lane line. For recorded lane lines, lane line 3 does not have a matching lane line in the current environment image, and accordingly, the matching number of lane line 3 is reduced by 1.
[0125] The present application provides a vehicle, comprising: at least one processor; and a memory in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the lane line detection method in the above-mentioned embodiment one.
[0126] Reference below Figure 6 , which shows a schematic diagram of the structure of a vehicle suitable for implementing the embodiment of the present application. The vehicle in the embodiment of the present application may include but is not limited to mobile terminals such as computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as computers. Figure 6 The vehicle shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0127] like Figure 6As shown, the vehicle may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for vehicle operation are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the vehicle to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a vehicle with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0128] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0129] The vehicle provided by the present application adopts the lane line detection method in the above embodiment, which can solve the technical problem that the traditional parking solution has a high safety risk. Compared with the prior art, the beneficial effects of the vehicle provided by the present application are the same as the beneficial effects of the lane line detection method provided by the above embodiment, and the other technical features in the vehicle are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0130] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0132] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the lane line detection method in the above-mentioned embodiment.
[0133] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0134] The computer-readable storage medium may be included in the vehicle, or may exist independently without being installed in the vehicle.
[0135] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a vehicle, the vehicle:
[0136] Acquire an environment image of the vehicle, and determine a lane line cluster in each row of a pixel point sequence in the environment image, wherein the lane line cluster is composed of adjacent pixel points in the pixel point sequence that belong to a lane line area;
[0137] For any classified lane line cluster in the environment image, determine a pixel point sequence of adjacent rows in a preset direction of the row where the classified lane line cluster is located, and a target lane line cluster that matches the classified lane line cluster, wherein the classified lane line cluster is a lane line cluster to which the lane line point set has been determined to belong;
[0138] Assigning the cluster center point of the target lane line cluster to the lane line point set to which the cluster center point of the classified lane line cluster belongs;
[0139] After traversing the classified lane line clusters in the environment image, the lane lines in the environment image are generated according to the obtained lane line point set.
[0140] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0142] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0143] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above lane line detection method, and can solve the technical problem that the traditional parking solution has a high safety risk. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the lane line detection method provided in the above embodiment, and will not be repeated here.
[0144] The present application also provides a computer program product, including a computer program, which implements the steps of the lane line detection method as described above when executed by a processor.
[0145] The computer program product provided in this application can solve the technical problem of lane line detection. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the lane line detection method provided in the above embodiment, which will not be repeated here.
[0146] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A lane line detection method, characterized in that: The lane line detection method comprises the following steps: Acquire an environment image of the vehicle, and determine a lane line cluster in each row of a pixel point sequence in the environment image, wherein the lane line cluster is composed of adjacent pixel points in the pixel point sequence that belong to a lane line area; For any classified lane line cluster in the environment image, determine a pixel point sequence of adjacent rows in a preset direction of the row where the classified lane line cluster is located, and a target lane line cluster that matches the classified lane line cluster, wherein the classified lane line cluster is a lane line cluster to which the lane line point set has been determined to belong; Assigning the cluster center point of the target lane line cluster to the lane line point set to which the cluster center point of the classified lane line cluster belongs; After traversing the classified lane line clusters in the environment image, the lane lines in the environment image are generated according to the obtained lane line point set.
2. The lane line detection method according to claim 1, characterized in that: The step of determining a target lane line cluster that matches the classified lane line cluster in a pixel point sequence of adjacent rows of the row where the classified lane line cluster is located comprises: Based on the cluster center point of the classified lane line cluster and the direction vector of the lane line where the classified lane line cluster is located, an estimated center point that should be located in the adjacent row pixel point sequence and belongs to the same lane line as the classified lane line cluster is estimated; Based on the lane line cluster whose cluster center point is closest to the estimated center point in the adjacent row pixel point sequence, a target lane line cluster matching the classified lane line cluster is determined.
3. The lane line detection method according to claim 1, characterized in that: The step of generating the lane lines in the environment image according to the obtained lane line point set comprises: For any lane line point set to be fitted in the obtained lane line point set, convert the center point of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located, so as to obtain the center point position of the lane line corresponding to the lane line point set to be fitted; Line segment fitting is performed based on the positions of each center point to obtain the lane line of the lane line point set to be fitted in the environment image.
4. The lane line detection method according to claim 3, characterized in that: Before the step of converting the center points of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located, the method includes: Determine the number of cluster center points in the lane line point set to be fitted; When the number of cluster center points is less than or equal to a preset number threshold, discarding the lane line point set to be fitted; When the number of cluster center points is greater than the preset number threshold, the step of converting the center points of each cluster in the lane line point set to be fitted from the camera coordinate system corresponding to the environment image to the world coordinate system where the vehicle is located is performed.
5. The lane line detection method according to claim 1, characterized in that: After the step of generating the lane lines in the environment image according to the obtained lane line point set, the method comprises: For any lane line to be matched in the environment image, matching the lane line to be matched with a recorded lane line of the vehicle; If there is a recorded lane line that matches the lane line to be matched, the matching number of the recorded lane lines that matches the lane line to be matched is increased once; If there is no recorded lane line that matches the lane line to be matched, the lane line to be matched is used as a newly added recorded lane line; Output the recorded lane lines whose matching number is greater than a preset first number threshold.
6. The lane line detection method according to claim 5, characterized in that: After the step of matching the lane line to be matched with the recorded lane line of the vehicle, the method includes: When there are recorded lane lines of the vehicle that do not match any lane lines in the environment image, reducing the number of matches of the recorded lane lines that do not match any lane lines in the environment image; Discard recorded lane lines whose matching number is less than a preset second number threshold, wherein the preset second number threshold is less than the first number threshold, and the preset second number threshold is less than or equal to zero.
7. The lane line detection method according to claim 5, characterized in that: The step of outputting the recorded lane lines whose matching number is greater than a preset first number threshold comprises: For any target recorded lane line whose matching number is greater than a preset first number threshold, determine the lane line endpoints of the target recorded lane line in different environmental images within a preset time sliding window to obtain a first endpoint collection and a second endpoint collection, wherein the first endpoint collection is composed of lane line endpoints formed by one end of the target recorded lane line in the different environmental images, and the second endpoint collection is composed of lane line endpoints formed by the other end of the target recorded lane line in the different environmental images; Generate a first average endpoint through the first endpoint collection, and generate a second average endpoint through the second endpoint collection; The output after smoothing the target recorded lane line based on the first average endpoint and the second average endpoint.
8. The lane line detection method according to claim 5, characterized in that: The step of matching the lane line to be matched with the recorded lane line of the vehicle comprises: Calculating a lane line distance difference between the lane line to be matched and a recorded lane line of the vehicle; If the lane line difference between the recorded lane line and the lane line to be matched is less than the preset distance error threshold, it is determined that there is a recorded lane line that matches the lane line to be matched; If there is no recorded lane line whose lane line distance difference with the lane line to be matched is less than a preset distance error threshold, it is determined that there is no recorded lane line that matches the lane line to be matched.
9. The lane line detection method according to claim 8, characterized in that: The step of calculating the lane line distance difference between the lane line to be matched and the recorded lane line of the vehicle comprises: For any recorded lane line to be matched among the recorded lane lines of the vehicle, determine the difference between the second coordinate values of the recorded lane line to be matched and the lane line to be matched at the same first coordinate value, and obtain the distance difference between the recorded lane line to be matched and the lane line to be matched at a position; After selecting multiple different first coordinate values to obtain the distance difference between the recorded lane line to be matched and the lane line to be matched at different positions, the average value of each distance difference is calculated to obtain the lane line distance difference between the recorded lane line to be matched and the lane line to be matched.
10. The lane line detection method according to any one of claims 1 to 9, characterized in that: Before the step of determining the lane line clusters in each row of pixel point sequence in the environment image, the method includes: The environment image is input into a preset lane line detection model to obtain the lane line area in the environment image, the horizontal vector information of the environment image and the vertical vector information of the environment image, wherein the horizontal vector information represents the relative position relationship between any lane line pixel point in the lane line area and the cluster center point of the lane line cluster to which the lane line pixel point belongs, and is used to determine the lane line clusters in each row of pixel point sequence and the cluster center point of each lane line cluster, and the vertical vector information is used to represent the vector information between the pixel point in any lane line cluster and the pixel point in the adjacent lane line cluster, and the vector information is used to determine the direction vector of the lane line to which the lane line cluster belongs.
11. A vehicle, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of lane line detection according to any one of claims 1 to 10.
12. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of lane line detection according to any one of claims 1 to 10 are implemented.