CN111695389A - Lane line clustering method and device - Google Patents

Lane line clustering method and device Download PDF

Info

Publication number
CN111695389A
CN111695389A CN201910199778.2A CN201910199778A CN111695389A CN 111695389 A CN111695389 A CN 111695389A CN 201910199778 A CN201910199778 A CN 201910199778A CN 111695389 A CN111695389 A CN 111695389A
Authority
CN
China
Prior art keywords
lane line
clustering
preset
feature point
lane
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
Application number
CN201910199778.2A
Other languages
Chinese (zh)
Other versions
CN111695389B (en
Inventor
周文龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Navinfo Co Ltd
Original Assignee
Navinfo Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Navinfo Co Ltd filed Critical Navinfo Co Ltd
Priority to CN201910199778.2A priority Critical patent/CN111695389B/en
Publication of CN111695389A publication Critical patent/CN111695389A/en
Application granted granted Critical
Publication of CN111695389B publication Critical patent/CN111695389B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Abstract

The embodiment of the invention provides a lane line clustering method and a lane line clustering device, wherein the method comprises the following steps: acquiring a lane line characteristic image, and forming a characteristic point set by pixel points in the lane line characteristic image according to a preset rule; selecting feature point groups from the feature point set in sequence according to preset conditions, and performing transverse clustering on the feature point groups to generate various clustering groups; respectively calculating the clustering centers of the clustering groups; and updating the lane lines in the existing lane line set according to the preset lane line retention condition and the relation between each clustering center and the existing lane line set, returning to the step of transversely clustering the feature point groups in the feature point set according to the preset condition to generate each clustering group until the feature point set is traversed, and obtaining the clustering result of the feature image of the lane lines. The clustering method provided by the invention has good clustering speed and robustness, and has good clustering effect on Y-shaped and V-shaped roads, thereby improving the accuracy of lane line identification results.

Description

Lane line clustering method and device
Technical Field
The invention relates to the technical field of image processing, in particular to a lane line clustering method and device.
Background
The automatic driving system of the automobile carries out real-time evaluation and decision-making on the safety state in the driving process of the automobile by sensing the running state and the driving environment information of the automobile in real time, thereby realizing the intervention of the driving process and even the unmanned driving. The lane line in the road driving environment is the most basic traffic sign and is also the most basic constraint when the automobile drives. The Lane line recognition System based on machine vision is an important component of an intelligent traffic System, and is widely applied to various levels of intelligent Driving systems such as Lane Departure Warning (LDW), Adaptive Cruise Control (ACC), Lane Keeping System (LKS) and unmanned Driving (Self-Driving).
At present, a lane line recognition algorithm generally acquires a lane line image, then extracts features related to a lane line by performing image processing on the lane line image, performs lane fitting based on the features, and performs clustering operation on the features related to the lane line before fitting the lane line, wherein the accuracy of a clustering result directly affects a lane line recognition result. Common clustering methods comprise k-means clustering, DBscan clustering and the like, the clustering speed of the clustering methods is low, for example, the k-means clustering method needs to appoint the number of clustering centers in advance, and the like, and the existing clustering method has poor clustering effect on complex scenes such as Y-shaped roads and V-shaped roads and the like, thereby influencing the accuracy of lane line recognition results.
Disclosure of Invention
The embodiment of the invention provides a lane line clustering method and a lane line clustering device, which are used for solving the problems that the lane line clustering method in the prior art has poor clustering effect on complex scenes such as Y-shaped roads and V-shaped roads and the like, and the accuracy of a lane line recognition result is influenced.
The embodiment of the invention provides a lane line clustering method, which comprises the following steps: acquiring a lane line characteristic image, and forming a characteristic point set by pixel points in the lane line characteristic image according to a preset rule; selecting feature point groups from the feature point set in sequence according to preset conditions, and performing transverse clustering on the feature point groups to generate various clustering groups; respectively calculating the clustering centers of the clustering groups; and updating the lane lines in the existing lane line set according to preset lane line retention conditions and the relationship between each clustering center and the existing lane line set, returning to the step of performing transverse clustering on the feature point groups in the feature point set according to the preset conditions to generate each clustering group until the feature point set is traversed, and obtaining the clustering result of the feature image of the lane lines.
Optionally, the performing horizontal clustering on the feature point groups to generate each cluster group includes: feature points are acquired from the feature point group according to a preset sequence, and the following operations are executed for each acquired feature point: judging whether the pixel value of the characteristic point is larger than a preset pixel value or not; when the pixel value of the feature point is greater than the preset pixel value, judging whether the intra-class interval between the feature point and the last feature point added into the clustering group meets the preset minimum intra-class interval or not; and determining to add the feature points into the clustering group or to add the feature points into a new clustering group according to the intra-class interval and the interval meeting the preset minimum intra-class interval.
Optionally, the calculating a cluster center of the cluster group includes: acquiring an abscissa value corresponding to each feature point in the cluster group; and calculating the average value of all the abscissa values to obtain an average abscissa value, wherein the clustering center is a feature point corresponding to the average value.
Optionally, the updating the lane lines in the existing lane line set according to preset lane line retention conditions and a relationship between each cluster center and the existing lane line set includes: judging whether the clustering center belongs to an existing lane line set or not; when the clustering center does not belong to the existing lane line set, adding the clustering center serving as a new lane line into the lane line set; performing lane line prediction on each lane line in the existing lane line set according to a preset lane line retention condition to obtain each predicted clustering point; and updating the lane lines in the existing lane line set according to the predicted clustering points.
Optionally, the determining whether the cluster center belongs to an existing lane line set includes: judging whether the clustering center is in a preset range of each lane line in the existing lane line set; and when the clustering center is not in the preset range of the lane line, judging that the clustering center does not belong to the existing lane line set.
Optionally, when the cluster center is within the preset range of the lane line, adding the cluster center to the lane line.
Optionally, the predicting each lane line in the lane line set according to a preset lane line retention condition to obtain each predicted clustering point includes: judging whether the clustering centers are not added in each lane line in the lane line set; when the lane line is not added with the clustering centers, judging whether the number of real clustering points formed by the clustering centers of the lane line is larger than a preset threshold value or not; and when the number of real clustering points formed by the clustering centers in the lane line is larger than the preset threshold value, obtaining predicted clustering points according to the real clustering points and the preset range.
Optionally, when the number of real clustering points formed by the clustering centers in the lane line is not greater than the preset threshold value, the lane line is deleted from the lane line set.
Optionally, the lane line clustering method further includes: judging whether each lane line in the lane line set meets the requirement of a preset lane line; and generating lane line clustering results according to the lane lines meeting the preset lane line requirements.
Optionally, the determining whether the lane line meets a preset lane line requirement includes: judging whether the number of the predicted clustering points in the lane line is larger than a predicted threshold value or not; when the number of the predicted clustering points in the lane line is larger than a preset prediction threshold value, judging whether the length of the lane line after removing each predicted clustering point is larger than a preset lane line length threshold value; and when the length of the lane line after the number of the preset prediction threshold values is removed is larger than a preset lane line length threshold value, judging that the lane line meets the preset lane line requirement.
Optionally, the performing, according to a preset condition, horizontal clustering on the feature point groups to generate each cluster group further includes: acquiring the intra-class interval of each lane line in each lane line set; judging whether the minimum intra-class interval in each intra-class interval is smaller than the preset minimum intra-class interval or not; and when the minimum in-class interval is smaller than the preset minimum in-class interval, replacing the preset minimum in-class interval with the minimum in-class interval.
The embodiment of the present invention further provides a lane line clustering device, including: the first processing module is used for acquiring a lane line characteristic image and forming a characteristic point set by pixel points in the lane line characteristic image according to a preset rule; the second processing module is used for sequentially selecting feature point groups from the feature point set according to preset conditions, and performing transverse clustering on the feature point groups to generate various clustering groups; the third processing module is used for respectively calculating the clustering centers of the clustering groups; and the fourth processing module is used for updating the lane lines in the existing lane line set according to preset lane line retention conditions and the relationship between each clustering center and the existing lane line set, returning to the step of transversely clustering the feature point groups in the feature point set according to the preset conditions to generate each clustering group until the feature point set is traversed to obtain the clustering result of the lane line feature image.
Embodiments of the present invention also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the lane line clustering method described above.
An embodiment of the present invention further provides a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to cause the at least one processor to perform the lane line clustering method described above.
The technical scheme of the invention has the following advantages:
the embodiment of the invention provides a lane line clustering method, which comprises the steps of collecting feature point groups formed by lane line feature images according to a preset rule, sequentially selecting the feature point groups from the feature point groups according to a preset condition to carry out transverse clustering to obtain each clustering group, calculating clustering centers of the clustering groups, and updating lane lines in an existing lane line set according to a preset lane line retention condition and the relation between each clustering center and the existing lane line set. The method has the advantages that the final clustering result of the lane line clustering image can be obtained only by traversing the image once through the mode of clustering the lane line characteristic images according to the preset rule, the clustering method has good clustering speed and robustness, and has good clustering effect on Y-shaped and V-shaped roads, so that the accuracy of the lane line identification result is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a lane line clustering method according to an embodiment of the present invention;
fig. 2 is a specific flowchart of sequentially selecting feature point groups from the feature point set according to a preset condition and performing horizontal clustering on the feature point groups to generate each cluster group in the embodiment of the present invention;
FIG. 3 is a flowchart illustrating the calculation of cluster centers of cluster groups according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a specific process of updating lane lines in an existing lane line set according to preset lane line retention conditions and a relationship between each cluster center and the existing lane line set in the embodiment of the present invention;
FIG. 5 is another flowchart of a lane line clustering method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating the updating of the predetermined minimum intra-class interval according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a lane line clustering apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and obviously, the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Furthermore, the technical features mentioned in the different embodiments of the invention described below can be combined with each other as long as they do not conflict with each other.
Example 1
The embodiment of the invention provides a lane line clustering method, which comprises the following steps of:
step S1: and acquiring a lane line characteristic image, and forming a characteristic point set by pixel points in the lane line characteristic image according to a preset rule. Specifically, in practical application, the lane line feature image is a segmentation result image obtained by segmenting an image including a lane line according to pixels, and the preset rule is that the lane line feature image is grouped and ordered according to rows from bottom to top according to pixel points to form a feature point set.
Step S2: and sequentially selecting characteristic point groups from the characteristic point set according to preset conditions, and performing transverse clustering on the characteristic point groups to generate various clustering groups. Specifically, in practical application, the preset condition is that feature point groups are sequentially selected from the feature point set according to the grouping and sorting in the step S1, that is, each group of feature point groups corresponds to one line of pixel points of the lane line feature image, and then, according to the distance relationship between the feature points in the feature point groups, the transverse clustering is performed to obtain a plurality of cluster groups.
Step S3: and respectively calculating the clustering centers of the clustering groups. In practical application, the cluster center is a feature point corresponding to an average value of coordinate values of each feature point in the cluster group.
Step S4: and updating the lane lines in the existing lane line set according to the preset lane line retention condition and the relation between each clustering center and the existing lane line set, returning to the step of transversely clustering the feature point groups in the feature point set according to the preset condition to generate each clustering group until the feature point set is traversed, and obtaining the clustering result of the feature image of the lane lines. Specifically, if the cluster center belongs to a lane line in the existing lane line set, the cluster center is added to the lane line. In practical application, the existing set of lane lines is initially an empty set; if the clustering center does not belong to the existing lane line set, adding the clustering center serving as the starting point of a new lane line into the lane line set; and when no new clustering center is added to the lane line in the lane line set, judging whether the lane line is reserved or not by performing prediction processing on the lane line, and further updating the lane line to finally obtain the lane line clustering set of the feature image of each lane line.
Through the steps S1 to S4, the lane line clustering method according to the embodiment of the present invention obtains each cluster group by aggregating feature point groups formed by the lane line feature images according to the preset rule, sequentially selecting feature point groups from the feature point groups according to the preset condition to perform horizontal clustering, calculates the cluster center of each cluster group, and updates the lane lines in the existing lane line set according to the preset lane line retention condition and the relationship between each cluster center and the existing lane line set. The method has the advantages that the final clustering result of the lane line clustering image can be obtained only by traversing the image once through the mode of clustering the lane line characteristic images according to the preset rule, the clustering method has good clustering speed and robustness, and has good clustering effect on Y-shaped and V-shaped roads, so that the accuracy of the lane line identification result is improved.
Specifically, in an embodiment, in the step S1, the lane line feature image is obtained, and the pixel points in the lane line feature image form the feature point set according to the preset rule. In practical application, the lane line feature images are grouped and sorted according to the pixel points from bottom to top to form a feature point set. The lane line feature image is a segmentation result image obtained by segmenting an image containing a lane line according to pixels, and the segmentation result image can be a binary image, when the lane line feature image is a binary image, a feature point with a pixel point of 1 represents a point suspected to belong to the lane line, and a feature point with a pixel point of 0 represents a background point.
Specifically, in an embodiment, in the step S2, feature point groups are sequentially selected from the feature point set according to a preset condition, and the feature point groups are subjected to horizontal clustering to generate each cluster group. In practical application, assuming that the lane line feature image is composed of N rows of pixel points, the first group in the feature point set is the nth row in the lane line feature image, and the first group in the feature point set is sequentially sorted according to the row number, and the nth group in the feature point set is the 1 st row in the lane line feature image.
In a preferred embodiment, as shown in fig. 2, in the step S2, in the step of performing horizontal clustering on the feature point groups to generate each cluster group, the feature points are obtained from the feature point groups according to a preset order, and the following operations are performed for each obtained feature point:
step S21: and judging whether the pixel value of the characteristic point is larger than a preset pixel value or not. In practical applications, if the above-mentioned lane line feature image is a binary image, the preset pixel value is 0, that is, when the pixel value of the feature point is 1, step S22 is executed, and when the pixel value of the feature point is 0, it is determined that the feature point is a background point, and the feature point is directly deleted.
Step S22: and when the pixel value of the feature point is greater than the preset pixel value, judging whether the intra-class interval between the feature point and the last feature point added into the clustering group meets the preset minimum intra-class interval. In practical application, each feature point group comprises a plurality of lane lines, each lane line is composed of a plurality of adjacent pixel points, namely the plurality of pixel points belong to the same cluster group, if the intra-class distance between the current feature point and the last feature point added in the cluster group meets the preset minimum intra-class distance, the feature point belongs to the current cluster group, step S23 is executed, if the intra-class distance between the current feature point and the last feature point added in the cluster group does not meet the preset minimum intra-class distance, the feature point belongs to the cluster group of the next lane line, and step S24 is executed.
Step S23: the feature points are added to the cluster group. In practical application, after the feature points are added into the cluster group, whether the next feature point belongs to the cluster group is continuously judged, and finally the feature points belonging to the same lane line form a cluster group.
Step S24: the feature points are added to the new cluster group. In practical application, a certain distance is left between adjacent lane lines, if the current feature point does not meet the intra-class interval of the current cluster group, the current feature point is indicated to belong to the next lane line, a new cluster group is drawn, and then the next feature point is continuously judged until all feature points in the feature point group are traversed.
In a preferred embodiment, as shown in fig. 3, the step S3 of calculating the cluster center of the cluster group specifically includes:
step S31: and acquiring the abscissa value corresponding to each feature point in the cluster group. In practical application, the lane line feature image is associated with a rectangular coordinate system, each cluster group includes a plurality of feature points, and the feature points are respectively represented by the abscissa of the corresponding position in the coordinate system.
Step S32: and calculating the average value of all the abscissa values to obtain an average abscissa value, wherein the clustering center is a characteristic point corresponding to the average value. In practical application, the coordinate values corresponding to the central positions of the feature points can be obtained by calculating the average value of the coordinate values of the feature points, and the feature points corresponding to the coordinate values are the clustering centers.
In a preferred embodiment, as shown in fig. 4, the updating the lane lines in the existing lane line set according to the preset lane line retention condition and the relationship between each cluster center and the existing lane line set specifically includes:
step S41: in a preferred embodiment, as shown in fig. 4, the step S41 specifically includes:
step S411: and judging whether the clustering center is in a preset range of each lane line in the existing lane line set. In practical application, the slope average of all the cluster centers on the current existing lane line may be calculated, assuming that the slope average is a, the search range of the lane line is b, and the abscissa of the last cluster center on the lane line is p, the preset range is [ p + a-b, p-a + b ], when the abscissa of the cluster center to be determined is not within the preset range, step S412 is executed, otherwise step S413 is executed.
Step S412: and when the clustering center is not in the preset range of the lane line, judging that the clustering center does not belong to the existing lane line set. In practical applications, if the cluster center is not within the preset range of the lane line, it indicates that the cluster center does not belong to the existing lane line, and step S42 is executed.
Step S413: and when the clustering center is within the preset range of the lane line, adding the clustering center into the lane line. In practical applications, if the abscissa value of the cluster center is within the preset range, the cluster center is considered to belong to the lane line, and is added to the lane line, and then step S7 is executed.
Step S42: and when the clustering center does not belong to the existing lane line set, adding the clustering center into the lane line set. In practical application, in a Y-shaped or V-shaped road section, it may occur that one lane line is changed into two lane lines, if the clustering center is not within the preset range of the lane line, it is indicated that the clustering center does not belong to the existing lane line, and the clustering center is taken as a starting point and added into a lane line set to form a new lane line. Therefore, accurate clustering of V-shaped or Y-shaped complex lane lines is realized, accurate clustering results are provided for identification of subsequent lane lines, and accuracy of lane line identification results is guaranteed.
Step S43: performing lane line prediction on each lane line in the existing lane line set according to a preset lane line retention condition to obtain each predicted clustering point, as shown in fig. 4, where the step S43 specifically includes:
step S431: and judging whether no clustering center is added in each lane line in the lane line set. In practical application, the lane lines are divided into solid lines and dotted lines, if no clustering center is added to a lane line in the lane line set, the lane line is indicated as a dotted line, so that a situation of lane line segmentation occurs, or the lane line is already cut off, so that whether the lane line is cut off needs to be judged, so as to determine whether the lane line needs to be kept continuously, when no clustering center is added to a lane line, step S72 is executed, and when a clustering center is added to a lane line, the clustering center is added to the lane line set.
Step S432: and when no clustering center is added into the lane line, judging whether the number of real clustering points formed by the clustering centers of the lane line is larger than a preset threshold value or not. If the lane line has no new clustering center added, the number of the real clustering points in the current lane line is judged whether to exceed a preset threshold value, the preset threshold value represents the minimum number of the real clustering points formed by the lane line and is used for filtering the interference line in the background, if so, the step S433 is executed, otherwise, the lane line is deleted from the lane line set. And if the number of the real clustering points in the lane line is less than or equal to a preset threshold value, the lane line is indicated as an interference line in the background, and the lane line is directly deleted from the lane line set. Therefore, abnormal points in the clustering process can be removed in time, and the robustness of the algorithm is improved.
Step S433: and when the number of the real clustering points formed by the clustering centers in the lane line is larger than a preset threshold value, obtaining a predicted clustering point according to each real clustering point and a preset range. If the number of the real clustering points of the lane line is greater than the preset threshold value, it is indicated that the lane line is not a background interference line segment, the lane line may be segmented because the lane line is a dashed line segment, and then the coordinates of the predicted clustering points are obtained according to the coordinates of the last point on the lane line and the preset range.
Step S44: updating the lane lines in the existing lane line set according to each predicted clustering point, which specifically comprises the following steps: and adding the predicted clustering points into the lane lines. In practical application, the predicted clustering points are added into the lane lines at the fracture positions of the lane lines, so that the problem that the lane lines are segmented due to the fact that the lane lines are broken line segments or are interfered by a background can be solved, and the accuracy of the final lane line clustering result is guaranteed.
In a preferred embodiment, as shown in fig. 5, after the step S1 is executed and before the step S2 is executed, the method for clustering lane lines further includes:
step S5: and judging whether each lane line in the lane line set meets the requirement of a preset lane line. In practical application, after the lane line clustering corresponding to each group of feature point groups is finished and before the next frame of feature point group is selected for clustering, whether each lane line in the obtained lane line set meets the requirement of a preset lane line or not needs to be judged, if the requirement of the preset lane line is met, the lane line clustering is finished and is ended, the lane line clustering result needs to be output, when the lane line meets the requirement of the preset lane line, the step S6 is executed, otherwise, the step S2 is continuously executed.
Specifically, in an embodiment, as shown in fig. 5, the step S5 includes:
step S51: and judging whether the number of the predicted clustering points in the lane line is greater than a predicted threshold value or not. In practical application, if the number of predicted clustering points of a certain lane line in the lane line set is too many and exceeds the prediction threshold, it indicates that the lane line may not be a real lane line or the lane line has been cut off, step S52 is executed to further determine whether the lane line is an interference line or a lane line cut-off condition, otherwise, step S2 is executed.
Step S52: and when the number of the predicted clustering points in the lane line is smaller than a preset prediction threshold value, judging whether the length of the lane line after removing each predicted clustering point is larger than a preset lane line length threshold value. In practical application, it may exist that although the number of predicted clustering points of a certain lane line in the clustering set meets a preset prediction threshold, the total length of the lane line is too small and does not conform to the rule of the actual lane line, so that it is further determined whether the lane line needs to be reserved by determining whether the length of the real clustering points on the lane line is greater than the length of the preset lane line, if the length of the lane line after removing the predicted clustering points is greater than the length threshold of the preset lane line, step S53 is executed, otherwise, the lane line is deleted from the lane line set.
Step S53: and when the length of the lane line after the number of the preset prediction threshold values is removed is larger than the preset lane line length threshold value, judging that the lane line meets the preset lane line requirement. If the length of the lane line after removing the predicted clustering points is greater than the preset lane line length threshold, it indicates that the lane line is a real lane line, and then step S6 is executed.
Step S6: and generating a lane line clustering result according to each lane line meeting the preset lane line requirement. In practical application, all the lane lines meeting the requirement of the preset lane line in the lane line set are the cut-off lane lines, the lane line clustering result is obtained, and the accurate clustering result can be provided for subsequent lane line identification and analysis.
In practical applications, in order to further improve the accurate clustering of the lane lines in the Y-shape and the V-shape, the preset minimum inter-class interval in step S2 needs to be updated according to the actual clustering condition of the lane lines. As shown in fig. 6, the step of updating the preset minimum inter-class interval specifically includes:
step S101: and obtaining the intra-class interval of each lane line in each lane line set. In practical application, in the process of continuously clustering the lane lines, the intra-class intervals at newly added clustering points of the lane lines are continuously changed, and the preset minimum intra-class intervals of the lane lines are updated by obtaining the intra-class intervals at the last point of the tail end of each lane line.
Step S102: and judging whether the minimum intra-class interval in the intra-class intervals is smaller than a preset minimum intra-class interval. In practical application, the intra-class interval with the minimum interval among the intra-class intervals at the tail ends of different lane lines is selected to be compared with the preset minimum intra-class interval, if the current minimum intra-class interval of each lane line is larger than the preset minimum intra-class interval, the preset minimum intra-class interval is kept unchanged, and otherwise, the step S103 is executed.
Step S103: and when the minimum in-class interval is smaller than the preset minimum in-class interval, replacing the preset minimum in-class interval with the minimum in-class interval. In practical application, if the current minimum inter-class interval of each lane line is smaller than the preset minimum inter-class interval, the preset minimum inter-class interval is replaced by the minimum inter-class interval to be used in the next cycle. By updating the preset minimum inter-class interval mode in real time, the lane line clustering method provided by the embodiment of the invention has stronger identification capability on complex lane lines such as Y-shaped lanes, V-shaped lanes and the like, so as to ensure the accuracy of a final clustering result.
Through the steps S1 to S6, the lane line clustering method according to the embodiment of the present invention performs clustering on the lane line feature images from bottom to top, and only needs to traverse one image to obtain a final lane line set, thereby increasing the clustering speed, and performing conditional judgment on the clustering center to achieve a good clustering effect on the Y-shaped and V-shaped roads, thereby improving the accuracy of the lane line recognition result. And by updating the predicted points of each lane line in the lane line set, the segmented lane lines in the lane line characteristic graph can be identified, and abnormal points are eliminated, so that the clustering method has good robustness.
Example 2
An embodiment of the present invention provides a lane line clustering device, as shown in fig. 7, the lane line clustering device includes:
the first processing module 1 is configured to obtain a lane line feature image, and form a feature point set from pixel points in the lane line feature image according to a preset rule. For details, see the description related to step S1 in embodiment 1.
And the second processing module 2 is used for sequentially selecting the feature point groups from the feature point set according to preset conditions, and performing transverse clustering on the feature point groups to generate various clustering groups. For details, see the description related to step S2 in embodiment 1.
And the third processing module 3 is used for respectively calculating the clustering centers of the clustering groups. For details, see the description related to step S3 in embodiment 1.
And the fourth processing module 4 is configured to update the lane lines in the existing lane line set according to the preset lane line retention condition and the relationship between each clustering center and the existing lane line set, and return to the step of performing horizontal clustering on the feature point groups in the feature point set according to the preset condition to generate each clustering group until the feature point set is traversed to obtain a clustering result of the lane line feature image. For details, see the description related to step S4 in embodiment 1.
Through the cooperative cooperation of the above components, the lane line clustering device according to the embodiment of the invention obtains each cluster group by clustering feature point group sets formed by the lane line feature images according to the preset rules, sequentially selecting the feature point groups from the feature point sets according to the preset conditions to perform transverse clustering, calculates the clustering centers of the cluster groups, and updates the lane lines in the existing lane line set according to the preset lane line retention conditions and the relationship between each clustering center and the existing lane line set. The method has the advantages that the final clustering result of the lane line clustering image can be obtained only by traversing the image once through the mode of clustering the lane line characteristic images according to the preset rule, the clustering method has good clustering speed and robustness, and has good clustering effect on Y-shaped and V-shaped roads, so that the accuracy of the lane line identification result is improved.
Example 3
The embodiment of the invention provides a non-transient computer storage medium, wherein the computer storage medium stores computer executable instructions which can execute the lane line clustering method in any method embodiment, wherein the storage medium can be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard disk (Hard disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), and the like; the storage medium may also comprise a combination of memories of the kind described above.
Those skilled in the art will appreciate that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Example 4
An embodiment of the present invention provides a computer device, a schematic structural diagram of which is shown in fig. 8, where the computer device includes: one or more processors 410 and a memory 420, with one processor 410 being an example in fig. 8.
The computer device described above may further include: an input device 430 and an output device 440.
The processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means, such as the bus connection in fig. 8.
Processor 410 may be a Central Processing Unit (CPU). The Processor 410 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 420 is a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the lane line clustering method in the embodiment of the present application, and the processor 410 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 420, so as to implement the lane line clustering method in the embodiment of the method.
The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the processing device of the lane line clustering method, or the like. Further, the memory 420 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 420 may optionally include memory located remotely from the processor 410, which may be connected to the lane line clustering means via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may receive input numeric or character information and generate key signal inputs related to user settings and function control related to the processing device of the lane line clustering operation. The output device 440 may include a display device such as a display screen.
One or more modules are stored in the memory 420, which when executed by the one or more processors 410 perform the method shown in fig. 1.
The product can execute the method provided by the embodiment of the invention and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiments of the present invention, reference may be made specifically to the description related to the embodiments shown in fig. 1.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. It will be apparent to those skilled in the art that other variations and modifications can be made on the basis of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (11)

1. A lane line clustering method is characterized by comprising the following steps:
acquiring a lane line characteristic image, and forming a characteristic point set by pixel points in the lane line characteristic image according to a preset rule;
selecting feature point groups from the feature point set in sequence according to preset conditions, and performing transverse clustering on the feature point groups to generate various clustering groups;
respectively calculating the clustering centers of the clustering groups;
and updating the lane lines in the existing lane line set according to preset lane line retention conditions and the relationship between each clustering center and the existing lane line set, returning to the step of performing transverse clustering on the feature point groups in the feature point set according to the preset conditions to generate each clustering group until the feature point set is traversed, and obtaining the clustering result of the feature image of the lane lines.
2. The lane line clustering method according to claim 1, wherein the performing horizontal clustering on the feature point groups to generate each cluster group comprises:
acquiring feature points from the feature point group according to a preset sequence, and executing the following operations aiming at each acquired feature point: judging whether the pixel value of the characteristic point is larger than a preset pixel value or not;
when the pixel value of the feature point is greater than the preset pixel value, judging whether the intra-class interval between the feature point and the last feature point added into the clustering group meets the preset minimum intra-class interval or not;
and determining to add the feature points into the clustering group or to add the feature points into a new clustering group according to the intra-class interval and the preset minimum intra-class interval.
3. The lane line clustering method according to claim 1, wherein the calculating the cluster center of the cluster group comprises:
acquiring an abscissa value corresponding to each feature point in the cluster group;
and calculating the average value of all the abscissa values to obtain an average abscissa value, wherein the clustering center is a feature point corresponding to the average value.
4. The lane line clustering method according to any one of claims 1, wherein the updating of the lane lines in the existing lane line sets according to preset lane line retention conditions and the relationship between each clustering center and the existing lane line set comprises:
judging whether the clustering center belongs to an existing lane line set or not;
when the clustering center does not belong to the existing lane line set, adding the clustering center serving as a new lane line into the lane line set;
performing lane line prediction on each lane line in the existing lane line set according to a preset lane line retention condition to obtain each predicted clustering point;
and updating the lane lines in the existing lane line set according to the predicted clustering points.
5. The lane line clustering method according to claim 4, wherein predicting each lane line in the lane line set according to a preset lane line retention condition to obtain each predicted clustering point comprises:
judging whether the clustering centers are not added in each lane line in the lane line set;
when the lane line is not added with the clustering centers, judging whether the number of real clustering points formed by the clustering centers of the lane line is larger than a preset threshold value or not;
and when the number of real clustering points formed by the clustering centers in the lane line is larger than the preset threshold value, obtaining a predicted clustering point according to the real clustering points and the preset range.
6. The lane line clustering method according to any one of claims 1 to 5, further comprising:
judging whether each lane line in the lane line set meets the requirement of a preset lane line;
and generating lane line clustering results according to the lane lines meeting the preset lane line requirements.
7. The lane line clustering method according to claim 6, wherein the determining whether the lane line meets a preset lane line requirement comprises:
judging whether the number of the predicted clustering points in the lane line is larger than a predicted threshold value or not;
when the number of the predicted clustering points in the lane line is larger than a preset prediction threshold value, judging whether the length of the lane line after removing each predicted clustering point is larger than a preset lane line length threshold value;
and when the length of the lane line after the number of the preset prediction threshold values is removed is larger than a preset lane line length threshold value, judging that the lane line meets the preset lane line requirement.
8. The lane line clustering method according to any one of claims 1 to 5, wherein the transversely clustering the feature point groups to generate each cluster group further comprises:
acquiring the intra-class interval of each lane line in each lane line set;
judging whether the minimum intra-class interval in each intra-class interval is smaller than the preset minimum intra-class interval or not;
and when the minimum in-class interval is smaller than the preset minimum in-class interval, replacing the preset minimum in-class interval with the minimum in-class interval.
9. A lane line clustering apparatus, comprising:
the first processing module is used for acquiring a lane line characteristic image and forming a characteristic point set by pixel points in the lane line characteristic image according to a preset rule;
the second processing module is used for sequentially selecting feature point groups from the feature point set according to preset conditions, and performing transverse clustering on the feature point groups to generate various clustering groups;
the third processing module is used for respectively calculating the clustering centers of the clustering groups;
and the fourth processing module is used for updating the lane lines in the existing lane line set according to preset lane line retention conditions and the relationship between each clustering center and the existing lane line set, returning to the step of transversely clustering the feature point groups in the feature point set according to the preset conditions to generate each clustering group until the feature point set is traversed to obtain the clustering result of the lane line feature image.
10. A non-transitory computer-readable storage medium storing computer instructions which, when executed by a processor, implement the lane line clustering method of any one of claims 1-8.
11. A computer device, comprising: at least one processor (410); and a memory (420) communicatively coupled to the at least one processor (410),
the memory (420) stores instructions executable by the at least one processor (410), the instructions being executable by the at least one processor (410) to cause the at least one processor (410) to perform the lane line clustering method of any of claims 1-8.
CN201910199778.2A 2019-03-15 2019-03-15 Lane line clustering method and device Active CN111695389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910199778.2A CN111695389B (en) 2019-03-15 2019-03-15 Lane line clustering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910199778.2A CN111695389B (en) 2019-03-15 2019-03-15 Lane line clustering method and device

Publications (2)

Publication Number Publication Date
CN111695389A true CN111695389A (en) 2020-09-22
CN111695389B CN111695389B (en) 2023-06-20

Family

ID=72475338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910199778.2A Active CN111695389B (en) 2019-03-15 2019-03-15 Lane line clustering method and device

Country Status (1)

Country Link
CN (1) CN111695389B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433203A (en) * 2020-10-29 2021-03-02 同济大学 Lane alignment detection method based on millimeter wave radar data
CN114549883A (en) * 2022-02-24 2022-05-27 北京百度网讯科技有限公司 Image processing method, deep learning model training method, device and equipment

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006115969A (en) * 2004-10-20 2006-05-11 Hitachi Ltd Bowling system
CN101470807A (en) * 2007-12-26 2009-07-01 河海大学常州校区 Accurate detection method for highroad lane marker line
CN101493992A (en) * 2008-12-19 2009-07-29 浙江工业大学 Control method for single-point self-organizing traffic signal based on wireless sensor network
CN102044151A (en) * 2010-10-14 2011-05-04 吉林大学 Night vehicle video detection method based on illumination visibility identification
CN102169636A (en) * 2011-05-24 2011-08-31 北京工业大学 Method for phase timing of bicycles at signal intersection
CN102629326A (en) * 2012-03-19 2012-08-08 天津工业大学 Lane line detection method based on monocular vision
CN102831426A (en) * 2012-08-30 2012-12-19 杭州电子科技大学 Road environment self-adaptive straight-lane detection method
CN103310202A (en) * 2013-06-27 2013-09-18 西安电子科技大学 System and method for guaranteeing driving safety
CN103903019A (en) * 2014-04-11 2014-07-02 北京工业大学 Automatic generating method for multi-lane vehicle track space-time diagram
CN106991401A (en) * 2017-04-06 2017-07-28 大连理工大学 A kind of method for detecting lane lines based on K means clustering algorithms
CN107273935A (en) * 2017-07-09 2017-10-20 北京北昂科技有限公司 A kind of lane markings group technology based on adaptive K Means
CN108090456A (en) * 2017-12-27 2018-05-29 北京初速度科技有限公司 A kind of Lane detection method and device
US20180236442A1 (en) * 2015-02-20 2018-08-23 Cells For Cells S.A. Device, platform, and assay for assessing cells
CN109034047A (en) * 2018-07-20 2018-12-18 京东方科技集团股份有限公司 A kind of method for detecting lane lines and device
CN109409205A (en) * 2018-09-07 2019-03-01 东南大学 Video road driveway line detecting method of taking photo by plane based on line pitch characteristics point cluster

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006115969A (en) * 2004-10-20 2006-05-11 Hitachi Ltd Bowling system
CN101470807A (en) * 2007-12-26 2009-07-01 河海大学常州校区 Accurate detection method for highroad lane marker line
CN101493992A (en) * 2008-12-19 2009-07-29 浙江工业大学 Control method for single-point self-organizing traffic signal based on wireless sensor network
CN102044151A (en) * 2010-10-14 2011-05-04 吉林大学 Night vehicle video detection method based on illumination visibility identification
CN102169636A (en) * 2011-05-24 2011-08-31 北京工业大学 Method for phase timing of bicycles at signal intersection
CN102629326A (en) * 2012-03-19 2012-08-08 天津工业大学 Lane line detection method based on monocular vision
CN102831426A (en) * 2012-08-30 2012-12-19 杭州电子科技大学 Road environment self-adaptive straight-lane detection method
CN103310202A (en) * 2013-06-27 2013-09-18 西安电子科技大学 System and method for guaranteeing driving safety
CN103903019A (en) * 2014-04-11 2014-07-02 北京工业大学 Automatic generating method for multi-lane vehicle track space-time diagram
US20180236442A1 (en) * 2015-02-20 2018-08-23 Cells For Cells S.A. Device, platform, and assay for assessing cells
CN106991401A (en) * 2017-04-06 2017-07-28 大连理工大学 A kind of method for detecting lane lines based on K means clustering algorithms
CN107273935A (en) * 2017-07-09 2017-10-20 北京北昂科技有限公司 A kind of lane markings group technology based on adaptive K Means
CN108090456A (en) * 2017-12-27 2018-05-29 北京初速度科技有限公司 A kind of Lane detection method and device
CN109034047A (en) * 2018-07-20 2018-12-18 京东方科技集团股份有限公司 A kind of method for detecting lane lines and device
CN109409205A (en) * 2018-09-07 2019-03-01 东南大学 Video road driveway line detecting method of taking photo by plane based on line pitch characteristics point cluster

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
史迪玮等: "基于K-means算法的二步迭代道路检测算法", 《软件导刊》 *
石林军等: "基于多约束条件下的霍夫变换车道线检测方法", 《计算机测量与控制》 *
黄敏等: "基于聚类算法的交叉口拓扑数据建库", 《计算机工程与设计》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433203A (en) * 2020-10-29 2021-03-02 同济大学 Lane alignment detection method based on millimeter wave radar data
CN112433203B (en) * 2020-10-29 2023-06-20 同济大学 Lane linearity detection method based on millimeter wave radar data
CN114549883A (en) * 2022-02-24 2022-05-27 北京百度网讯科技有限公司 Image processing method, deep learning model training method, device and equipment
CN114549883B (en) * 2022-02-24 2023-09-05 北京百度网讯科技有限公司 Image processing method, training method, device and equipment for deep learning model

Also Published As

Publication number Publication date
CN111695389B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN110634291B (en) High-precision map topology automatic construction method and system based on crowdsourcing data
CN113269042B (en) Intelligent traffic management method and system based on driving vehicle violation identification
CN116403094B (en) Embedded image recognition method and system
CN111695389B (en) Lane line clustering method and device
CN113221750A (en) Vehicle tracking method, device, equipment and storage medium
CN108446702B (en) Image character segmentation method, device, equipment and storage medium
CN111222405A (en) Lane line detection method and device, electronic device and readable storage medium
CN114926791A (en) Method and device for detecting abnormal lane change of vehicles at intersection, storage medium and electronic equipment
CN111815941B (en) Frequent congestion bottleneck identification method and device based on historical road conditions
CN113674317A (en) Vehicle tracking method and device of high-order video
CN112163521A (en) Vehicle driving behavior identification method, device and equipment
CN116363628A (en) Mark detection method and device, nonvolatile storage medium and computer equipment
CN114973205A (en) Traffic light tracking method and device and unmanned automobile
CN116310442A (en) Track point identification method, track point identification device and map making method
CN115436900A (en) Target detection method, device, equipment and medium based on radar map
CN114118188A (en) Processing system, method and storage medium for moving objects in an image to be detected
CN109409247B (en) Traffic sign identification method and device
CN116543189B (en) Target detection method, device, equipment and storage medium
CN112069899A (en) Road shoulder detection method and device and storage medium
CN112258602B (en) Stop line generation method and device, electronic equipment and storage medium
CN115577278A (en) Traffic management-based clustering method, electronic equipment and computer program product
CN117994989A (en) Traffic flow monitoring method, system, terminal and medium based on target deduplication
CN117169919A (en) Method, device, computer equipment and storage medium for determining target detection result
CN117876390A (en) Map partitioning method, map partitioning device, electronic equipment and computer readable storage medium
CN117765509A (en) Guardrail detection method and device, electronic equipment 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