CN107111757B - Lane line detection method and device - Google Patents

Lane line detection method and device Download PDF

Info

Publication number
CN107111757B
CN107111757B CN201680000674.9A CN201680000674A CN107111757B CN 107111757 B CN107111757 B CN 107111757B CN 201680000674 A CN201680000674 A CN 201680000674A CN 107111757 B CN107111757 B CN 107111757B
Authority
CN
China
Prior art keywords
preset
threshold range
distance threshold
line
line distance
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
CN201680000674.9A
Other languages
Chinese (zh)
Other versions
CN107111757A (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.)
Streamax Technology Co Ltd
Original Assignee
Streamax Technology 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 Streamax Technology Co Ltd filed Critical Streamax Technology Co Ltd
Publication of CN107111757A publication Critical patent/CN107111757A/en
Application granted granted Critical
Publication of CN107111757B publication Critical patent/CN107111757B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition

Abstract

A lane line detection method and a device thereof comprise: acquiring a picture of a road surface in front of the vehicle (S11); detecting whether two straight lines exist in the picture of the road surface in front of the vehicle, wherein the colors of the two straight lines are different from the color of the road surface in front of the vehicle in the picture (S12); when there are two straight lines in the picture of the road surface in front of the vehicle, taking N points on the two straight lines respectively, and calculating the distance between the N points taken on the two straight lines and the center point of the obtained picture of the road surface in front of the vehicle respectively, wherein N is an integer and is greater than or equal to 2 (S13); whether the two straight lines are paired lane lines is determined based on the calculated distances between the N points taken on the two straight lines and the center point of the acquired picture of the road surface in front of the vehicle (S14). By the method, the speed of obtaining the detection result of the lane line can be improved.

Description

Lane line detection method and device
Technical Field
The embodiment of the invention belongs to the field of image processing, and particularly relates to a lane line detection method and device.
Background
The lane line detection technology is a basic technology of lane departure, collision early warning and automatic driving.
In the existing lane line detection method, a real-time video stream is obtained, and then a lane line pair is detected in the real-time video stream, and considerable resources are consumed in the process of detecting the lane line, so that a detection result is difficult to obtain in time.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting a lane line, and aims to solve the problem that the detection result of the lane line is difficult to obtain in time by the conventional method.
The embodiment of the invention is realized in such a way that a lane line detection method comprises the following steps:
acquiring a picture of a road surface in front of a vehicle;
detecting whether two straight lines exist in the picture of the road surface in front of the vehicle, wherein the colors of the two straight lines are different from the color of the road surface in front of the vehicle in the picture;
when two straight lines exist in the picture of the road surface in front of the vehicle, respectively taking N points on the two straight lines, and respectively calculating the distance between the N points on the two straight lines and the central point of the obtained picture of the road surface in front of the vehicle, wherein N is an integer and is more than or equal to 2;
and judging whether the two straight lines are paired lane lines or not according to the calculated distance between the N points respectively taken on the two straight lines and the central point of the acquired image of the road surface in front of the vehicle.
Another object of an embodiment of the present invention is to provide a lane line detection apparatus, including:
the image acquisition unit is used for acquiring an image of a road surface in front of the vehicle;
the straight line detection unit is used for detecting whether two straight lines exist in the picture of the road surface in front of the vehicle, and the colors of the two straight lines are different from the color of the road surface in front of the vehicle in the picture;
a distance calculation unit, configured to, when two straight lines exist in the image of the road surface in front of the vehicle, take N points on each of the two straight lines, and calculate distances between the N points taken on each of the two straight lines and a center point of the acquired image of the road surface in front of the vehicle, where N is an integer and is greater than or equal to 2;
and the paired lane line judging unit is used for judging whether the two straight lines are paired lane lines or not according to the calculated distance between the N points respectively taken on the two straight lines and the central point of the acquired image of the road surface in front of the vehicle.
In the embodiment of the invention, whether the two straight lines are paired lane lines is judged according to the calculated distance between the N points taken on the two straight lines and the central point of the acquired image of the road surface in front of the vehicle, and the distance between the two points is calculated simply, so that the calculation result can be obtained quickly, and the speed of obtaining the detection result of the lane lines is improved.
Drawings
Fig. 1 is a flowchart of a lane line detection method according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a first embodiment of the present invention, in which 2 points are respectively taken from two straight lines and connected to the center of a picture;
fig. 3 is another schematic diagram of the first embodiment of the present invention, in which 2 points are respectively taken on two straight lines and connected to the center of the picture;
FIG. 4 is a diagram of a first decision classification tree according to a first embodiment of the present invention;
FIG. 5 is a diagram of a second decision classification tree provided by the first embodiment of the present invention;
FIG. 6 is a diagram of a third decision classification tree provided by the first embodiment of the present invention;
FIG. 7 is a schematic diagram of a first embodiment of the present invention for detecting lane-pair using decision classification trees;
fig. 8 is a structural diagram of a lane line detection apparatus according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the embodiment of the invention, the image of the road surface in front of the vehicle is acquired, whether two straight lines exist in the image of the road surface in front of the vehicle is detected, when two straight lines exist in the image of the road surface in front of the vehicle, N points are respectively taken on the two straight lines, the distance between the N points respectively taken on the two straight lines and the center point of the acquired image of the road surface in front of the vehicle is respectively calculated, and whether the two straight lines are paired lane lines is judged according to the calculated distance between the N points respectively taken on the two straight lines and the center point of the acquired image of the road surface in front of the vehicle.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
The first embodiment is as follows:
fig. 1 shows a flowchart of a lane line detection method according to a first embodiment of the present invention, which is detailed as follows:
in step S11, a picture of the road surface ahead of the vehicle is acquired.
Specifically, a road surface in front of the vehicle is photographed by a vehicle monitor or the like to acquire a picture corresponding to the road surface in front of the vehicle. Of course, in order to increase the subsequent lane line detection speed, after the image of the road in front of the vehicle is acquired, the acquired image may be preprocessed, for example, a color image is converted into a gray image, so as to reduce the memory space occupied by the image itself.
And step S12, detecting whether two straight lines exist in the picture of the road surface in front of the vehicle, wherein the colors of the two straight lines are different from the color of the road surface in front of the vehicle in the picture.
The two straight lines here have a certain width on the road surface, for example the width that a lane line, which is common for road surfaces, occupies on the road surface. The colors of the two straight lines are different from the color of the road surface so as to achieve the purpose of reminding a user, and the color of the road surface is usually gray or black, so that the colors of the two straight lines are usually white in order to improve the distinguishing degree.
Specifically, it is detected whether the acquired image of the road surface in front of the vehicle has 2 or more colors, and if so, it is detected whether regions corresponding to the colors occupying the small area of the acquired image of the road surface in front of the vehicle form two straight lines. It should be noted that the straight line here is not necessarily a continuous solid line, but may also be a continuous broken line, that is, there are a plurality of line segments in one straight line.
And step S13, when two straight lines exist in the picture of the road surface in front of the vehicle, respectively taking N points on the two straight lines, and respectively calculating the distance between the N points on the two straight lines and the central point of the obtained picture of the road surface in front of the vehicle, wherein N is an integer and is greater than or equal to 2.
The points taken on each straight line have a certain distance therebetween, and specifically, the center point of the picture of the road surface in front of the vehicle is not necessarily the center point between two straight lines, as shown in fig. 2. When the picture of the road surface in front of the vehicle is rectangular, the central point of the picture of the road surface in front of the vehicle is the central point of the rectangular area, namely the intersection point of two diagonal lines of the rectangular area.
Taking fig. 3 as an example, point O in the figure is a central point of the picture, and 2 points are taken on two straight lines: points A and B are taken on the left straight line, points C and D are taken on the right straight line, and the distances of the straight lines AO, BO, CO and DO are calculated respectively.
And step S14, judging whether the two straight lines are paired lane lines according to the calculated distance between the N points respectively taken on the two straight lines and the central point of the acquired picture of the road surface in front of the vehicle.
Specifically, when the center point of the acquired image of the road surface in front of the vehicle is also the center point between the two straight lines, it may be determined whether the distance between any one of the N points and the center point of the acquired image of the road surface in front of the vehicle is equal to the preset lane line width by directly comparing the distances between the N points and the center point of the acquired image of the road surface in front of the vehicle with the preset lane line width, and then it is determined whether the two straight lines are paired lane lines according to the comparison result, but when the center point of the acquired image of the road surface in front of the vehicle is not the center point between the two straight lines, the determination result is most likely to be erroneous.
Optionally, in order to improve the accuracy of the lane line detection result, the step S14 specifically includes:
and A1, respectively comparing the calculated distances between the N points respectively taken on the two straight lines and the central point of the acquired picture of the road surface in front of the vehicle with the corresponding preset distance threshold. Wherein, the number of the corresponding preset distance threshold values is more than or equal to 1.
And A2, judging whether the two straight lines are the paired lane lines according to the comparison result. Specifically, when the calculated distances between the N points taken on each of the two straight lines and the center point of the acquired image of the road surface in front of the vehicle are all smaller than the corresponding preset distance threshold, the two straight lines are determined as paired lane lines.
Alternatively, when N is 2, a connection line of 2 points each taken on two straight lines and the center point of the acquired picture of the road surface ahead of the vehicle forms 4 lines: upper left line, lower left line, upper right line and lower right line, A2 specifically includes:
and A21, judging whether the upper left line belongs to a preset first upper left line distance threshold range. Wherein the upper left line refers to the upper line on the left side of the user when the user is facing the captured picture of the road surface in front of the vehicle, as shown by AO in fig. 3.
A22, when the upper left line belongs to the preset first upper left line distance threshold range, judging whether the lower left line belongs to the preset first lower left line distance threshold range. Where the lower left line refers to the lower line on the left of the user when the user is facing the captured picture of the road in front of the vehicle, BO as shown in fig. 3.
A23, when the lower left line belongs to a preset first lower left line distance threshold range, judging whether the upper right line belongs to the preset first upper right line distance threshold range, and when the upper right line does not belong to the preset first upper right line distance threshold range, judging that the two straight lines are not paired lane lines. The upper right line refers to the line located on the upper right of the user when the user faces the captured picture of the road surface in front of the vehicle, as shown by CO in fig. 3.
And A24, when the right upper line belongs to the preset first right upper line distance threshold range, judging whether the right lower line belongs to the preset first right lower line distance threshold range. Where the lower right line refers to the lower line on the right of the user when the user is facing the captured picture of the road in front of the vehicle, such as DO shown in fig. 3.
A25, when the right lower line belongs to a preset first right lower line distance threshold range, judging that the two straight lines are paired lane lines, and when the right lower line does not belong to the preset first right lower line distance threshold range, judging that the two straight lines are not paired lane lines.
Optionally, B1, when the upper left line belongs to the preset first upper left line distance threshold range and the lower left line belongs to the preset second lower left line distance threshold range, judge whether the upper right line belongs to the preset second upper right line distance threshold range, and when the upper right line does not belong to the preset second upper right line distance threshold range, judge that two straight lines are not paired lane lines, the preset second lower left line distance threshold range is not equal to the preset first lower left line distance threshold range, the preset second upper right line distance threshold range is not equal to the preset first upper right line distance threshold range.
B2, when the upper right line belongs to a preset second upper right line distance threshold range, judging whether the lower right line belongs to the preset second lower right line distance threshold range, and when the lower right line belongs to the preset second lower right line distance threshold range, judging that the two straight lines are paired lane lines; and when the right lower line does not belong to the preset second right lower line distance threshold range, judging that the two straight lines are not paired lane lines, wherein the preset second right lower line distance threshold range is not equal to the preset first right lower line distance threshold range.
B3, the upper left line belongs to the first upper left line distance threshold range of predetermineeing to, when the lower left line neither belongs to the first lower left line distance threshold range of predetermineeing nor belongs to the second lower left line distance threshold range of predetermineeing, judge two straight lines are not for the lane line in pairs.
Optionally, C1, when the upper left line belongs to the preset second upper left line distance threshold range, judge whether the lower left line belongs to the preset third lower left line distance threshold range, and when the lower left line does not belong to the preset third lower left line distance threshold range, judge that the two straight lines are not paired lane lines, the preset second upper left line distance threshold range is not equal to the preset first upper left line distance threshold range, the preset third lower left line distance threshold range is not equal to the preset second lower left line distance threshold range.
C2, when the lower left line belongs to the distance threshold range of the third lower left line of presetting, judge whether the upper right line belongs to the distance threshold range of the third upper right line of presetting, and when the upper right line does not belong to the distance threshold range of the third upper right line of presetting, judge that two straight lines are not for the lane line in pairs, the distance threshold range of the third upper right line of presetting does not equal to the distance threshold range of the second upper right line of presetting.
And C3, when the right upper line belongs to a preset third right upper line distance threshold range, judging whether the right lower line belongs to a preset third right lower line distance threshold range, wherein the preset third right lower line distance threshold range is not equal to the preset second right lower line distance threshold range.
C4, when the right lower line belongs to the preset third right lower line distance threshold range, judging that the two straight lines are paired lane lines, and when the right lower line does not belong to the preset third right lower line distance threshold range, judging that the two straight lines are not paired lane lines.
And C5, when the upper left line does not belong to the preset first upper left line threshold range or the preset second upper left line distance threshold range, judging that the two straight lines are not paired lane lines.
The preset first left upper line distance threshold range, the preset first left lower line distance threshold range, the preset first right upper line distance threshold range, the preset first right lower line distance threshold range, the preset second left lower line distance threshold range, the preset second right upper line distance threshold range, the preset second right lower line distance threshold range, the preset second left upper line distance threshold range, the preset third right upper line distance threshold range and the preset third right lower line distance threshold range are determined by collecting a large number of picture samples containing paired lane lines and constructing a classifier (such as a decision classification tree) by taking the distance between a plurality of points on two lane lines in the image and the center point of the picture as characteristics.
In order to more clearly describe how the decision classification tree generates the above-mentioned preset first upper left-line distance threshold range, preset first lower left-line distance threshold range, and other parameters, the following is described with specific examples:
the decision classification tree is an empty tree when no input is made, when the vectors corresponding to the first paired lane lines are (5, 14, 11, 9.5), that is, the upper left line is 5, the lower left line is 14, the upper right line is 11, and the lower right line is 9.5, the decision classification tree is generated as shown in fig. 4, and the obtained preset first upper left line distance threshold range, preset first lower left line distance threshold range, preset first upper right line distance threshold range, and preset first lower right line distance threshold range are (4.2, 5.8), (13.2, 14.8), (10.2, 11.8), (8.3, 10.3), respectively, wherein the preset first upper left line distance threshold range, the preset first lower left line distance threshold range, the preset first upper right line distance threshold range, and the preset first lower right line distance threshold range all use the input vectors as reference values, and then expand a certain range to the left and the right, as shown in fig. 4, the input vector is used as a reference and is further expanded to the left and right by 0.8, but in actual cases, the input vector may be used as a reference and is further expanded to the left and right by 0.1, 0.2, 0.5, and the like.
When the input second paired lane line correspondence vector is (5, 6.5, 10, 16), the decision classification tree is generated as shown in fig. 5.
When the input third paired lane line corresponding vector is (7, 11, 7.7, 12), the generated decision classification tree is as shown in fig. 6.
And generating a final decision classification tree by inputting a large number of vectors corresponding to paired lane lines and inputting a large number of vectors corresponding to unpaired lane lines to obtain parameters such as a preset first upper left line distance threshold range and a preset first lower left line distance threshold range.
In the first embodiment of the present invention, a picture of a road surface in front of a vehicle is acquired, whether two straight lines exist in the picture of the road surface in front of the vehicle is detected, when two straight lines exist in the picture of the road surface in front of the vehicle, N points are taken on the two straight lines, distances between the N points taken on the two straight lines and a center point of the acquired picture of the road surface in front of the vehicle are calculated, and whether the two straight lines are paired lane lines is determined according to the calculated distances between the N points taken on the two straight lines and the center point of the acquired picture of the road surface in front of the vehicle. Whether the two straight lines are paired lane lines is judged according to the calculated distance between the N points taken on the two straight lines and the acquired central point of the image of the road surface in front of the vehicle, and the distance between the two points is calculated simply, so that a calculation result can be obtained quickly, and the speed of obtaining a detection result of the lane lines is improved.
In order to more clearly describe the lane line detection method provided by the embodiment of the present invention, a specific embodiment is described below:
as shown in fig. 7, the upper left indicates the upper left line, and similarly, the upper right indicates the upper right line, and Y1 to Y3 indicate that the two straight lines are paired lane lines; n1 to N9 indicate that the two straight lines are not paired lane lines. Assume that the preset first upper left line distance threshold range is (4.2, 5.8), the preset first lower left line distance threshold range is (13.2, 14.8), the preset first upper right line distance threshold range is (10.2, 11.8), the preset first lower right line distance threshold range is (8.3, 10.3), the preset second lower left line distance threshold range is (5.7, 7.3), the preset second upper right line distance threshold range is (9.2, 10.8), the preset second lower right line distance threshold range is (15.2, 16.8), the preset second upper left line distance threshold range is (6.2, 7.8), the preset third lower left line distance threshold range is (10.2, 11.8), the preset third upper right line distance threshold range is (6.9, 8.5), and the preset third lower right line distance threshold range is (11.2, 12.8).
Assume that a connecting line of 2 points taken on each of two straight lines and the center point of the acquired picture of the road surface ahead of the vehicle forms a length of 4 lines: 7.7 for the top left line, 10.5 for the bottom left line, 8.5 for the top right line and 12 for the bottom right line. Then the result obtained by the classifier is Y3 according to the above determination method, that is, the two straight lines are determined to be the paired lane lines.
Assume that a connecting line of 2 points taken on each of two straight lines and the center point of the acquired picture of the road surface ahead of the vehicle forms a length of 4 lines: top left line 2.7, bottom left line 8.2, top right line 6.2 and bottom right line 4.3. Then, according to the above-mentioned determination method, it can be determined that the above-mentioned two straight lines are not paired lane lines.
It should be understood that, in the embodiment of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present invention.
Example two:
fig. 8 is a block diagram illustrating a lane line detection apparatus according to a second embodiment of the present invention, which may be used in various intelligent terminals including a mobile phone, a vehicle-mounted device, and the like. For convenience of explanation, only portions related to the embodiments of the present invention are shown.
This lane line detection device includes: a picture acquisition unit 81, a straight line detection unit 82, a distance calculation unit 83, and a lane line pair determination unit 84. Wherein:
a picture acquiring unit 81 for acquiring a picture of a road surface in front of the vehicle.
Specifically, a road surface in front of the vehicle is photographed by a vehicle monitor or the like to acquire a picture corresponding to the road surface in front of the vehicle. Of course, in order to increase the subsequent lane line detection speed, after the image of the road in front of the vehicle is acquired, the acquired image may be preprocessed, for example, a color image is converted into a gray image, so as to reduce the memory space occupied by the image itself.
And the straight line detection unit 82 is used for detecting whether two straight lines exist in the picture of the road surface in front of the vehicle, and the colors of the two straight lines are different from the color of the road surface in front of the vehicle in the picture.
Specifically, it is detected whether the acquired image of the road surface in front of the vehicle has 2 or more colors, and if so, it is detected whether regions corresponding to the colors occupying the small area of the acquired image of the road surface in front of the vehicle form two straight lines. It should be noted that the straight line here is not necessarily a continuous solid line, but may also be a continuous broken line, that is, there are a plurality of line segments in one straight line.
And a distance calculation unit 83, configured to, when two straight lines exist in the image of the road surface in front of the vehicle, take N points on the two straight lines, and calculate distances between the N points taken on the two straight lines and the center point of the acquired image of the road surface in front of the vehicle, where N is an integer and is greater than or equal to 2.
The image of the road surface in front of the vehicle is obtained by taking a picture of the road surface in front of the vehicle, wherein a certain distance exists between points taken on each straight line, and specifically, the central point of the picture of the road surface in front of the vehicle is not necessarily the central point between two straight lines.
And a paired lane line determination unit 84 configured to determine whether the two straight lines are paired lane lines according to the calculated distances between the N points taken on the two straight lines and the center point of the acquired image of the road surface in front of the vehicle.
Alternatively, in order to improve the accuracy of the lane line detection result, the pair lane line determination unit 84 includes:
and the distance comparison module is used for respectively comparing the calculated distances between the N points taken on the two straight lines and the central point of the acquired image of the road surface in front of the vehicle with the corresponding preset distance threshold. Wherein, the number of the corresponding preset distance threshold values is more than or equal to 1.
And the comparison result reprocessing module is used for judging whether the two straight lines are the paired lane lines according to the comparison result. Specifically, when the calculated distances between the N points taken on each of the two straight lines and the center point of the acquired image of the road surface in front of the vehicle are all smaller than the corresponding preset distance threshold, the two straight lines are determined as paired lane lines.
Alternatively, when N is 2, a connection line of 2 points each taken on two straight lines and the center point of the acquired picture of the road surface ahead of the vehicle forms 4 lines: upper left line, lower left line, upper right line and lower right line, the module of processing again of comparison result includes:
and the preset first left upper line distance threshold range judging module is used for judging whether the left upper line belongs to the preset first left upper line distance threshold range.
And the preset first left lower line distance threshold range judging module is used for judging whether the left lower line belongs to the preset first left lower line distance threshold range when the left upper line belongs to the preset first left upper line distance threshold range.
And the preset first right upper line distance threshold range judging module is used for judging whether the right upper line belongs to the preset first right upper line distance threshold range or not when the left lower line belongs to the preset first left lower line distance threshold range, and judging that the two straight lines are not paired lane lines when the right upper line does not belong to the preset first right upper line distance threshold range.
And the preset first lower right line distance threshold range judging module is used for judging whether the lower right line belongs to the preset first lower right line distance threshold range or not when the upper right line belongs to the preset first upper right line distance threshold range.
And the paired lane line judging module is used for judging that the two straight lines are paired lane lines when the right lower line belongs to a preset first right lower line distance threshold range, and judging that the two straight lines are not paired lane lines when the right lower line does not belong to the preset first right lower line distance threshold range.
Optionally, the lane line detection apparatus includes:
a preset second upper right distance threshold range judgment unit, configured to judge whether the upper right line belongs to the preset second upper right distance threshold range when the upper left line belongs to the preset first upper left distance threshold range and the lower left line belongs to the preset second lower left distance threshold range, and judge that the two straight lines are not paired lane lines when the upper right line does not belong to the preset second upper right distance threshold range, the preset second lower left distance threshold range is not equal to the preset first lower left distance threshold range, the preset second upper right distance threshold range is not equal to the preset first upper right distance threshold range.
And the preset second right lower line distance threshold range judging unit is used for judging whether the right lower line belongs to the preset second right lower line distance threshold range or not when the right upper line belongs to the preset second right upper line distance threshold range, and judging that the two straight lines are paired lane lines when the right lower line belongs to the preset second right lower line distance threshold range. And when the right lower line does not belong to the preset second right lower line distance threshold range, judging that the two straight lines are not paired lane lines, wherein the preset second right lower line distance threshold range is not equal to the preset first right lower line distance threshold range.
And the first unpaired lane line judgment unit is used for judging that the upper left line belongs to a preset first upper left line distance threshold range and judging that the two straight lines are not paired lane lines when the lower left line does not belong to the preset first lower left line distance threshold range or the preset second lower left line distance threshold range.
Optionally, the lane line detection apparatus includes:
the unit is judged to the left lower line distance threshold range of predetermined third, be used for when the upper left line belongs to the upper left line distance threshold range of predetermined second, judge whether the lower left line belongs to the lower left line distance threshold range of predetermined third to when the lower left line does not belong to the lower left line distance threshold range of predetermined third, judge two straight lines are not for the lane line in pairs, the upper left line distance threshold range of predetermined second is not equal to the upper left line distance threshold range of predetermined first, the lower left line distance threshold range of predetermined third is not equal to the lower left line distance threshold range of predetermined second.
A preset third upper right line distance threshold range judging unit, which is used for judging whether the upper right line belongs to the preset third upper right line distance threshold range or not when the lower left line belongs to the preset third lower left line distance threshold range, and judging that the two straight lines are not paired lane lines when the upper right line does not belong to the preset third upper right line distance threshold range, and the preset third upper right line distance threshold range is not equal to the preset second upper right line distance threshold range.
And the preset third lower right line distance threshold range judging unit is used for judging whether the lower right line belongs to the preset third lower right line distance threshold range or not when the upper right line belongs to the preset third upper right line distance threshold range, wherein the preset third lower right line distance threshold range is not equal to the preset second lower right line distance threshold range.
And the paired lane line judging unit is used for judging that the two straight lines are the paired lane lines when the right lower line belongs to the preset third right lower line distance threshold range, and judging that the two straight lines are not the paired lane lines when the right lower line does not belong to the preset third right lower line distance threshold range.
And the second non-paired lane line judging unit is used for judging that the two straight lines are not paired lane lines when the left upper line does not belong to the preset first left upper line threshold range or the preset second left upper line distance threshold range.
The preset first left upper line distance threshold range, the preset first left lower line distance threshold range, the preset first right upper line distance threshold range, the preset first right lower line distance threshold range, the preset second left lower line distance threshold range, the preset second right upper line distance threshold range, the preset second right lower line distance threshold range, the preset second left upper line distance threshold range, the preset third right upper line distance threshold range and the preset third right lower line distance threshold range are determined by collecting a large number of picture samples containing paired lane lines and constructing a classifier (such as a decision tree classifier) by taking the distance between a plurality of points on two lane lines in the image and the center point of the picture as characteristics.
In the second embodiment of the present invention, since whether the two straight lines are lane lines in pairs is determined according to the calculated distance between the N points taken on the two straight lines and the center point of the acquired image of the road surface in front of the vehicle, and the distance between the two points is calculated easily, the calculation result can be obtained quickly, thereby increasing the speed of obtaining the detection result of the lane lines.
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 invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. 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.
The 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 invention 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 functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A lane line detection method, comprising:
acquiring a picture of a road surface in front of a vehicle;
detecting whether two straight lines exist in the picture of the road surface in front of the vehicle, wherein the colors of the two straight lines are different from the color of the road surface in front of the vehicle in the picture;
when two straight lines exist in the picture of the road surface in front of the vehicle, respectively taking N points on the two straight lines, and respectively calculating the distance between the N points on the two straight lines and the central point of the obtained picture of the road surface in front of the vehicle, wherein N is an integer and is greater than or equal to 2, and the central point of the picture of the road surface in front of the vehicle is not necessarily the central point between the two straight lines;
and judging whether the two straight lines are paired lane lines or not according to the calculated distance between the N points respectively taken on the two straight lines and the central point of the acquired image of the road surface in front of the vehicle.
2. The method according to claim 1, wherein the determining whether the two straight lines are paired lane lines according to the calculated distances between the N points taken on the two straight lines and the center point of the acquired image of the road surface in front of the vehicle includes:
respectively comparing the calculated distances between the N points respectively taken on the two straight lines and the central point of the acquired image of the road surface in front of the vehicle with corresponding preset distance threshold values;
and judging whether the two straight lines are the paired lane lines according to the comparison result.
3. The method according to claim 2, wherein when N is 2, a connection line of 2 points taken on each of two straight lines and the center point of the acquired picture of the road surface ahead of the vehicle forms 4 lines: upper left line, lower left line, upper right line and lower right line, judge according to the comparison result whether two straight lines are for the lane line in pairs, specifically include:
judging whether the left upper line belongs to a preset first left upper line distance threshold range or not;
when the upper left line belongs to a preset first upper left line distance threshold range, judging whether the lower left line belongs to the preset first lower left line distance threshold range;
when the left lower line belongs to a preset first left lower line distance threshold range, judging whether the right upper line belongs to a preset first right upper line distance threshold range, and when the right upper line does not belong to the preset first right upper line distance threshold range, judging that the two straight lines are not paired lane lines;
when the right upper line belongs to a preset first right upper line distance threshold range, judging whether the right lower line belongs to the preset first right lower line distance threshold range;
and when the right lower line belongs to the preset first right lower line distance threshold range, judging that the two straight lines are paired lane lines, and when the right lower line does not belong to the preset first right lower line distance threshold range, judging that the two straight lines are not paired lane lines.
4. The method according to claim 3, wherein when the upper left line belongs to a preset first upper left line distance threshold range and when the lower left line belongs to a preset second lower left line distance threshold range, determining whether the upper right line belongs to a preset second upper right line distance threshold range, and when the upper right line does not belong to the preset second upper right line distance threshold range, determining that the two straight lines are not paired lane lines, the preset second lower left line distance threshold range is not equal to the preset first lower left line distance threshold range, and the preset second upper right line distance threshold range is not equal to the preset first upper right line distance threshold range;
when the right upper line belongs to a preset second right upper line distance threshold range, judging whether the right lower line belongs to the preset second right lower line distance threshold range, and when the right lower line belongs to the preset second right lower line distance threshold range, judging that the two straight lines are paired lane lines; when the right lower line does not belong to a preset second right lower line distance threshold range, judging that the two straight lines are not paired lane lines, wherein the preset second right lower line distance threshold range is not equal to the preset first right lower line distance threshold range;
the upper left line belongs to a preset first upper left line distance threshold range, and when the lower left line does not belong to the preset first lower left line distance threshold range or the preset second lower left line distance threshold range, it is determined that the two straight lines are not paired lane lines.
5. The method according to claim 3, wherein when the upper left line belongs to a preset second upper left line distance threshold range, determining whether the lower left line belongs to a preset third lower left line distance threshold range, and when the lower left line does not belong to the preset third lower left line distance threshold range, determining that the two straight lines are not paired lane lines, the preset second upper left line distance threshold range is not equal to the preset first upper left line distance threshold range, and the preset third lower left line distance threshold range is not equal to the preset second lower left line distance threshold range;
when the left lower line belongs to a preset third left lower line distance threshold range, judging whether the right upper line belongs to a preset third right upper line distance threshold range, and when the right upper line does not belong to the preset third right upper line distance threshold range, judging that the two straight lines are not paired lane lines, wherein the preset third right upper line distance threshold range is not equal to the preset second right upper line distance threshold range;
when the right upper line belongs to a preset third right upper line distance threshold range, judging whether the right lower line belongs to the preset third right lower line distance threshold range, wherein the preset third right lower line distance threshold range is not equal to the preset second right lower line distance threshold range;
when the right lower line belongs to a preset third right lower line distance threshold range, the two straight lines are judged to be paired lane lines, and when the right lower line does not belong to the preset third right lower line distance threshold range, the two straight lines are judged not to be paired lane lines;
and when the upper left line does not belong to the preset first upper left line threshold range or the preset second upper left line distance threshold range, judging that the two straight lines are not paired lane lines.
6. A lane line detection apparatus, characterized in that the apparatus comprises:
the image acquisition unit is used for acquiring an image of a road surface in front of the vehicle;
the straight line detection unit is used for detecting whether two straight lines exist in the picture of the road surface in front of the vehicle, and the colors of the two straight lines are different from the color of the road surface in front of the vehicle in the picture;
the distance calculation unit is used for respectively taking N points on the two straight lines when the two straight lines exist in the picture of the road surface in front of the vehicle, and respectively calculating the distance between the N points on the two straight lines and the center point of the obtained picture of the road surface in front of the vehicle, wherein N is an integer and is greater than or equal to 2, and the center point of the picture of the road surface in front of the vehicle is not necessarily the center point between the two straight lines;
and the paired lane line judging unit is used for judging whether the two straight lines are paired lane lines or not according to the calculated distance between the N points respectively taken on the two straight lines and the central point of the acquired image of the road surface in front of the vehicle.
7. The apparatus according to claim 6, wherein the paired lane line determination unit includes:
the distance comparison module is used for respectively comparing the calculated distances between the N points taken on the two straight lines and the center point of the acquired image of the road surface in front of the vehicle with corresponding preset distance threshold values;
and the comparison result reprocessing module is used for judging whether the two straight lines are the paired lane lines according to the comparison result.
8. The apparatus according to claim 7, wherein when N is 2, a connection line of 2 points taken on each of two straight lines and a center point of the acquired picture of the road surface ahead of the vehicle forms 4 lines: upper left line, lower left line, upper right line and lower right line, the module of processing again of comparison result includes:
the preset first upper left line distance threshold range judging module is used for judging whether the upper left line belongs to a preset first upper left line distance threshold range or not;
the device comprises a preset first left lower line distance threshold range judging module, a preset first left upper line distance threshold range judging module and a preset first left lower line distance threshold range judging module, wherein the preset first left lower line distance threshold range judging module is used for judging whether the left lower line belongs to the preset first left lower line distance threshold range when the left upper line belongs to the preset first left upper line distance threshold range;
the preset first upper right line distance threshold range judging module is used for judging whether the upper right line belongs to the preset first upper right line distance threshold range or not when the lower left line belongs to the preset first lower left line distance threshold range, and judging that the two straight lines are not paired lane lines when the upper right line does not belong to the preset first upper right line distance threshold range;
the preset first lower right line distance threshold range judging module is used for judging whether the lower right line belongs to the preset first lower right line distance threshold range or not when the upper right line belongs to the preset first upper right line distance threshold range;
and the paired lane line judging module is used for judging that the two straight lines are paired lane lines when the right lower line belongs to a preset first right lower line distance threshold range, and judging that the two straight lines are not paired lane lines when the right lower line does not belong to the preset first right lower line distance threshold range.
9. The apparatus of claim 8, wherein the apparatus comprises:
a preset second upper right line distance threshold range judging unit, configured to judge whether the upper right line belongs to a preset second upper right line distance threshold range when the upper left line belongs to a preset first upper left line distance threshold range and the lower left line belongs to a preset second lower left line distance threshold range, and judge that the two straight lines are not paired lane lines when the upper right line does not belong to the preset second upper right line distance threshold range, the preset second lower left line distance threshold range is not equal to the preset first lower left line distance threshold range, and the preset second upper right line distance threshold range is not equal to the preset first upper right line distance threshold range;
a preset second lower right line distance threshold range judging unit, configured to judge whether the lower right line belongs to a preset second lower right line distance threshold range when the upper right line belongs to the preset second upper right line distance threshold range, and judge that the two straight lines are paired lane lines when the lower right line belongs to the preset second lower right line distance threshold range; when the right lower line does not belong to a preset second right lower line distance threshold range, judging that the two straight lines are not paired lane lines, wherein the preset second right lower line distance threshold range is not equal to the preset first right lower line distance threshold range;
and the first unpaired lane line judgment unit is used for judging that the upper left line belongs to a preset first upper left line distance threshold range and judging that the two straight lines are not paired lane lines when the lower left line does not belong to the preset first lower left line distance threshold range or the preset second lower left line distance threshold range.
10. The apparatus of claim 8, wherein the apparatus comprises:
a preset third left lower line distance threshold range judging unit, configured to judge whether the left lower line belongs to a preset third left lower line distance threshold range when the left upper line belongs to the preset second left upper line distance threshold range, and judge that the two straight lines are not paired lane lines when the left lower line does not belong to the preset third left lower line distance threshold range, where the preset second left upper line distance threshold range is not equal to the preset first left upper line distance threshold range, and the preset third left lower line distance threshold range is not equal to the preset second left lower line distance threshold range;
a preset third upper right line distance threshold range judging unit, configured to judge whether the upper right line belongs to a preset third upper right line distance threshold range when the lower left line belongs to the preset third lower left line distance threshold range, and judge that the two straight lines are not paired lane lines when the upper right line does not belong to the preset third upper right line distance threshold range, where the preset third upper right line distance threshold range is not equal to the preset second upper right line distance threshold range;
a preset third lower right line distance threshold range judging unit, configured to judge whether the lower right line belongs to a preset third lower right line distance threshold range when the upper right line belongs to the preset third upper right line distance threshold range, where the preset third lower right line distance threshold range is not equal to the preset second lower right line distance threshold range;
the paired lane line judging unit is used for judging that the two straight lines are the paired lane lines when the right lower line belongs to a preset third lower right line distance threshold range, and judging that the two straight lines are not the paired lane lines when the right lower line does not belong to the preset third lower right line distance threshold range;
and the second non-paired lane line judging unit is used for judging that the two straight lines are not paired lane lines when the left upper line does not belong to the preset first left upper line threshold range or the preset second left upper line distance threshold range.
CN201680000674.9A 2016-08-08 2016-08-08 Lane line detection method and device Active CN107111757B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/094026 WO2018027500A1 (en) 2016-08-08 2016-08-08 Lane line detection method and device

Publications (2)

Publication Number Publication Date
CN107111757A CN107111757A (en) 2017-08-29
CN107111757B true CN107111757B (en) 2020-08-28

Family

ID=59676382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201680000674.9A Active CN107111757B (en) 2016-08-08 2016-08-08 Lane line detection method and device

Country Status (2)

Country Link
CN (1) CN107111757B (en)
WO (1) WO2018027500A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108177524B (en) * 2017-12-22 2020-01-14 联创汽车电子有限公司 ARHUD system and lane line drawing method thereof
CN109345824A (en) * 2018-10-12 2019-02-15 李雨宸 The Lane determining method and Related product of fault car in highway
CN112009461A (en) * 2019-05-13 2020-12-01 上海博泰悦臻网络技术服务有限公司 Parking assist method and parking assist system

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100373002B1 (en) * 2000-04-03 2003-02-25 현대자동차주식회사 Method for judgment out of lane of vehicle
JP4605145B2 (en) * 2006-11-14 2011-01-05 トヨタ自動車株式会社 Lane detection device
US7693629B2 (en) * 2006-11-14 2010-04-06 Denso Corporation Onboard fog determining apparatus
CN102722705B (en) * 2012-06-12 2014-04-30 武汉大学 Method for detecting multi-lane line on basis of random sample consensus (RANSAC) algorithm
CN103839264B (en) * 2014-02-25 2016-09-14 中国科学院自动化研究所 A kind of detection method of lane line
TWI600558B (en) * 2014-04-01 2017-10-01 Dynamic lane detection system and method
CN104943611A (en) * 2015-06-12 2015-09-30 上海卓易科技股份有限公司 Vehicle running state monitoring method and device
CN105000016A (en) * 2015-06-12 2015-10-28 上海卓易科技股份有限公司 Vehicle driving state monitoring method and monitor
CN105069415B (en) * 2015-07-24 2018-09-11 深圳市佳信捷技术股份有限公司 Method for detecting lane lines and device
CN105136153B (en) * 2015-09-11 2018-06-26 江苏大学 A kind of lane line exact position harvester and acquisition method
CN105809149A (en) * 2016-03-31 2016-07-27 电子科技大学 Lane line detection method based on straight lines with maximum length

Also Published As

Publication number Publication date
WO2018027500A1 (en) 2018-02-15
CN107111757A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
CN110491135B (en) Method and related device for detecting illegal parking
CN107111757B (en) Lane line detection method and device
KR101883228B1 (en) Method and Apparatus for Gesture Recognition
CN107909007B (en) lane line detection method and device
CN109740533A (en) Masking ratio determines method, apparatus and electronic system
CN110738078A (en) face recognition method and terminal equipment
CN112115803B (en) Mask state reminding method and device and mobile terminal
CN112052782A (en) Around-looking-based parking space identification method, device, equipment and storage medium
CN113989858A (en) Work clothes identification method and system
CN111753716B (en) Parking line pressing detection method and server
CN113297939A (en) Obstacle detection method, system, terminal device and storage medium
CN109522796A (en) Fault car reminding method and Related product in high speed
CN110913209B (en) Camera shielding detection method and device, electronic equipment and monitoring system
CN112241660A (en) Anti-theft monitoring method and device based on vision
JP6126849B2 (en) Lane identification device and lane identification method
CN109345824A (en) The Lane determining method and Related product of fault car in highway
JP2017058950A (en) Recognition device, image pickup system, and image pickup device, and recognition method and program for recognition
Rajesh et al. Smart Parking system using Image processing
CN110363251B (en) SKU image classification method and device, electronic equipment and storage medium
CN114283361A (en) Method and apparatus for determining status information, storage medium, and electronic apparatus
CN111160314B (en) Violent sorting identification method and device
CN113050063A (en) Obstacle detection method, device and equipment based on laser sensor and storage medium
CN111652158A (en) Target object detection method and device, storage medium and electronic device
CN109101646B (en) Data processing method, device, system and computer readable medium
CN112329621A (en) Processing method, system, terminal and medium for abnormal behavior early warning data

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