CN109308468B - Lane line detection method - Google Patents

Lane line detection method Download PDF

Info

Publication number
CN109308468B
CN109308468B CN201811104184.0A CN201811104184A CN109308468B CN 109308468 B CN109308468 B CN 109308468B CN 201811104184 A CN201811104184 A CN 201811104184A CN 109308468 B CN109308468 B CN 109308468B
Authority
CN
China
Prior art keywords
line
edge
points
current
point
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.)
Active
Application number
CN201811104184.0A
Other languages
Chinese (zh)
Other versions
CN109308468A (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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201811104184.0A priority Critical patent/CN109308468B/en
Publication of CN109308468A publication Critical patent/CN109308468A/en
Application granted granted Critical
Publication of CN109308468B publication Critical patent/CN109308468B/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

Abstract

The invention discloses a lane line detection method, and belongs to the technology of image processing and pattern recognition. The invention distinguishes different lane lines by improving the existing lane line detection process to achieve better detection efficiency, and simultaneously provides a corresponding linear and curve method for detection under the method. The method is used for detecting and processing the lane lines, can accelerate the flow of detecting the lane lines, distinguishes different lane lines and achieves better detection efficiency.

Description

Lane line detection method
Technical Field
The present invention relates to image processing and pattern recognition technology, and in particular to the detection of lane lines.
Background
With the rise of intelligent assistant driving, lane line detection is also greatly developed in recent years as an important component of the intelligent assistant driving. The straight line detection algorithm in the lane line detection algorithm is mostly based on the Hough straight line detection algorithm, but the method is slow and can only detect straight lines. And the curve detection algorithm is more complex, has lower speed and smaller application range. The method adopts different detection methods to adapt to special road conditions aiming at different roads, but the roads are difficult to distinguish in the detection process. The speed of the linear detection is faster and more accurate than the speed of the curve detection, so that the detection efficiency can be improved by distinguishing the linear detection from the curve detection in the detection process.
Disclosure of Invention
The invention aims to: in view of the above existing problems, a lane line detection method is provided, which improves the existing lane line detection process, and distinguishes different lane lines to achieve better detection efficiency.
The lane line detection method of the invention comprises the following steps:
step 1, intercepting a lane line detection area from a road surface image, wherein the size of the area is width × height, filtering the intercepted area, carrying out edge detection, and carrying out binarization processing on an obtained edge detection result, wherein if detected edge points are set to be white, other pixel points are set to be black, a first binarized edge image is obtained.
Step 2: the obtained first edge image is processed (straight line search processing), and a second edge image is obtained:
the first edge image is scanned line by line, white points are counted line by line from left to right from the first line of pixels of the image, coordinates (pixel points of the x-th line and y-column) of the currently searched edge point are represented by (x, y), the number of the current edge point is represented by ID (x, y), and the length (ID) of a line segment corresponding to the ID of the edge point number is represented by length (ID).
If the reference pixel points (x-1, y-n), (x-1, y-n +1) in the previous line of the edge point are not edge points (if the edge point of the first line does not exist in the previous line, the reference pixel points in the previous line are not edge points), the number ID (x, y) of the current edge point is extended (the number of the previous edge point is increased by 1, if there is no previous edge point (the first edge point of the first row), the number is directly set, for example, 1), and the length (ID) of the line segment corresponding to the number ID of the current point is set to 1, otherwise the number of the current point is identical to the number of the previous edge point, for the above 2n +1 points, each time there is an edge point, length (id) length is added by 1. And after the whole image is scanned, extracting edge points with the line segment length exceeding a certain value to obtain a second edge image, and performing subsequent detection.
3. And (3) performing mark point scanning processing on the second edge image:
scanning upwards from the last line of the image, wherein the initial scanning position of each line is represented by mid _ temp, the initial scanning position of the first time is width multiplied by 0.5, and the width represents the width of the scanned image;
in the current scanning line i, searching edge points in the second edge image to the left and right sides based on the initial scanning position mid _ temp, stopping scanning the current line after searching the first edge point to the left and right sides, taking the two scanned edge points as mark points of the current line, and comparing with the same-side mark points with the closest line interval respectively: if the transverse interval of the same-side mark points exceeds the set interval threshold value TdisThen delete the marker on that side of the current rowPoint, and mid _ temp is not updated; otherwise, the mid _ temp is updated based on the mark point of the current row as: mid _ temp ═ (left _ x (i) + right _ x (i)) x 0.5, where left _ x (i) denotes the left marker point of the current line, and right _ x (i) denotes the right marker point of the current line;
wherein the interval threshold TdisDepending on the number m of spaced rows between two ipsilateral markers compared, i.e. TdisK × m + b, where constants k and b are preset values;
if no edge point exists on a certain side, the edge point is vacant, and the mid _ temp position is not updated;
when a certain number of mark points are detected on one side, performing linear fitting processing on the detected mark points, taking the obtained linear as an initial tangent of the current side, recording the horizontal position of the intersection point of the initial tangents on the two sides as the position of the horizon, and stopping the scanning processing of the mark points after scanning to pixel points which are a certain number of distance away from the position of the horizon; the scanning of the whole image is completed by the method, and the marked image is the image of the edges of the lanes at two sides.
4. And (5) depicting the lane line.
And if the distance between the mark point obtained by the last scanning of the current side and the initial tangent line of the current side does not exceed a preset distance threshold, judging that the lane line of the current side is a straight line, and otherwise, judging a curve.
When the straight lane line is judged, connecting the head and tail marking points on the current side to obtain the lane line on the current side;
when the curve lane line is judged, counting the density degree of the marking points on the current side, and if the density degree exceeds a density threshold value, smoothly connecting all the marking points on the current side in sequence to obtain the lane line on the current side; otherwise, performing curve fitting on the mark points on the current side to obtain the lane line on the current side.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that: the invention provides a lane line detection algorithm, which can accelerate the lane line detection process, distinguish different lane lines and achieve better detection efficiency.
Drawings
FIG. 1 is a flow chart of lane line detection;
FIG. 2 is an image resulting from edge detection;
FIG. 3 is an image obtained by linear search statistics;
FIG. 4 is an image resulting from a marker pair search;
FIG. 5 is a graph illustrating the effect of curve detection;
fig. 6 is a graph showing the effect of the line detection.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the following embodiments and accompanying drawings.
The lane line detection method provided by the invention has the advantages that the existing lane line detection process is improved, different lane lines are distinguished, so that better detection efficiency is achieved, and meanwhile, the corresponding linear and curve method detection is provided under the method.
Referring to fig. 1, the specific implementation steps are as follows:
step 1, pretreatment.
And intercepting a lane line detection area from the road surface image, wherein the size of the area is width × height, filtering the intercepted area, carrying out edge detection, and carrying out binarization processing on the obtained edge detection result, wherein if the detected edge point is set to be white, other pixel points are set to be black, a first binarized edge image is obtained.
In the present embodiment, the road surface image captured by the vehicle-mounted front camera is captured as the area for lane line detection. The lower height is cut in half and centered about 60% of the width.
After the captured image is gaussian-filtered, it is edge-detected by canny operator (an edge detection operator) to obtain an edge image, and then it is binarized to obtain a binarized edge image, as shown in fig. 2.
And 2, carrying out linear search statistics.
And performing straight line search statistics on the binarized edge image, wherein the search slope n in the embodiment is 5. And counting the ID number and the respective length of the white edge points, traversing the whole image line by line from top to bottom, and selecting a point set with the length exceeding the maximum length by 10 percent as a target of subsequent detection. The edge image retained by the straight line search statistical algorithm is shown in fig. 3.
And 3, marking pair searching.
And (3) carrying out mark pair search on the image obtained in the step (2), traversing the whole image line by line from the last line from bottom to top, respectively storing the coordinates of mark points on two sides in left and right vectors, wherein the value of mid _ temp of the first line is width multiplied by 0.5, and the width represents the width of the searched image. If the ith row is being scanned, the current mid _ temp takes the value of (left _ x (i +1) + right _ x (i +1)) × 0.5, and if a certain side x (i +1) does not exist, the mid _ temp position is not updated.
When the horizontal direction of the adjacent mark point on the single side does not exceed 5 pixel units (the value is adjustable and generally does not exceed 10), the detection is considered to be effective, and the mark point on the current line is reserved. When the single-side non-adjacent mark points (the difference of m rows of pixels) is not more than 3m +2, the detection is considered to be effective, and the current row mark points are reserved. When 10 pixel points are searched, straight line fitting is carried out on the obtained mark points, the obtained straight lines are used as initial tangent lines of lanes on two sides and are respectively marked as line _1 and line _2, the intersection point of the two tangent lines is the position of a horizon, and the horizontal coordinate of the position of the horizon is horizons. The search is continued until the current search row stops 20 pixel units from the horizon position. Thus, coordinate sets left and right of the two side mark points are obtained, wherein left comprises a points and right comprises b points. The total number of search lines row _ number-20, where height represents the height of the searched image. The image obtained by the marker pair search is shown in fig. 4.
And 4, describing lane lines.
And 4, utilizing the lane information obtained in the step 3 to depict lane lines.
Taking the left lane line as an example, if the distance between the left (a) (the mark point obtained by the last scanning) and the straight line _1 is not more than 10, the left lane is considered to be a straight line, and the left (1) and the left (a) points are connected, namely the left lane line. If the condition is not met, the lane line is judged to be a curve, the density of the marked points is judged, when the row _ number is larger than 70%, the lane line on the left side is considered to be a real lane line, and all points in left are connected smoothly in sequence to serve as the lane line on the left side. In the same way, the right lane line can be obtained. If the condition is not met, the lane line is judged to be a dotted line, and curve fitting is carried out on the mark point on the current side at the moment to obtain the lane line. For example, a quadratic function is fitted to the lane line and the current position of the lane line is given. The images obtained by the curve and straight line detection are shown in fig. 5 and 6, respectively.
Through tests, the accuracy of the embodiment can reach more than 90%, the speed is about 50 frames per second, the speed is greatly increased compared with 16 frames per second of the traditional Hough line detection algorithm, and curves can be distinguished simultaneously.
While the invention has been described with reference to specific embodiments, any feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise; all of the disclosed features, or all of the method or process steps, may be combined in any combination, except mutually exclusive features and/or steps.

Claims (9)

1. A lane line detection method comprises the following steps:
step 1, intercepting a lane line detection area from a road surface image, performing filtering and edge detection processing on the intercepted area, and performing binarization processing on the detected edge image to obtain a binarized first edge image;
step 2: processing the obtained first edge image to obtain a second edge image:
scanning a first edge image line by line, counting edge points from left to right line by line from the pixels of the first line of the image, representing the coordinates of the currently searched edge point by (x, y), representing the current edge point number by ID (x, y), and representing the length of a line segment corresponding to the ID of the edge point number by Length (ID);
if the 2n +1 reference pixel points in the previous line of the current edge point are not edge points, the serial number ID (x, y) of the current edge point is extended, and the length (ID) of the line segment with the corresponding serial number is set to be 1; otherwise, the number of the current edge point is consistent with the number of the first edge point in the previous row of reference pixel points, and for the 2n +1 reference pixel points, every time one edge point exists, the corresponding length (ID) is added with 1;
the coordinates of the 2n +1 reference pixel points are sequentially as follows: (x-1, y-n), (x-1, y-n +1), … …, (x-1, y + n-1), (x-1, y + n), where n represents a preset searchable slope of a straight line;
after the whole first edge image is scanned, extracting edge points with the length (ID) value exceeding a length threshold value to obtain a second edge image;
and step 3: and (3) performing mark point scanning processing on the second edge image:
scanning upwards from the last line of the image, wherein the initial scanning position of each line is represented by mid _ temp, the initial scanning position of the first time is width multiplied by 0.5, and the width represents the width of the scanned image;
in the current scanning line i, searching edge points in the second edge image to the left and right sides based on the initial scanning position mid _ temp, stopping scanning the current line after searching the first edge point to the left and right sides, taking the two scanned edge points as mark points of the current line, and comparing with the same-side mark points with the closest line interval respectively: if the transverse interval of the same-side mark points exceeds the set interval threshold value TdisIf yes, deleting the mark point on the side of the current row, and not updating mid _ temp; otherwise, the mid _ temp is updated based on the mark point of the current row as: mid _ temp ═ (left _ x (i) + right _ x (i)) x 0.5, where left _ x (i) denotes the left marker point of the current line, and right _ x (i) denotes the right marker point of the current line;
wherein the interval threshold TdisDepending on the number m of spaced rows between two ipsilateral markers compared, i.e. TdisK × m + b, where constants k and b are preset values;
if no edge point exists on a certain side, the edge point is vacant, and the mid _ temp position is not updated;
when a certain number of mark points are detected on one side, performing linear fitting processing on the detected mark points, taking the obtained linear as an initial tangent of the current side, recording the horizontal position of the intersection point of the initial tangents on the two sides as the position of the horizon, and stopping the scanning processing of the mark points after scanning to pixel points which are a certain number of distance away from the position of the horizon;
and 4, step 4: the method comprises the following steps of (1) carrying out carving treatment on lane lines:
if the distance between the mark point obtained by the last scanning of the current side and the initial tangent line of the current side does not exceed a preset distance threshold, connecting the head mark point and the tail mark point of the current side to obtain a lane line of the current side;
otherwise, counting the density degree of the mark points on the current side, and if the density degree exceeds a density threshold value, smoothly connecting all the mark points on the current side in sequence to obtain a lane line on the current side; otherwise, performing curve fitting on the mark points on the current side to obtain the lane line on the current side.
2. The method of claim 1, wherein in step 2, the searchable slope of the straight line n preferably ranges from [5,10 ].
3. The method of claim 1, wherein in step 2, the length threshold is set to: 10% of the largest number length among the number lengths of all edge points.
4. The method of claim 1, wherein in step 3, the interval threshold T isdisThe preferable setting mode is as follows: t isdis=3m+2。
5. The method according to claim 1, wherein in step 3, when the number of the detected marker points on one side reaches 10, the detected marker points are subjected to a straight line fitting process.
6. The method according to claim 1, wherein in step 3, the condition for stopping the mark point scanning process is: the interval between the current scanning line and the horizontal line position reaches NdisA pixel point, wherein NdisHas a value range of [10,30 ]]。
7. The method as claimed in claim 1, wherein the step 4, the determining manner of directly connecting the marking points on the current side and smoothing the connected lines to obtain the lane line on the current side further comprises: and if the ratio of the number of the mark points on the current side to the total scanning line number of the mark point scanning processing exceeds 0.7, directly connecting each mark point on the current side.
8. The method as claimed in claim 1, wherein in step 4, if the distance between the mark point obtained from the last scan of the current side and the initial tangent of the current side does not exceed 10 pixel units, the head and the tail mark points of the current side are connected to form the lane line of the current side.
9. The method of claim 1, wherein in step 1, the filtered clipped region is edge-detected using a canny operator.
CN201811104184.0A 2018-09-21 2018-09-21 Lane line detection method Active CN109308468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811104184.0A CN109308468B (en) 2018-09-21 2018-09-21 Lane line detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811104184.0A CN109308468B (en) 2018-09-21 2018-09-21 Lane line detection method

Publications (2)

Publication Number Publication Date
CN109308468A CN109308468A (en) 2019-02-05
CN109308468B true CN109308468B (en) 2021-09-24

Family

ID=65224124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811104184.0A Active CN109308468B (en) 2018-09-21 2018-09-21 Lane line detection method

Country Status (1)

Country Link
CN (1) CN109308468B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950740A (en) * 2019-12-10 2021-06-11 中交宇科(北京)空间信息技术有限公司 Method, device and equipment for generating high-precision map road center line and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620732A (en) * 2009-07-17 2010-01-06 南京航空航天大学 Visual detection method of road driving line
KR20100053318A (en) * 2008-11-12 2010-05-20 (주) 서돌 전자통신 A sensing system of a lane offense cars using the corner data and sensing method using the same
CN102842039A (en) * 2012-07-11 2012-12-26 河海大学 Road image detection method based on Sobel operator
CN103150337A (en) * 2013-02-04 2013-06-12 北京航空航天大学 Lane line reconstruction method based on Bezier curve
CN105930800A (en) * 2016-04-21 2016-09-07 北京智芯原动科技有限公司 Lane line detection method and device
CN106203401A (en) * 2016-08-11 2016-12-07 电子科技大学 A kind of method for quick of lane line
JP2016203814A (en) * 2015-04-23 2016-12-08 本田技研工業株式会社 Lane detection device, method therefor, curve start point detection device, method therefor, steering assist device and method therefor
CN107563314A (en) * 2017-08-18 2018-01-09 电子科技大学 A kind of method for detecting lane lines based on parallel coordinate system
CN107590451A (en) * 2017-09-04 2018-01-16 中国科学院长春光学精密机械与物理研究所 A kind of method for detecting lane lines
CN108229354A (en) * 2017-12-22 2018-06-29 温州大学激光与光电智能制造研究院 The method of lane detection

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100053318A (en) * 2008-11-12 2010-05-20 (주) 서돌 전자통신 A sensing system of a lane offense cars using the corner data and sensing method using the same
CN101620732A (en) * 2009-07-17 2010-01-06 南京航空航天大学 Visual detection method of road driving line
CN102842039A (en) * 2012-07-11 2012-12-26 河海大学 Road image detection method based on Sobel operator
CN103150337A (en) * 2013-02-04 2013-06-12 北京航空航天大学 Lane line reconstruction method based on Bezier curve
JP2016203814A (en) * 2015-04-23 2016-12-08 本田技研工業株式会社 Lane detection device, method therefor, curve start point detection device, method therefor, steering assist device and method therefor
CN105930800A (en) * 2016-04-21 2016-09-07 北京智芯原动科技有限公司 Lane line detection method and device
CN106203401A (en) * 2016-08-11 2016-12-07 电子科技大学 A kind of method for quick of lane line
CN107563314A (en) * 2017-08-18 2018-01-09 电子科技大学 A kind of method for detecting lane lines based on parallel coordinate system
CN107590451A (en) * 2017-09-04 2018-01-16 中国科学院长春光学精密机械与物理研究所 A kind of method for detecting lane lines
CN108229354A (en) * 2017-12-22 2018-06-29 温州大学激光与光电智能制造研究院 The method of lane detection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Lane line detection in real time based on morphological operations for driver assistance system;M Kodeeswari;《2017 4th International Conference on Signal Processing, Computing and Control (ISPCC)》;20180125;page 316-319 *
结构化道路车道线的鲁棒检测与跟踪;刘献如;《光电子激光》;20101231;第21卷(第12期);第1834-1839页 *

Also Published As

Publication number Publication date
CN109308468A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN109784344B (en) Image non-target filtering method for ground plane identification recognition
CN107679520B (en) Lane line visual detection method suitable for complex conditions
CN108280450B (en) Expressway pavement detection method based on lane lines
CN108596165B (en) Road traffic marking detection method and system based on unmanned plane low latitude Aerial Images
CN107895151A (en) Method for detecting lane lines based on machine vision under a kind of high light conditions
CN108009522B (en) Road detection method, device and terminal
CN109409205A (en) Video road driveway line detecting method of taking photo by plane based on line pitch characteristics point cluster
CN109448000B (en) Segmentation method of traffic direction sign image
WO2023279966A1 (en) Multi-lane-line detection method and apparatus, and detection device
CN109559324A (en) A kind of objective contour detection method in linear array images
CN109886168B (en) Ground traffic sign identification method based on hierarchy
CN110390256B (en) Asphalt pavement crack extraction method
CN111079541B (en) Road stop line detection method based on monocular vision
CN109961065B (en) Sea surface ship target detection method
CN113239733B (en) Multi-lane line detection method
CN110473255B (en) Ship mooring post positioning method based on multiple grid division
CN109800641B (en) Lane line detection method based on threshold value self-adaptive binarization and connected domain analysis
CN109308468B (en) Lane line detection method
CN107977608B (en) Method for extracting road area of highway video image
CN110443166A (en) A kind of licence plate recognition method of haze weather
Hernández et al. Lane marking detection using image features and line fitting model
CN110889342B (en) Identification method of deceleration strip
CN111241911B (en) Self-adaptive lane line detection method
CN108805896B (en) Distance image segmentation method applied to urban environment
CN106295642B (en) License plate positioning method based on fault tolerance rate and texture features

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