CN113239906A  Lane line detection method and device  Google Patents
Lane line detection method and device Download PDFInfo
 Publication number
 CN113239906A CN113239906A CN202110775791.5A CN202110775791A CN113239906A CN 113239906 A CN113239906 A CN 113239906A CN 202110775791 A CN202110775791 A CN 202110775791A CN 113239906 A CN113239906 A CN 113239906A
 Authority
 CN
 China
 Prior art keywords
 lane line
 lane
 segment
 vertical distance
 preset
 Prior art date
 Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
 Granted
Links
 238000001514 detection method Methods 0.000 title abstract 3
Classifications

 G—PHYSICS
 G06—COMPUTING; CALCULATING; COUNTING
 G06K—RECOGNITION OF DATA; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
 G06K9/00—Methods or arrangements for reading or recognising printed or written characters or for recognising patterns, e.g. fingerprints
 G06K9/00624—Recognising scenes, i.e. recognition of a whole field of perception; recognising scenespecific objects
 G06K9/00791—Recognising scenes perceived from the perspective of a land vehicle, e.g. recognising lanes, obstacles or traffic signs on road scenes
 G06K9/00798—Recognition of lanes or road borders, e.g. of lane markings, or recognition of driver's driving pattern in relation to lanes perceived from the vehicle; Analysis of car trajectory relative to detected road

 G—PHYSICS
 G06—COMPUTING; CALCULATING; COUNTING
 G06K—RECOGNITION OF DATA; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
 G06K9/00—Methods or arrangements for reading or recognising printed or written characters or for recognising patterns, e.g. fingerprints
 G06K9/20—Image acquisition
 G06K9/34—Segmentation of touching or overlapping patterns in the image field
 G06K9/342—Cutting or merging image elements, e.g. region growing, watershed, clusteringbased techniques

 G—PHYSICS
 G06—COMPUTING; CALCULATING; COUNTING
 G06K—RECOGNITION OF DATA; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
 G06K9/00—Methods or arrangements for reading or recognising printed or written characters or for recognising patterns, e.g. fingerprints
 G06K9/62—Methods or arrangements for recognition using electronic means
 G06K9/6201—Matching; Proximity measures
Abstract
The disclosure relates to the technical field of unmanned driving, and provides a lane line detection method and device. The method is applied to an unmanned vehicle, i.e. an autonomous or driverless device, comprising: acquiring a first key point of a first lane line and a second key point of a second lane line, and segmenting the first lane line and the second lane line respectively according to the first key point and the second key point to obtain a first lane line segment and a second lane line segment; when the vector included angle between the first lane line segment and the second lane line segment is smaller than a preset angle threshold value, calculating first and second vertical distances from a first end point and a second end point of the first lane line segment to the second lane line segment respectively, and third and fourth vertical distances from a third end point and a fourth end point of the second lane line segment to the first lane line segment respectively; determining that the first and second lane lines are two lane lines of the same lane when at least one of the first and third vertical distances and at least one of the second and fourth vertical distances are less than a preset distance threshold. The present disclosure improves the accuracy of lane line detection.
Description
Technical Field
The present disclosure relates to the field of unmanned driving technologies, and in particular, to a lane line detection method and apparatus, an electronic device, and a computerreadable storage medium.
Background
Unmanned driving is a future trend of intelligent traffic. In the unmanned technology, the traditional electronic navigation map cannot meet the requirement of unmanned driving, and the highprecision map becomes the key infrastructure of the unmanned vehicle. The roads in the highprecision map are mainly used for path planning and vehicle positioning of the unmanned vehicle, the lanes are the minimum units of the roads in the highprecision map, and the automatic production of the highprecision map comprises a process of determining the lanes.
However, in the prior art, due to the situations of errors during data acquisition, fuzzy lane lines, vehicle occlusion, and blocking, the shapes and lengths of two lane lines of the same lane may not be consistent, so that two lane lines of the same lane cannot be accurately detected.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a lane line detection method, a lane line detection device, an electronic device, and a computerreadable storage medium, so as to solve the problem in the prior art that due to the situations of error during data acquisition, lane line blur, vehicle occlusion, and separation, shapes and lengths of two lane lines of the same lane may be inconsistent, which results in that two lane lines of the same lane cannot be accurately detected.
In a first aspect of the embodiments of the present disclosure, a lane line detection method is provided, including: acquiring a first key point of a first lane line and a second key point of a second lane line, and segmenting the first lane line and the second lane line according to the first key point and the second key point respectively to obtain at least one first lane line segment and at least one second lane line segment; comparing the at least one first lane line segment with the at least one second lane line segment to determine whether the at least one first lane line segment and the at least one second lane line segment meet a preset condition, wherein the preset condition comprises that a vector included angle is smaller than a preset angle threshold; under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is smaller than a preset angle threshold value, calculating a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane line segment to the second lane line segment respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane line segment to the first lane line segment respectively; determining that the first lane line and the second lane line are two lane lines of the same lane if at least one of the first vertical distance and the third vertical distance is less than a preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is less than a preset distance threshold.
In a second aspect of the embodiments of the present disclosure, there is provided a lane line detection apparatus, including: the segmentation module is configured to acquire a first key point of a first lane line and a second key point of a second lane line, and segment the first lane line and the second lane line according to the first key point and the second key point respectively to obtain at least one first lane line segment and at least one second lane line segment; a comparison module configured to compare the at least one first lane segment and the at least one second lane segment to determine whether the at least one first lane segment and the at least one second lane segment satisfy a preset condition, wherein the preset condition includes that a vector included angle is smaller than a preset angle threshold; the calculation module is configured to calculate a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane segment to the second lane segment, respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane segment to the first lane segment, respectively, under the condition that a vector included angle between one first lane segment of the at least one first lane segment and one second lane segment of the at least one second lane segment is smaller than a preset angle threshold; a determination module configured to determine that the first lane line and the second lane line are two lane lines of the same lane if at least one of the first vertical distance and the third vertical distance is less than a preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is less than a preset distance threshold.
In a third aspect of the embodiments of the present disclosure, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
In a fourth aspect of the embodiments of the present disclosure, a computerreadable storage medium is provided, which stores a computer program, which when executed by a processor, implements the steps of the abovementioned method.
Compared with the prior art, the embodiment of the disclosure has the following beneficial effects: the method comprises the steps of obtaining a first key point of a first lane line and a second key point of a second lane line, and respectively segmenting the first lane line and the second lane line according to the first key point and the second key point to obtain at least one first lane line segment and at least one second lane line segment; comparing the at least one first lane line segment with the at least one second lane line segment to determine whether the at least one first lane line segment and the at least one second lane line segment meet a preset condition, wherein the preset condition comprises that a vector included angle is smaller than a preset angle threshold; under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is smaller than a preset angle threshold value, calculating a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane line segment to the second lane line segment respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane line segment to the first lane line segment respectively; under the condition that at least one of the first vertical distance and the third vertical distance is smaller than a preset distance threshold value and at least one of the second vertical distance and the fourth vertical distance is smaller than a preset distance threshold value, the first lane line and the second lane line are determined to be two lane lines of the same lane, and whether the two lane lines belong to the same lane can be automatically detected, so that the accuracy of lane line detection is improved, and the safety of unmanned driving is further improved.
Drawings
To more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without inventive efforts.
Fig. 1 is a flowchart of a lane line detection method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic illustration of a first lane line and a second lane line provided by an embodiment of the present disclosure;
fig. 3 is a flowchart of another lane line detection method provided by the embodiment of the present disclosure;
fig. 4 is a flowchart of another lane line detection method provided by the embodiment of the present disclosure;
fig. 5 is a block diagram of a lane line detection apparatus provided in an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the disclosed embodiments. However, it will be apparent to one skilled in the art that the present disclosure may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of wellknown systems, devices, circuits, and methods are omitted so as not to obscure the description of the present disclosure with unnecessary detail.
Fig. 1 is a flowchart of a lane line detection method according to an embodiment of the present disclosure. The lane line detection method of fig. 1 may be performed by a server. As shown in fig. 1, the lane line detection method includes:
s101, acquiring a first key point of a first lane line and a second key point of a second lane line, and segmenting the first lane line and the second lane line according to the first key point and the second key point respectively to obtain at least one first lane line segment and at least one second lane line segment;
s102, comparing at least one first lane line segment with at least one second lane line segment to determine whether the at least one first lane line segment and the at least one second lane line segment meet preset conditions or not, wherein the preset conditions comprise that a vector included angle is smaller than a preset angle threshold;
s103, under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is smaller than a preset angle threshold value, calculating a first vertical distance and a second vertical distance from a first end point and a second end point of the first lane line segment to the second lane line segment respectively, and a third vertical distance and a fourth vertical distance from a third end point and a fourth end point of the second lane line segment to the first lane line segment respectively;
and S104, determining that the first lane line and the second lane line are two lane lines of the same lane under the condition that at least one of the first vertical distance and the third vertical distance is smaller than a preset distance threshold value and at least one of the second vertical distance and the fourth vertical distance is smaller than the preset distance threshold value.
Specifically, the server acquires a first key point of a first lane line and a second key point of a second lane line, and divides the first lane line and the second lane line according to the first key point and the second key point respectively to obtain at least one first lane line segment and at least one second lane line segment; further, the server compares the at least one first lane line segment and the at least one second lane line segment to determine whether the at least one first lane line segment and the at least one second lane line segment meet a preset condition, wherein the preset condition comprises that a vector included angle is smaller than a preset angle threshold; under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is smaller than a preset angle threshold value, the server calculates a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane line segment to the second lane line segment respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane line segment to the first lane line segment respectively, and determines that the first lane line and the second lane line are two lane lines of the same lane under the condition that at least one of the first vertical distance and the third vertical distance is smaller than the preset distance threshold value and at least one of the second vertical distance and the fourth vertical distance is smaller than the preset distance threshold value.
Here, the server may be a server providing various services, for example, a backend server acquiring a first key point of a first lane line and a second key point of a second lane line, and the backend server may divide the first lane line and the second lane line based on the acquired first key point and the acquired second key point, respectively. The server may be one server, or a server cluster composed of a plurality of servers, or may also be one cloud computing service center, which is not limited in this disclosure. Further, the server may be hardware or software. When the server is hardware, it may be various electronic devices that provide various services; when the server is software, it may be implemented as a plurality of software or software modules providing various services, or may be implemented as a single software or software module providing various services, which is not limited by the embodiment of the present disclosure.
The lane, also called lane, is a road for vehicles to travel through. Lane lines refer to markings of a lane, including but not limited to white dashed and solid lines, yellow dashed and solid lines, no stop lines, speed reduction markings, diversion lines, guidance indication lines, stop lines, illusion markings, intervehicle distance confirmation lines, and the like.
Key points refer to points that are important for analyzing a problem. In extracting the key points, the edges should be used as an important reference basis, but not necessarily the only basis, and for a certain object, the key points should be points expressing certain features, not just edge points. The point that is helpful in analyzing a particular problem may be referred to as a keypoint. The first and second key points are points that divide the first and second lane lines. The number of the first keypoints and the second keypoints can be 0, 1, 2 or more, which is not limited by the embodiments of the present disclosure. For example, when the number of the first key points is 0, it indicates that the first lane segments are connected end to end; when the number of the second key points is 1, it indicates that the second lane line includes two second lane lines, that is, one second lane line from the head point to the second key point, and the other second lane line from the second key point to the tail point. A segment (segment) refers to a finite portion (including two end points) between two points on a straight line.
Vectors, also known as euclidean vectors, geometric vectors, refer to quantities having a magnitude and a direction, which may be visually represented as arrowed line segments. The angle of the vectors is the angle formed by two nonzero vectors. The preset condition may include that the included angle of the vector is smaller than a preset angle threshold. The preset angle threshold may be an angle threshold preset by a user according to empirical data, or an angle threshold obtained by adjusting the set angle threshold according to actual needs by the user, which is not limited in the embodiment of the present disclosure. For example, the preset angle threshold may be 5 °, 10 °, 15 °, 20 °, 25 °, 30 °, and so on. Preferably, in the disclosed embodiment, the preset angle threshold is 20 °, i.e. the angle between the first lane line segment and the second lane line segment is less than 20 °.
The vertical distance is the distance from the point to the straight line, i.e. the distance from the point to the foot, through which the vertical line of the target straight line is made. The preset distance threshold may be a distance threshold preset by the user according to empirical data, or may be a distance threshold obtained by adjusting the set distance threshold according to actual needs by the user, which is not limited in the embodiment of the present disclosure. For example, the preset distance threshold may be 4 meters, 4.5 meters, 5 meters, 5.5 meters, and so on. Preferably, in the disclosed embodiment, the preset distance threshold is 4.5 meters, i.e. the width of one lane.
According to the technical scheme provided by the embodiment of the disclosure, at least one first lane line segment and at least one second lane line segment are obtained by obtaining a first key point of a first lane line and a second key point of a second lane line and respectively segmenting the first lane line and the second lane line according to the first key point and the second key point; comparing the at least one first lane line segment with the at least one second lane line segment to determine whether the at least one first lane line segment and the at least one second lane line segment meet a preset condition, wherein the preset condition comprises that a vector included angle is smaller than a preset angle threshold; under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is smaller than a preset angle threshold value, calculating a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane line segment to the second lane line segment respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane line segment to the first lane line segment respectively; under the condition that at least one of the first vertical distance and the third vertical distance is smaller than a preset distance threshold value and at least one of the second vertical distance and the fourth vertical distance is smaller than a preset distance threshold value, the first lane line and the second lane line are determined to be two lane lines of the same lane, and whether the two lane lines belong to the same lane can be automatically detected, so that the accuracy of lane line detection is improved, and the safety of unmanned driving is further improved.
In some embodiments, obtaining a first keypoint of a first lane line and a second keypoint of a second lane line comprises: and respectively performing thinning on the first lane line and the second lane line by using a DouglasPuck algorithm to obtain a first key point of the first lane line and a second key point of the second lane line.
Specifically, the Douglaspuck (DP) algorithm, also called the larmerDouglaspuck algorithm, the iterative adaptive point algorithm, the split and merge algorithm, is an algorithm that approximately represents a curve as a series of points and reduces the number of points. The algorithm has the advantages of translation and rotation invariance, and a sampling result is constant after a curve and a threshold value are given.
Thinning refers to a process of reducing the number of data points to the maximum extent under the condition of ensuring that the shape of a vector curve is not changed. After the data is thinned, the quantity of the data is greatly reduced, the basic shape characteristics of the original graph or curve can be basically reflected, and the space and the time can be saved for further processing.
The DP algorithm considers a complete curve or a certain line segment from the overall perspective, and its basic idea is: virtually connecting a straight line with the first point and the last point of the curve, solving the distance between all the points on the curve and the straight line, finding out the maximum distance value dmax, and comparing the maximum distance value dmax with a preset threshold value D; if dmax < D, then the middle points on this curve are all dropped; if dmax is larger than or equal to D, a coordinate point corresponding to dmax is reserved, the curve is divided into two parts by taking the point as a boundary, the method is repeatedly used for the two parts, namely the steps are repeated until all dmax is smaller than D, namely the thinning of the curve is completed. The rarefying precision of the DP algorithm is also related to a threshold value, the larger the threshold value is, the greater the simplification degree is, and the more the points are reduced; conversely, the lower the degree of simplification, the more points remain, and the more the shape tends to the original curve.
According to the technical scheme provided by the embodiment of the disclosure, the first lane line and the second lane line are thinned by utilizing the DouglasPock algorithm, so that the calculation amount can be reduced, the calculation efficiency is improved, and the space and the time are saved.
In some embodiments, the lane line detection method further includes: under the condition that the vector included angle between the first lane line segment and the second lane line segment is larger than or equal to a preset angle threshold value, calculating the vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segment; and under the condition that the vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segment is larger than or equal to a preset angle threshold value, calculating the vector included angle between the remaining first lane line segments except the first lane line segment and all the second lane line segments until the vector included angles between all the first lane line segments and all the second lane line segments are calculated.
Specifically, under the condition that the vector included angle between the first lane line segment and the second lane line segment is larger than or equal to the preset angle threshold, the server determines that the first lane line segment is not matched with the second lane line segment, at this time, the server calculates vector angles between the first lane line segments and the remaining second lane line segments excluding the second lane line segments, respectively, if the vector angle between the first lane segment and the remaining second lane segments other than the second lane segment is greater than or equal to a preset angle threshold, and calculating the vector included angles between the remaining first lane line segments except the first lane line segment and all the second lane line segments respectively, and repeating the steps until the vector included angles between all the first lane line segments and all the second lane line segments are calculated, so that the comprehensiveness of lane line detection and the accuracy of lane line matching are improved.
In some embodiments, the lane line detection method further includes: determining that the first lane line and the second lane line are not two lane lines of the same lane under the condition that the included angle of the vectors is greater than or equal to a preset angle threshold; or under the condition that the vector included angle is smaller than a preset angle threshold, if the first vertical distance and the third vertical distance are both larger than or equal to a preset distance threshold, determining that the first lane line and the second lane line are not two lane lines of the same lane; or under the condition that the vector included angle is smaller than the preset angle threshold, if the second vertical distance and the fourth vertical distance are both larger than or equal to the preset distance threshold, determining that the first lane line and the second lane line are not two lane lines of the same lane; or under the condition that the vector included angle is smaller than the preset angle threshold, if at least three of the first vertical distance, the second vertical distance, the third vertical distance and the fourth vertical distance are larger than or equal to the preset distance threshold, determining that the first lane line and the second lane line are not two lane lines of the same lane.
Specifically, the method of determining that the first lane line and the second lane line are not two lane lines of the same lane may include, but is not limited to, that a vector angle between at least one first lane line segment of the first lane line and at least one second lane line segment of the second lane line is greater than or equal to a preset threshold, that a first perpendicular distance from a first endpoint of the first lane line segment to the second lane line segment and a third perpendicular distance from a third endpoint of the second lane line segment to the first lane line segment are both greater than or equal to a preset distance threshold, that a second perpendicular distance from a second endpoint of the first lane line segment to the second lane line segment and a fourth perpendicular distance from a fourth endpoint of the second lane line segment to the first lane line segment are both greater than or equal to a preset distance threshold, that at least three of the first perpendicular distance, the second perpendicular distance, the third perpendicular distance and the fourth perpendicular distance are greater than or equal to a preset distance threshold, and so on, the disclosed embodiments are not so limited.
In some embodiments, the lane line detection method further includes: under the condition that the first lane line and the second lane line are not two lane lines of the same lane, acquiring a third key point of a third lane line, and dividing the third lane line according to the third key point to obtain at least one third lane line segment; calculating a vector included angle between the first lane line segment and one of the at least one third lane line segment; under the condition that the vector included angle is smaller than a preset angle threshold value, calculating a fifth vertical distance and a sixth vertical distance from a first endpoint and a second endpoint of the first lane segment to a third lane segment respectively, and a seventh vertical distance and an eighth vertical distance from the fifth endpoint and the sixth endpoint of the third lane segment to the first lane segment respectively; determining that the first lane line and the third lane line are two lane lines of the same lane, if at least one of the fifth vertical distance and the seventh vertical distance is less than a preset distance threshold and at least one of the sixth vertical distance and the eighth vertical distance is less than a preset distance threshold.
Specifically, under the condition that it is determined that the first lane line and the second lane line are not two lane lines of the same lane, the server may obtain a third key point of a third lane line, and segment the third lane line according to the third key point to obtain at least one third lane line segment; further, the server calculates a vector included angle between the first lane line segment and one of the at least one third lane line segment, and calculates a fifth vertical distance and a sixth vertical distance from a first endpoint and a second endpoint of the first lane line segment to the third lane line segment, respectively, and a seventh vertical distance and an eighth vertical distance from a fifth endpoint and a sixth endpoint of the third lane line segment to the first lane line segment, respectively, under the condition that the vector included angle is smaller than a preset angle threshold; if at least one of the fifth vertical distance and the seventh vertical distance is less than the preset distance threshold and at least one of the sixth vertical distance and the eighth vertical distance is less than the preset distance threshold, the server determines that the first lane line and the third lane line are two lane lines of the same lane.
According to the technical scheme provided by the embodiment of the disclosure, the matching probability of the lane lines can be improved by detecting the matching condition of the third lane line and the first lane line, the accuracy of lane line detection is improved, and the safety of unmanned driving is further improved.
In some embodiments, the lane line detection method further includes: and comparing the first lane line with the rest lane lines except the second lane line, and comparing the second lane line with the rest lane lines except the first lane line under the condition that the first lane line is compared with all the lane lines until any two lane lines in all the lane lines are compared.
Specifically, after comparing with the second lane line, the first lane line needs to be compared with other lane lines except the second lane line one by one; after the first lane line is compared with all lane lines, the second lane line is compared with other lane lines except the first lane line one by one, and the steps are repeated until any two lane lines in all the lane lines are compared, so that the comprehensiveness of lane line detection and the accuracy of lane line matching are improved.
It should be noted that the technical solution provided by the embodiment of the present disclosure is also applicable to scenes such as a broken end and a curve.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
Fig. 2 is a schematic view of a first lane line and a second lane line provided by an embodiment of the present disclosure. Next, a lane line detection method according to an embodiment of the present disclosure is described with reference to fig. 2.
As shown in fig. 2, a first key point a1, a second key point a2, a third key point A3, a fourth key point a4, a fifth key point a5, and a sixth key point a6 of the first lane line L1, and a first key point B1, a second key point B2, a third key point B3, a fourth key point B4, a fifth key point B5, and a sixth key point B6 of the second lane line L2 are obtained by using a douglaspock algorithm to respectively thin the first lane line L1 and the second lane line L2. Segmenting a first track line L1 based on six key points A1A6 of the first track line L1 to obtain five first track line segments, namely L1.1, L1.2, L1.3, L1.4 and L1.5; the second lane line L2 is segmented based on six key points B1B6 of the second lane line L2 to obtain five second lane line segments, i.e., L2.1, L2.2, L2.3, L2.4, and L2.5.
Further, according to the sequence from the head end to the tail end, vector included angles between a first lane line segment L1.1 of the first lane line L1 and five second lane line segments L2.1L2.5 of the second lane line L2 are respectively calculated, the calculated vector included angles are compared with a preset angle threshold, if the vector included angles are smaller than the preset angle threshold, the vertical distances from the head end and the tail end of the first lane line segment L1.1 to the second lane line segments meeting the vector included angle condition and the vertical distances from the head end and the tail end of the second lane line segments to the first lane line segment L1.1 are further calculated, and if the preset condition is met, the first lane line L1 and the second lane line L2 are determined to be two lane lines of the same lane.
For example, assuming that the preset angle threshold is 20 ° and the preset distance threshold is 4.5 meters, taking the first lane line segment L1.4 and the second lane line segment L2.3 as an example, it is assumed that the vector included angle between the first lane line segment L1.4 and the second lane line segment L2.3 is obtained through calculationθIs 15 deg., is smaller than the preset angle threshold value of 20 deg., it may be determined that the first lane segment L1.4 and the second lane segment L2.3 satisfy the preset angle condition.
Further, the vertical distances R2 and R4 of the fourth and fifth keypoints a4 and a5, respectively, of the first lane segment L1.4 to the R1 and R3, respectively, of the second lane segment L2.3, and the third and fourth keypoints B3 and B4, respectively, of the second lane segment L2.3 to the first lane segment L1.4 are calculated. As can be seen from fig. 2, the perpendicular point a 4' of the fourth key point a4 of the first lane segment L1.4 is not on the second lane segment L2.3, but on the extension S2 of the second lane segment L2.3, and therefore, the fourth key point a4 is not considered; a perpendicular point B3' of the third key point B3 of the second lane segment L2.3 is at the first lane segment L1.4, and therefore, a vertical distance R2 from the third key point B3 of the second lane segment L2.3 to the first lane segment L1.4 is less than a preset distance threshold of 4.5 meters; the vertical point a 5' of the fifth keypoint a5 of the first lane segment L1.4 is on the second lane segment L2.3, and therefore, the vertical distance R3 from the fifth keypoint a5 of the first lane segment L1.4 to the second lane segment L2.3 is less than the preset distance threshold of 4.5 meters; a perpendicular point B4' of the fourth key point B4 of the second lane segment L2.3 is not on the first lane segment L1.4, but on an extension S1 of the first lane segment L1.4, and therefore, the fourth key point B4 is not considered.
Therefore, the vector included angle between the first lane line segment L1.4 and the second lane line segment L2.3 is smaller than the preset angle threshold, the vertical distance R2 from the third key point B3 of the second lane line segment L2.3 to the first lane line segment L1.4 is smaller than the preset distance threshold, and the vertical distance R3 from the fifth key point a5 of the first lane line segment L1.4 to the second lane line segment L2.3 is smaller than the preset distance threshold, so that it is determined that the first lane line L1 and the second lane line L2 are two lane lines of the same lane.
Fig. 3 is a flowchart of another lane line detection method provided in the embodiment of the present disclosure. The lane line detection method of fig. 3 may be performed by a server. As shown in fig. 3, the lane line detection method includes:
s301, respectively performing thinning on the first lane line and the second lane line by using a DouglasPock algorithm to obtain a first key point of the first lane line and a second key point of the second lane line;
s302, segmenting a first lane line and a second lane line according to a first key point and a second key point respectively to obtain at least one first lane line segment and at least one second lane line segment;
s303, calculating a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment, determining whether the vector included angle is smaller than a preset angle threshold value, and if so, executing S304; otherwise, executing S306;
s304, calculating a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane segment to the second lane segment respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane segment to the first lane segment respectively;
s305, determining that the first lane line and the second lane line are two lane lines of the same lane under the condition that at least one of the first vertical distance and the third vertical distance is smaller than a preset distance threshold value and at least one of the second vertical distance and the fourth vertical distance is smaller than the preset distance threshold value;
s306, calculating a vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segment;
s307, under the condition that the vector included angle is larger than or equal to the preset angle threshold value, calculating the vector included angle between the remaining first lane line segments except the first lane line segment and all second lane line segments until the vector included angles between all the first lane line segments and all the second lane line segments are calculated.
Specifically, a first lane line and a second lane line are respectively subjected to thinning by using a DouglasPuck algorithm to obtain a first key point of the first lane line and a second key point of the second lane line, and a server divides the first lane line and the second lane line according to the first key point and the second key point to obtain at least one first lane line segment and at least one second lane line segment; further, the server calculates a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment, calculates a first vertical distance and a second vertical distance from a first end point and a second end point of the first lane line segment to the second lane line segment, respectively, and calculates a third vertical distance and a fourth vertical distance from a third end point and a fourth end point of the second lane line segment to the first lane line segment, respectively, when the vector included angle is smaller than a preset angle threshold, and determines that the first lane line and the second lane line are two lane lines of the same lane, when at least one of the first vertical distance and the third vertical distance is smaller than the preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is smaller than the preset distance threshold; and under the condition that the vector included angle is larger than or equal to the preset angle threshold value, the server calculates the vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segment, and under the condition that the vector included angle is larger than or equal to the preset angle threshold value, the server calculates the vector included angle between the remaining first lane line segments except the first lane line segment and all the second lane line segments until the vector included angles between all the first lane line segments and all the second lane line segments are calculated.
According to the technical scheme provided by the embodiment of the disclosure, the first lane line and the second lane line are segmented based on the first key point and the second key point to obtain at least one first lane line segment and at least one second lane line segment; the method comprises the steps of judging the angle and the distance of each first lane line segment in at least one first lane line segment and each second lane line segment in at least one second lane line segment, determining that the first lane line and the second lane line are two lane lines of the same lane under the condition that the angle and the distance meet preset conditions, and realizing automatic detection of the two lane lines of the same lane under the condition that manual marking intervention is not needed, so that the accuracy of lane line detection is improved, and the safety of unmanned driving is further improved.
Fig. 4 is a flowchart of another lane line detection method according to an embodiment of the present disclosure. The lane line detection method of fig. 4 may be performed by a server. As shown in fig. 4, the lane line detection method includes:
s401, respectively performing thinning on a first lane line and a second lane line by using a DouglasPuck algorithm to obtain a first key point of the first lane line and a second key point of the second lane line;
s402, segmenting a first lane line and a second lane line according to the first key point and the second key point respectively to obtain at least one first lane line segment and at least one second lane line segment;
s403, calculating a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment, determining whether the vector included angle is smaller than a preset angle threshold value, and if so, executing S404; otherwise, executing S411;
s404, calculating a first vertical distance and a second vertical distance from a first end point and a second end point of the first lane line segment to the second lane line segment respectively, and a third vertical distance and a fourth vertical distance from a third end point and a fourth end point of the second lane line segment to the first lane line segment respectively;
s405, determining whether at least one of the first vertical distance and the third vertical distance is less than a preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is less than a preset distance threshold, if so, performing S406; otherwise, executing S407;
s406, determining that the first lane line and the second lane line are two lane lines of the same lane;
s407, acquiring a third key point of a third lane line, and segmenting the third lane line according to the third key point to obtain at least one third lane line segment;
s408, calculating a vector included angle between the first lane line segment and one of the at least one third lane line segment;
s409, under the condition that the included angle of the vector is smaller than a preset angle threshold, calculating a fifth vertical distance and a sixth vertical distance from the first endpoint and the second endpoint of the first lane segment to the third lane segment respectively, and calculating a seventh vertical distance and an eighth vertical distance from the fifth endpoint and the sixth endpoint of the third lane segment to the first lane segment respectively;
s410, under the condition that at least one of the fifth vertical distance and the seventh vertical distance is smaller than a preset distance threshold value and at least one of the sixth vertical distance and the eighth vertical distance is smaller than the preset distance threshold value, determining that the first lane line and the third lane line are two lane lines of the same lane;
s411, calculating a vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segment;
and S412, under the condition that the vector included angle is greater than or equal to the preset angle threshold, calculating the vector included angles between the remaining first lane line segments except the first lane line segment and all the second lane line segments until the vector included angles between all the first lane line segments and all the second lane line segments are calculated.
Specifically, a first lane line and a second lane line are respectively subjected to thinning by using a DouglasPuck algorithm to obtain a first key point of the first lane line and a second key point of the second lane line, and a server divides the first lane line and the second lane line according to the first key point and the second key point to obtain at least one first lane line segment and at least one second lane line segment; further, the server calculates a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment, calculates a first vertical distance and a second vertical distance from a first end point and a second end point of the first lane line segment to the second lane line segment, respectively, and calculates a third vertical distance and a fourth vertical distance from a third end point and a fourth end point of the second lane line segment to the first lane line segment, respectively, under the condition that the vector included angle is smaller than a preset angle threshold, and if at least one of the first vertical distance and the third vertical distance is smaller than the preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is smaller than the preset distance threshold, the server determines that the first lane line and the second lane line are two lane lines of the same lane; if the first vertical distance and the third vertical distance are both greater than or equal to a preset distance threshold, or the second vertical distance and the fourth vertical distance are both greater than or equal to a preset distance threshold, or at least three of the first vertical distance, the second vertical distance, the third vertical distance and the fourth vertical distance are greater than or equal to a preset distance threshold, the server acquires a third key point of the third lane line, and segments the third lane line according to the third key point to obtain at least one third lane line segment; further, the server calculates a vector included angle between the first lane line segment and one of the at least one third lane line segment, and calculates a fifth vertical distance and a sixth vertical distance from a first endpoint and a second endpoint of the first lane line segment to the third lane line segment, respectively, and a seventh vertical distance and an eighth vertical distance from a fifth endpoint and a sixth endpoint of the third lane line segment to the first lane line segment, respectively, when the vector included angle is smaller than a preset angle threshold, and when at least one of the fifth vertical distance and the seventh vertical distance is smaller than the preset distance threshold, and at least one of the sixth vertical distance and the eighth vertical distance is smaller than the preset distance threshold, determines that the first lane line and the third lane line are two lane lines of the same lane; under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is larger than or equal to a preset threshold value, the server calculates the vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segments, and under the condition that the vector included angle is larger than or equal to the preset angle threshold value, the server calculates the vector included angle between the remaining first lane line segments except the first lane line segment and all the second lane line segments until the vector included angles between all the first lane line segments and all the second lane line segments are calculated.
According to the technical scheme provided by the embodiment of the disclosure, through carrying out angle and distance judgment on any two lane lines in the multiple lane lines, whether the two lane lines belong to the same lane can be automatically detected, so that the accuracy of lane line detection is improved, and the safety of unmanned driving is further improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 5 is a block diagram of a lane line detection apparatus provided in the embodiment of the present disclosure. As shown in fig. 5, the lane line detecting apparatus includes:
the segmentation module 501 is configured to obtain a first key point of a first lane line and a second key point of a second lane line, and segment the first lane line and the second lane line according to the first key point and the second key point, so as to obtain at least one first lane line segment and at least one second lane line segment;
a comparison module 502 configured to compare the at least one first lane segment and the at least one second lane segment to determine whether the at least one first lane segment and the at least one second lane segment satisfy a preset condition, wherein the preset condition includes that a vector included angle is smaller than a preset angle threshold;
a calculating module 503 configured to calculate a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane segment to the second lane segment, respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane segment to the first lane segment, respectively, in a case that a vector included angle between one of the at least one first lane segment and one of the at least one second lane segment is smaller than a preset angle threshold;
a determining module 504 configured to determine that the first lane line and the second lane line are two lane lines of the same lane if at least one of the first vertical distance and the third vertical distance is less than a preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is less than a preset distance threshold.
According to the technical scheme provided by the embodiment of the disclosure, at least one first lane line segment and at least one second lane line segment are obtained by obtaining a first key point of a first lane line and a second key point of a second lane line and respectively segmenting the first lane line and the second lane line according to the first key point and the second key point; comparing the at least one first lane line segment with the at least one second lane line segment to determine whether the at least one first lane line segment and the at least one second lane line segment meet a preset condition, wherein the preset condition comprises that a vector included angle is smaller than a preset angle threshold; under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is smaller than a preset angle threshold value, calculating a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane line segment to the second lane line segment respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane line segment to the first lane line segment respectively; under the condition that at least one of the first vertical distance and the third vertical distance is smaller than a preset distance threshold value and at least one of the second vertical distance and the fourth vertical distance is smaller than a preset distance threshold value, the first lane line and the second lane line are determined to be two lane lines of the same lane, and whether the two lane lines belong to the same lane can be automatically detected, so that the accuracy of lane line detection is improved, and the safety of unmanned driving is further improved.
In some embodiments, the segmentation module 501 of fig. 5 utilizes a douglaspock algorithm to respectively thin the first lane line and the second lane line, resulting in a first keypoint of the first lane line and a second keypoint of the second lane line.
In some embodiments, in the case that the vector angle between the first lane segment and the second lane segment is greater than or equal to the preset angle threshold, the calculation module 503 of fig. 5 calculates the vector angle between the first lane segment and the remaining second lane segments except the second lane segment; under the condition that the vector included angle is greater than or equal to the preset angle threshold, the calculation module 503 of fig. 5 calculates the vector included angles between the remaining first lane line segments except the first lane line segment and all the second lane line segments until the vector included angles between all the first lane line segments and all the second lane line segments are calculated.
In some embodiments, in the case that the vector included angle is smaller than the preset angle threshold, if both the first vertical distance and the third vertical distance are greater than or equal to the preset distance threshold, the determining module 504 of fig. 5 determines that the first lane line and the second lane line are not two lane lines of the same lane; or, in the case that the vector included angle is smaller than the preset angle threshold, if both the second vertical distance and the fourth vertical distance are greater than or equal to the preset distance threshold, the determining module 504 of fig. 5 determines that the first lane line and the second lane line are not two lane lines of the same lane; alternatively, in a case that the vector included angle is smaller than the preset angle threshold, if at least three of the first vertical distance, the second vertical distance, the third vertical distance, and the fourth vertical distance are greater than or equal to the preset distance threshold, the determining module 504 of fig. 5 determines that the first lane line and the second lane line are not two lane lines of the same lane.
In some embodiments, in a case that it is determined that the first lane line and the second lane line are not two lane lines of the same lane, the segmentation module 501 of fig. 5 obtains a third key point of a third lane line, and segments the third lane line according to the third key point to obtain at least one third lane line segment; the calculation module 503 of fig. 5 calculates a vector angle between the first lane segment and one of the at least one third lane segment; under the condition that the vector included angle is smaller than a preset angle threshold value, calculating a fifth vertical distance and a sixth vertical distance from a first endpoint and a second endpoint of the first lane segment to a third lane segment respectively, and a seventh vertical distance and an eighth vertical distance from the fifth endpoint and the sixth endpoint of the third lane segment to the first lane segment respectively; the determination module 504 of fig. 5 determines that the first lane line and the third lane line are two lane lines of the same lane in the event that at least one of the fifth vertical distance and the seventh vertical distance is less than a preset distance threshold and at least one of the sixth vertical distance and the eighth vertical distance is less than a preset distance threshold.
In some embodiments, the comparison module 502 of fig. 5 compares the first lane line with all of the remaining lane lines except the second lane line, and in the event that the comparison of the first lane line with all of the lane lines is completed, compares the second lane line with the remaining lane lines except the first lane line until any two lane lines of all of the lane lines are completed.
In some embodiments, the predetermined angle threshold is 20 degrees and the predetermined distance threshold is 4.5 meters.
Fig. 6 is a schematic diagram of an electronic device 6 provided by an embodiment of the present disclosure. As shown in fig. 6, the electronic apparatus 6 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and operable on the processor 601. The steps in the various method embodiments described above are implemented when the computer program 603 is executed by the processor 601. Alternatively, the processor 601 realizes the functions of each module/unit in the abovedescribed apparatus embodiments when executing the computer program 603.
Illustratively, the computer program 603 may be partitioned into one or more modules/units, which are stored in the memory 602 and executed by the processor 601 to accomplish the present disclosure. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 603 in the electronic device 6.
The electronic device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other electronic devices. The electronic device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that fig. 6 is merely an example of an electronic device 6, and does not constitute a limitation of the electronic device 6, and may include more or fewer components than shown, or combine certain components, or different components, e.g., the electronic device may also include inputoutput devices, network access devices, buses, etc.
The Processor 601 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 602 may be an internal storage unit of the electronic device 6, for example, a hard disk or a memory of the electronic device 6. The memory 602 may also be an external storage device of the electronic device 6, such as a plugin hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device 6. Further, the memory 602 may also include both internal storage units of the electronic device 6 and external storage devices. The memory 602 is used for storing computer programs and other programs and data required by the electronic device. The memory 602 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the abovementioned division of the functional units and modules is illustrated, and in practical applications, the abovementioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other ways. For example, the abovedescribed apparatus/electronic device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, and multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the present disclosure may implement all or part of the flow of the method in the above embodiments, and may also be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the above methods and embodiments. The computer program may comprise computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, ReadOnly Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain suitable additions or additions that may be required in accordance with legislative and patent practices within the jurisdiction, for example, in some jurisdictions, computer readable media may not include electrical carrier signals or telecommunications signals in accordance with legislative and patent practices.
The above examples are only intended to illustrate the technical solutions of the present disclosure, not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present disclosure, and are intended to be included within the scope of the present disclosure.
Claims (10)
1. A lane line detection method is characterized by comprising the following steps:
acquiring a first key point of a first lane line and a second key point of a second lane line, and segmenting the first lane line and the second lane line according to the first key point and the second key point respectively to obtain at least one first lane line segment and at least one second lane line segment;
comparing the at least one first lane segment with the at least one second lane segment to determine whether the at least one first lane segment and the at least one second lane segment meet a preset condition, wherein the preset condition comprises that a vector included angle is smaller than a preset angle threshold;
under the condition that a vector included angle between one first lane line segment of the at least one first lane line segment and one second lane line segment of the at least one second lane line segment is smaller than the preset angle threshold value, calculating a first vertical distance and a second vertical distance from a first end point and a second end point of the first lane line segment to the second lane line segment respectively, and calculating a third vertical distance and a fourth vertical distance from a third end point and a fourth end point of the second lane line segment to the first lane line segment respectively;
determining that the first lane line and the second lane line are two lane lines of the same lane if at least one of the first vertical distance and the third vertical distance is less than a preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is less than the preset distance threshold.
2. The method of claim 1, wherein the obtaining a first keypoint of a first lane line and a second keypoint of a second lane line comprises:
and respectively performing thinning on the first lane line and the second lane line by using a DouglasPuck algorithm to obtain the first key point of the first lane line and the second key point of the second lane line.
3. The method of claim 1, further comprising:
under the condition that the vector included angle between the first lane line segment and the second lane line segment is larger than or equal to the preset angle threshold value, calculating the vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segment;
and under the condition that the vector included angle between the first lane line segment and the remaining second lane line segments except the second lane line segment is larger than or equal to the preset angle threshold value, calculating the vector included angle between the remaining first lane line segments except the first lane line segment and all the second lane line segments until the vector included angles between all the first lane line segments and all the second lane line segments are calculated.
4. The method of claim 1, further comprising:
under the condition that the vector included angle is smaller than a preset angle threshold, if the first vertical distance and the third vertical distance are both larger than or equal to the preset distance threshold, determining that the first lane line and the second lane line are not two lane lines of the same lane; alternatively, the first and second electrodes may be,
under the condition that the vector included angle is smaller than a preset angle threshold, if the second vertical distance and the fourth vertical distance are both larger than or equal to the preset distance threshold, determining that the first lane line and the second lane line are not two lane lines of the same lane; alternatively, the first and second electrodes may be,
and under the condition that the vector included angle is smaller than a preset angle threshold, if at least three of the first vertical distance, the second vertical distance, the third vertical distance and the fourth vertical distance are larger than or equal to the preset distance threshold, determining that the first lane line and the second lane line are not two lane lines of the same lane.
5. The method of claim 4, further comprising:
under the condition that the first lane line and the second lane line are not two lane lines of the same lane, acquiring a third key point of a third lane line, and dividing the third lane line according to the third key point to obtain at least one third lane line segment;
calculating a vector included angle between the first lane line segment and one of the at least one third lane line segment;
under the condition that the included angle of the vector is smaller than the preset angle threshold, calculating a fifth vertical distance and a sixth vertical distance from the first endpoint and the second endpoint of the first lane segment to the third lane segment respectively, and calculating a seventh vertical distance and an eighth vertical distance from the fifth endpoint and the sixth endpoint of the third lane segment to the first lane segment respectively;
determining that the first lane line and the third lane line are two lane lines of the same lane if at least one of the fifth vertical distance and the seventh vertical distance is less than the preset distance threshold and at least one of the sixth vertical distance and the eighth vertical distance is less than the preset distance threshold.
6. The method according to any one of claims 1 to 5, further comprising:
and comparing the first lane line with the rest lane lines except the second lane line, and comparing the second lane line with the rest lane lines except the first lane line under the condition that the first lane line is compared with all the lane lines until any two lane lines in all the lane lines are compared.
7. The method according to any one of claims 1 to 5, characterized in that the preset angle threshold is 20 °, and the preset distance threshold is 4.5 meters.
8. A lane line detection apparatus, comprising:
the segmentation module is configured to acquire a first key point of a first lane line and a second key point of a second lane line, and segment the first lane line and the second lane line according to the first key point and the second key point to obtain at least one first lane line segment and at least one second lane line segment;
a comparison module configured to compare the at least one first lane segment and the at least one second lane segment to determine whether the at least one first lane segment and the at least one second lane segment satisfy a preset condition, wherein the preset condition includes that a vector included angle is smaller than a preset angle threshold;
a calculation module configured to calculate a first vertical distance and a second vertical distance from a first endpoint and a second endpoint of the first lane segment to the second lane segment, respectively, and a third vertical distance and a fourth vertical distance from a third endpoint and a fourth endpoint of the second lane segment to the first lane segment, respectively, if a vector included angle between one of the at least one first lane segment and one of the at least one second lane segment is smaller than the preset angle threshold;
a determination module configured to determine that the first lane line and the second lane line are two lane lines of a same lane if at least one of the first vertical distance and the third vertical distance is less than a preset distance threshold and at least one of the second vertical distance and the fourth vertical distance is less than the preset distance threshold.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computerreadable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number  Priority Date  Filing Date  Title 

CN202110775791.5A CN113239906B (en)  20210709  20210709  Lane line detection method and device 
Applications Claiming Priority (1)
Application Number  Priority Date  Filing Date  Title 

CN202110775791.5A CN113239906B (en)  20210709  20210709  Lane line detection method and device 
Publications (2)
Publication Number  Publication Date 

CN113239906A true CN113239906A (en)  20210810 
CN113239906B CN113239906B (en)  20210921 
Family
ID=77135187
Family Applications (1)
Application Number  Title  Priority Date  Filing Date 

CN202110775791.5A Active CN113239906B (en)  20210709  20210709  Lane line detection method and device 
Country Status (1)
Country  Link 

CN (1)  CN113239906B (en) 
Citations (4)
Publication number  Priority date  Publication date  Assignee  Title 

CN106295491A (en) *  20160309  20170104  北京智芯原动科技有限公司  Track line detection method and device 
CN111291603A (en) *  20181207  20200616  长沙智能驾驶研究院有限公司  Lane line detection method, device, system and storage medium 
CN111460986A (en) *  20200330  20200728  深圳市凯立德科技股份有限公司  Lane line processing method and device 
US10783777B2 (en) *  20130314  20200922  Sirius Xm Radio Inc.  High resolution encoding and transmission of traffic information 

2021
 20210709 CN CN202110775791.5A patent/CN113239906B/en active Active
Patent Citations (4)
Publication number  Priority date  Publication date  Assignee  Title 

US10783777B2 (en) *  20130314  20200922  Sirius Xm Radio Inc.  High resolution encoding and transmission of traffic information 
CN106295491A (en) *  20160309  20170104  北京智芯原动科技有限公司  Track line detection method and device 
CN111291603A (en) *  20181207  20200616  长沙智能驾驶研究院有限公司  Lane line detection method, device, system and storage medium 
CN111460986A (en) *  20200330  20200728  深圳市凯立德科技股份有限公司  Lane line processing method and device 
Also Published As
Publication number  Publication date 

CN113239906B (en)  20210921 
Similar Documents
Publication  Publication Date  Title 

KR102210715B1 (en)  Method, apparatus and device for determining lane lines in road  
CN110412530B (en)  Method and device for identifying charging pile and robot  
US10867189B2 (en)  Systems and methods for lanemarker detection  
WO2020048152A1 (en)  Method and system for extracting parking space in underground parking lot in highprecision map making  
CN109461133B (en)  Bridge bolt falling detection method and terminal equipment  
WO2021115061A1 (en)  Image segmentation method and apparatus, and server  
CN108693517B (en)  Vehicle positioning method and device and radar  
CN111339649A (en)  Simulation method, system and equipment for collecting vehicle track data  
CN113239906B (en)  Lane line detection method and device  
CN112912894A (en)  Road boundary identification method and device  
EP3637308A1 (en)  Method and device for positioning vehicle, device, and computer readable storage medium  
US10875178B2 (en)  Motion target direction angle obtaining method, apparatus and robot using the same  
CN111422204A (en)  Automatic driving vehicle passing judgment method and related equipment  
JP6505939B1 (en)  Method of identifying charging stand, device, robot, and computer readable storage medium  
CN112147994A (en)  Robot and recharging control method and device thereof  
US20160063716A1 (en)  Line parametric object estimation  
CN111045026A (en)  Method and device for identifying pose of charging pile  
CN110632617A (en)  Laser radar point cloud data processing method and device  
CN110597249A (en)  Robot and recharging positioning method and device thereof  
CN113239905B (en)  Lane line simplification method and device, electronic equipment and storage medium  
US11034028B2 (en)  Pose determining method for mobile robot and apparatus and mobile robot thereof  
CN109117866B (en)  Lane recognition algorithm evaluation method, computer device, and storage medium  
CN113094452A (en)  Method and device for processing lane shape points and electronic equipment  
US20200201339A1 (en)  Robot movement control method and apparatus and robot using the same  
CN112198878B (en)  Instant map construction method and device, robot and storage medium 
Legal Events
Date  Code  Title  Description 

PB01  Publication  
PB01  Publication  
SE01  Entry into force of request for substantive examination  
SE01  Entry into force of request for substantive examination  
GR01  Patent grant  
GR01  Patent grant 