CN108875607A - Method for detecting lane lines, device and computer readable storage medium - Google Patents
Method for detecting lane lines, device and computer readable storage medium Download PDFInfo
- Publication number
- CN108875607A CN108875607A CN201810560358.8A CN201810560358A CN108875607A CN 108875607 A CN108875607 A CN 108875607A CN 201810560358 A CN201810560358 A CN 201810560358A CN 108875607 A CN108875607 A CN 108875607A
- Authority
- CN
- China
- Prior art keywords
- lane line
- connected region
- image
- lane
- preliminary
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 107
- 238000012545 processing Methods 0.000 claims abstract description 38
- 238000006243 chemical reaction Methods 0.000 claims abstract description 19
- 238000000605 extraction Methods 0.000 claims abstract description 17
- 230000008030 elimination Effects 0.000 claims abstract description 12
- 238000003379 elimination reaction Methods 0.000 claims abstract description 12
- 238000001514 detection method Methods 0.000 claims description 59
- 230000008569 process Effects 0.000 claims description 37
- 238000005260 corrosion Methods 0.000 claims description 33
- 230000007797 corrosion Effects 0.000 claims description 33
- 238000004364 calculation method Methods 0.000 claims description 29
- 238000005530 etching Methods 0.000 claims description 25
- 238000012216 screening Methods 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 20
- 238000005299 abrasion Methods 0.000 claims description 10
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 238000002372 labelling Methods 0.000 claims description 8
- 238000007781 pre-processing Methods 0.000 claims description 5
- 238000011156 evaluation Methods 0.000 claims description 3
- 238000004321 preservation Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 18
- 230000006872 improvement Effects 0.000 description 12
- 238000005452 bending Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 238000005286 illumination Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000008034 disappearance Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003628 erosive effect Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000033001 locomotion Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 102100034112 Alkyldihydroxyacetonephosphate synthase, peroxisomal Human genes 0.000 description 1
- 101000799143 Homo sapiens Alkyldihydroxyacetonephosphate synthase, peroxisomal Proteins 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000000848 angular dependent Auger electron spectroscopy Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011049 filling Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/588—Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/12—Edge-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20092—Interactive image processing based on input by user
- G06T2207/20104—Interactive definition of region of interest [ROI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20172—Image enhancement details
- G06T2207/20192—Edge enhancement; Edge preservation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20224—Image subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
- G06T2207/30256—Lane; Road marking
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of method for detecting lane lines, including:The image acquired in real time is pre-processed;Morphology top is used to emit the interference information on operation elimination lane line pretreated image;Image after eliminating to the interference information on lane line carries out binary conversion treatment, obtains preliminary lane line connected region;According to the direction of preliminary lane line connected region, preliminary lane line connected region is divided into preliminary left-lane line connected region and preliminary right-lane line connected region, and straight line fitting is carried out using RANSAC to preliminary left-lane line connected region and preliminary right-lane line connected region respectively;Optimal left-lane line connected region sorted to RANSAC and/or optimal right-lane line connected region carry out Boundary Extraction respectively, and carry out the processing of B-spline curves interpolation fitting lane line to the boundary of extraction, obtain final left-lane line and/or final right-lane line.
Description
Technical field
The present invention relates to technical field of image processing more particularly to a kind of method for detecting lane lines, device and computer
Readable storage medium storing program for executing.
Background technique
With the development of the social economy, vehicle increasingly becomes the public essential vehicles, Exploration on Train Operation Safety
Also more important.Currently, being fitted with driving assistance system in many vehicles.Wherein, some driving assistance systems can pass through
Lane line on detection road provides traveling lane information for vehicle.For example, as Senior Officer's auxiliary system (Advanced
Driver Assistant System, abbreviation ADAS) important component, vehicle deviate early warning system (Lane
Departure Warning System, abbreviation LDWS) vehicle can be deviateed in vehicle by the lane information where detection vehicle
Warning prompt is initiated to driver when road, to guarantee driving safety.
The key of Lane Departure Warning System is that system can accurately identify lane line edge.Lane detection
Difficult point is that detection system can adapt to the variation of weather environment, i.e. detection system is uneven illumination is even, rainwater, lane line are miscellaneous
Recognition accuracy still with higher under the adverse circumstances such as object covering.In practical environment, by weather, uneven illumination,
Shade and sundries block the influence of equal factors, and lane line edge is not always high-visible, these second-rate vehicles
Diatom is accurately identified to system brings certain interference.Currently, Lane Departure Warning System is broadly divided into based on sensor
With view-based access control model.Sensor-based system uses radar, infrared laser or GPS, is believed according to the position of GPS positioning vehicle
Breath come judge vehicle whether run-off-road.But GPS system can not accurately position lane line edge, especially when vehicle into
Enter tunnel, GPS positioning lane line will fail.
The vehicle of view-based access control model deviates early warning system and shoots vehicle front screen picture using camera, using machine vision
Method camera picture is handled in real time, identify the lane line in current video frame.The lane detection one of view-based access control model
As have based on model and based on the detection method of feature.Patent No. CN201710220811.6 is disclosed to be clustered based on K-means
Method carries out lane detection, carries out K-means cluster to the coordinate system of Hough transform and extracts lane line.The method for
The lane detection of structured road can be very good to adapt to, but for unstructured road, such as city abrasion lane line,
It is blocked by shadow the lane detection of the non-ideal roads such as lane line, the lane line blocked by white vehicle, the standard of testing result
Exactness will substantially reduce.
The present inventor has found in the practice of the invention, and following technical problem exists in the prior art:Existing base
In the method for detecting lane lines of Hough transform, the operation of lane line straight line fitting is carried out according to the result of Hough transform.For non-
The lane lines such as structured road, such as abrasion, shade, sundries covering, bending, traditional Threshold segmentation are easy to lane line to draw
It is divided into background, to lose lane line information.For example, a complete lane line is since uneven illumination is even, image binaryzation
When part lane line dropout, more seriously, one section of dotted line lane line is lost completely.Therefore the prior art is in image preprocessing
Stage is just lost lane line information.In addition, the prior art due to use straight line replace curve, for longer curve, Hough
The straight line of transformation fitting has biggish detection error.As it can be seen that for unstructured road, the lane detection side of the prior art
The effect is unsatisfactory for method.
Summary of the invention
The embodiment of the present invention provides a kind of method for detecting lane lines, device and computer readable storage medium, can be effective
It solves the problems, such as that unstructured road lane detection error is larger, improves the reliability of Lane Departure Warning System.
One embodiment of the invention provides a kind of method for detecting lane lines method, including step:
S1, the image acquired in real time is pre-processed;
S2, morphology top is used to emit the interference information on operation elimination lane line to pretreated image;
S3, binary conversion treatment is carried out to the image after the interference information elimination on lane line, after binary conversion treatment processing
Image carry out connected component labeling, and to after label connected region carry out preliminary screening, obtain preliminary lane line connected region
Domain;
S4, according to the direction of the preliminary lane line connected region, the preliminary lane line connected region is divided into tentatively
Left-lane line connected region and preliminary right-lane line connected region, and respectively to the preliminary left-lane line connected region and described
Preliminary right-lane line connected region carries out straight line fitting using RANSAC, obtains optimal left-lane line connected region and/or optimal
Right-lane line connected region;And
S5, it boundary is carried out to the optimal left-lane line connected region and/or optimal right-lane line connected region respectively mentions
It takes, and the processing of B-spline curves interpolation fitting lane line is carried out to the boundary of extraction, obtain final left-lane line and/or the final right side
Lane line.
As an improvement of the above scheme, the step S2 includes:
S21, etching operation is carried out to pretreated image, to eliminate the lane line of disturbed information covering;
S22, expansive working is carried out to the image after etching operation, to fill the interference information zone boundary being corroded,
Image after obtaining expansive working;
S23, the pretreated image is subtracted into the image after the expansive working, obtains morphology top and emits at operation
Image after reason, the morphology top emit eliminated while the image after calculation process remains lane line it is dry on lane line
Disturb information.
As an improvement of the above scheme, in the step S21, the implementation procedure of the etching operation such as formula (1) institute
Show:
Wherein, O is the object of corrosion, and SE is corrosion structure member, length in pixels Length (SE)=Max of corrosion structure member
(Lane_Width) 1+ε, Max (Lane_Width) are lane line maximum pixel width, and ε 1 is preset constant;Corrosion structure member
Vector direction is vertical with lane line direction;
In the step S22, shown in the implementation procedure of the expansive working such as formula (2):
Wherein, O ' is the object of expansion, and O '=O ⊙ SE;SE ' is first for expansion structure, and SE '=SE;
In the step S23, execution that the image after the pretreated image and expansive working is handled
Shown in process such as formula (3):
Wherein, Result is that the morphology top emits the image after calculation process.
As an improvement of the above scheme, in the step S3, preliminary screening is carried out to the connected region after label, obtained
Preliminary lane line connected region specifically includes step:
Whether the angle absolute value of the connected region after S31, judge mark is within the scope of 15~85 °, if entering step
32, otherwise judge the connected region for non-lane line connected region;
S32, judge whether the connected region bottom intersects with image boundary, if executing step S34, otherwise go to
Step S33;
S33, judge whether the connected region bottom intersects at the lower section of 2/3 width of image, if then entering step
Otherwise rapid S34 is judged as non-lane line connected region;
S34, the lane line width of the connected region is judged whether within the scope of lane line width threshold value, if then entering
Otherwise step S35 is judged as non-lane line connected region;
S35, judge whether the area of the connected region is greater than preset area threshold, if being then judged as described preliminary
Otherwise lane line connected region is judged as non-lane line connected region.
As an improvement of the above scheme, the lane line width threshold value is indicated with [min, max], wherein min is lane line
Width Low threshold, max are high thresholds;The following formula of lane line width (4) of the connected region calculates:
Wherein, width (r) is the lane line width of the r row of the connected region, and r is the connected region mass center institute
Line position set, rmaxIt is the height of image, rminIt is image initial row subscript, ε 2 is lane line width redundancy value.
As an improvement of the above scheme, the step S4 includes:
S41, all connections for inputting the preliminary left-lane line connected region or the preliminary right-lane line connected region
Area coordinate;
S42, using RANSAC algorithm to the preliminary left-lane line connected region or the preliminary right-lane line connected region
All connected region coordinates in domain carry out straight line fitting;
S43, the interior point for being included according to fitting a straight line are by the preliminary left-lane line connected region or the preliminary right vehicle
Diatom connected region is positioned as lane line connected region.
As an improvement of the above scheme, the step S42 includes:
Most sample in S421, the selection preliminary left-lane line connected region or the preliminary right-lane line connected region
This subset;
S422, judge whether the smallest sample subset has been previously used carry out model parameter calculation, if so, returning
Step S421, it is no to then follow the steps S423;
The supplementary set progress model evaluation of S423, the selection smallest sample subset;
S424, judge whether "current" model is better than previous optimal models, if executing step S425, otherwise return step
S426;
S425, "current" model is judged as optimal models;
S426, judge whether to reach maximum number of iterations, if executing step S427, otherwise return step S421;
S427, preservation meet all coordinate points of optimal models.
As an improvement of the above scheme, it is not walking in S1, the pretreatment includes carrying out ROI choosing to the image acquired in real time
It selects, the processing of image gray processing and image median filter.
As an improvement of the above scheme, the interference information on the lane line include shade on lane line, sundries covering,
Fracture, abrasion or road surface identification interference information.
The embodiment of the invention provides a kind of lane detection devices, including:
Image pre-processing module, for being pre-processed to the image acquired in real time;
Morphology top emits calculation process module, eliminates lane for emitting operation using morphology top to pretreated image
Interference information on line;
Preliminary lane line connected region screening module carries out two for the image after eliminating to the interference information on lane line
Value processing carries out connected component labeling to the image after binary conversion treatment, and is tentatively sieved to the connected region after label
Choosing, obtains preliminary lane line connected region;
RANSAC categorization module, for the direction according to the preliminary lane line connected region, by the preliminary lane line
Connected region is divided into preliminary left-lane line connected region and preliminary right-lane line connected region, and respectively to the preliminary left-lane
Line connected region and the preliminary right-lane line connected region are obtained optimal left-lane line and are connected using RANSAC progress straight line fitting
Logical region and/or optimal right-lane line connected region;And
B-spline curves interpolation fitting module, for the optimal left-lane line connected region and/or optimal right-lane line
Connected region carries out Boundary Extraction respectively, and carries out the processing of B-spline curves interpolation fitting lane line to the boundary of extraction, obtains most
Whole left-lane line and/or final right-lane line.
As an improvement of the above scheme, the morphology top emits calculation process module and includes:
Etching operation unit, for carrying out etching operation to pretreated image, to eliminate disturbed information covering
Lane line;
Expansive working unit, for carrying out expansive working to the image after etching operation, to fill the interference being corroded
Information area boundary, the image after obtaining expansive working;
Image subtraction processing unit is obtained for the pretreated image to be subtracted the image after the expansive working
While image after emitting calculation process to morphology top, the morphology top emit the image after calculation process and remain lane line
Eliminate the interference information on lane line.
As an improvement of the above scheme, shown in the implementation procedure such as formula (1) of the etching operation unit:
Wherein, O is the object of corrosion, and SE is corrosion structure member, length in pixels Length (SE)=Max of corrosion structure member
(Lane_Width) 1+ε, Max (Lane_Width) are lane line maximum pixel width, and ε 1 is preset constant;Corrosion structure member
Vector direction is vertical with lane line direction;
Shown in the implementation procedure such as formula (2) of the expansive working unit:
Wherein, O ' is the object of expansion, and O '=O ⊙ SE;SE ' is first for expansion structure, and SE '=SE;
Shown in the implementation procedure of image subtraction processing unit such as formula (3):
Wherein, Result is that the morphology top emits the image after calculation process.
Another embodiment of the present invention provides a kind of lane detection device, including processor, memory and it is stored in
In the memory and it is configured as the computer program executed by the processor, the processor executes the computer journey
Method for detecting lane lines described in foregoing invention embodiment is realized when sequence.
Another embodiment of the present invention provides a kind of computer readable storage medium, the computer readable storage medium packet
Include the computer program of storage, wherein where controlling the computer readable storage medium in computer program operation
Equipment executes method for detecting lane lines described in foregoing invention embodiment.
Compared with prior art, a kind of method for detecting lane lines, device and computer disclosed by the embodiments of the present invention can
Storage medium is read, by emit using morphology top on operation elimination lane line to acquisition and pretreated image in real time
Interference information, the image after then eliminating to the interference information on lane line carries out binary conversion treatment, after binary conversion treatment
Image carries out connected component labeling, and carries out preliminary screening to the connected region after label, obtains preliminary lane line connected region;
According to the direction of the preliminary lane line connected region, the preliminary lane line connected region is divided into preliminary left-lane line and is connected to
Region and preliminary right-lane line connected region, and respectively to the preliminary left-lane line connected region and the preliminary right-lane line
Connected region carries out straight line fitting using RANSAC, obtains optimal left-lane line connected region and/or the connection of optimal right-lane line
Region;Then Boundary Extraction is carried out respectively to the optimal left-lane line connected region and/or optimal right-lane line connected region,
And the processing of B-spline curves interpolation fitting lane line is carried out to the boundary of extraction, obtain final left-lane line and/or final right lane
Line.As it can be seen that the embodiment of the present invention emits the interference information on the lane line of calculation process elimination image by using morphology top simultaneously
Lane line information is remained simultaneously, the robustness of lane detection is improved, so that lane detection is more accurate, improves lane
Deviate the reliability of early warning system.In addition, the present invention is handled using B-spline curves interpolation fitting lane line, can effectively solve the problem that
There is biggish detection error problem for long bending lane line and bending dotted line lane line in the prior art.The present invention is implemented
Example is particularly suitable for the unstructured of interference informations such as the covering of hatched, sundries, fracture, abrasion or road surface identification on lane line
The lane detection of road.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of method for detecting lane lines provided in an embodiment of the present invention.
Fig. 2 is the idiographic flow schematic diagram of the step S2 of method for detecting lane lines provided in an embodiment of the present invention a kind of.
Fig. 3 is the idiographic flow schematic diagram of the step S3 of method for detecting lane lines provided in an embodiment of the present invention a kind of.
Fig. 4 is the idiographic flow schematic diagram of the step S4 of method for detecting lane lines provided in an embodiment of the present invention a kind of.
Fig. 5 is a kind of detailed process of the step S42 of method for detecting lane lines provided in an embodiment of the present invention shown in Fig. 4
Schematic diagram.
Fig. 6 is that a kind of method for detecting lane lines provided in an embodiment of the present invention is utilized to believe interference hatched on lane line
The unstructured road of breath carries out the flow diagram of lane detection.
Fig. 7~Figure 12 is using method for detecting lane lines provided in an embodiment of the present invention to interference hatched on lane line
The unstructured road of information carries out the image procossing schematic diagram of lane detection.
Figure 13 is using method for detecting lane lines provided in an embodiment of the present invention under the rainy scene of unstructured road
Carry out the image result schematic diagram of lane detection.
Figure 14 is using method for detecting lane lines provided in an embodiment of the present invention under the night-time scene of unstructured road
Carry out the image result schematic diagram of lane detection.
Figure 15 be using method for detecting lane lines provided in an embodiment of the present invention on lane line have vehicle interference information
Unstructured road carry out lane detection image result schematic diagram.
Figure 16 be using method for detecting lane lines provided in an embodiment of the present invention on lane line with abrasion interference information
Unstructured road carry out lane detection image procossing schematic diagram.
Figure 17 is a kind of structural block diagram of lane detection device provided in an embodiment of the present invention.
Figure 18 is that a kind of morphology top of lane detection device provided in an embodiment of the present invention emits calculation process module
Structural block diagram.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
It is a kind of flow diagram for method for detecting lane lines that one embodiment of the invention provides, including step referring to Fig. 1
Suddenly:
S1, the image acquired in real time is pre-processed;
S2, morphology top is used to emit the interference information on operation elimination lane line to pretreated image;
S3, binary conversion treatment is carried out to the image after the interference information elimination on lane line, after binary conversion treatment processing
Image carry out connected component labeling, and to after label connected region carry out preliminary screening, obtain preliminary lane line connected region
Domain;
S4, according to the direction of the preliminary lane line connected region, the preliminary lane line connected region is divided into tentatively
Left-lane line connected region and preliminary right-lane line connected region, and respectively to the preliminary left-lane line connected region and described
Preliminary right-lane line connected region carries out straight line fitting using RANSAC, obtains optimal left-lane line connected region and/or optimal
Right-lane line connected region;
S5, it boundary is carried out to the optimal left-lane line connected region and/or optimal right-lane line connected region respectively mentions
It takes, and the processing of B-spline curves interpolation fitting lane line is carried out to the boundary of extraction, obtain final left-lane line and/or the final right side
Lane line.
When it is implemented, using the camera for being mounted on front part of vehicle region (such as below rearview mirror), it can be with collecting vehicle
Current frame image containing lane line in front of;The main purpose of image preprocessing is to eliminate image sampling noise, sky etc. to do
The influence of object is disturbed, maximizes and retains lane line region.
Preferably, the step S1 specifically includes step:
S11, ROI region is set on each frame image acquired in real time;The ROI region includes vehicle front and road
Road image between disappearance horizontal plane.
In field of image processing, area-of-interest (Region Of Interest, abbreviation ROI), is selected from image
An image-region, this region is image analysis emphasis of interest.In the present embodiment, the ROI region of selection is main
It is the road image between bonnet of motor car top and road disappearance horizontal plane, is concentrated mainly on the lower part of image.Pass through selection
ROI region can accelerate image processing speed, while avoid the interference of ambient enviroment.In the present embodiment, all algorithms below
It is all to be carried out in ROI region, and ROI region is preferably sized to 320 × 240 pixels.
S12, gray processing processing is carried out to the image of ROI region, obtains gray level image.Gray processing processing can filter
Data processing amount is reduced, so as to further speed up image processing speed.
S13, median filter process is carried out to gray level image, the noise during image capturing and transmitting is removed, to protect
Demonstrate,prove the accuracy of data.
The present embodiment emits the interference information on operation removal lane line using morphology top to pretreated image, wherein
Top, which emits operation and refers to, first corrodes original image, then expands, then the result after subtracting expansion with original image.As shown in Fig. 2, step
S2 specifically includes step S21~S23:
S21, etching operation is carried out to pretreated image, to eliminate the lane line of disturbed information covering.
In the step S21, shown in the implementation procedure of the etching operation such as formula (1):
Wherein, O is the object of corrosion, and SE is corrosion structure member.
The length in pixels Length (SE) of corrosion structure member=Max (Lane_Width)+ε 1, Max (Lane_Width) are
Lane line maximum pixel width, ε 1 are preset constant;The vector direction of corrosion structure member is vertical with lane line direction.
Corrosion structure member SE is determined according to following condition:
1) it is determined according to lane line width and corrodes first size;
Specifically, corrode length in pixels Length (SE)=Max (Lane_Width)+ε 1 of member, wherein SE is corrosion knot
Constitutive element, Max (Lane_Width) are lane line maximum pixel width, and 1 size of ε is 5 in the present embodiment.
2) vector direction of corrosion member is determined according to lane line direction.
Specifically, the vector direction for corroding member is vertical with lane line direction.
For example, the lane line width of the present embodiment test is not more than 50 pixels, so the corrosion knot that the present embodiment is selected
Constitutive element SE is linear junction constitutive element, and lineal measure is 50 pixels, and direction is horizontal direction, i.e. SE=[1,1 ..., 1]1x50。
According to formula (1) it is found that the detailed process of Image erosion operation can be described as:Using Chemically etching stencils in target figure
As upper smooth movement, moving direction is that from left to right, from top to bottom, a mobile pixel, selects structural element and target every time
Result of the target image minimum gradation value of picture registration part as corrosion.For example, if lane line be disturbed information (such as
Shade) covering, then corrosion process replaces with the gray value of lane line the gray value of interference information (such as shade).So rotten
Erosion operation is the lane line for eliminating disturbed information (such as shade) covering.
S22, expansive working is carried out to the image after etching operation, to fill the interference information zone boundary being corroded,
Image after obtaining expansive working.
In the step S22, shown in the implementation procedure of the expansive working such as formula (2):
Wherein, O ' is the object of expansion, and O '=O ⊙ SE;SE ' is first for expansion structure, and SE '=SE.
According to formula (2) it is found that expansive working is similar with etching operation, only expansive working the result is that selection it is swollen
The maximum gradation value of the target image of swollen template covering.
S23, the pretreated image is subtracted into the image after the expansive working, obtains morphology top and emits at operation
Image after reason, the morphology top emit eliminated while the image after calculation process remains lane line it is dry on lane line
Disturb information.
Image is only left the region greater than structural element after above-mentioned corrosion expansion, wherein these regions include interference
Information (such as shade) region.Interference information (such as shade) can be eliminated using the figure that original image subtracts after expansion, and is protected
Stay lane line.Specifically, in the step S23, at the image after the pretreated image and expansive working
Shown in the implementation procedure of reason such as formula (3):
Wherein, Result is that the morphology top emits the image after calculation process.
As it can be seen that the detailed process that top emits operation can be described as:First target image is corroded, it is swollen again to the result after corrosion
It is swollen, the figure of expansion is then subtracted with original image.Because lane line region is replaced with interference information region, expansion and handle by etching operation
The interference information zone boundary being corroded is filled, while the result that original image subtracts after expansion just remains lane line
Eliminate interference information.
Therefore the interference information on operation removal lane line is emitted using morphology top, removes the interference information on lane line
There is the difference become apparent in the corresponding region of lane line and other regions of image in image afterwards.At this point, for the figure
As carrying out binaryzation, then the result of binaryzation is more credible.
For described image carry out binary conversion treatment operation be specifically:
Firstly, carrying out binary conversion treatment to the gray level image of removal interference information;
Then, connected component label is carried out to the image of binaryzation, the gray scale value of pixel is higher than default gray scale thresholding
Pixel as the pixel in the connected domain, and the gray scale value of pixel is below or equal to the pixel of default gray scale thresholding
As the pixel outside the connected domain.According to aforesaid operations, at least one is formed in the gray level image of the removal interference information
A connected region.In general, in the connected component label image lane line the rough band of position.
Before to the classification of binaryzation connected region, first according to the property of lane line, it may be lane line that preliminary screening, which goes out,
Connected region, reject non-lane line connected region.As shown in figure 3, specific steps include:
Whether the angle absolute value of the connected region after S31, judge mark is within the scope of 15~85 °, if entering step
32, otherwise judge the connected region for non-lane line connected region;
S32, judge whether the connected region bottom intersects with image boundary, if executing step S34, otherwise go to
Step S33;
S33, judge whether the connected region bottom intersects at the lower section of 2/3 width of image, if then entering step
Otherwise rapid S34 is judged as non-lane line connected region;
S34, the lane line width of the connected region is judged whether within the scope of lane line width threshold value, if then entering
Otherwise step S35 is judged as non-lane line connected region;
Wherein, the lane line width threshold value is indicated with [min, max], wherein min is lane line width Low threshold, max
It is high threshold;
Due to perspective transform, lane line width is remote small close big, and reflection is exactly the lane line below image on the image
Wider, above image, lane line width becomes smaller, lane line width and the approximately linear relationship of image line.In the present embodiment,
The following formula of lane line width (4) of the connected region calculates:
Wherein, width (r) is the lane line width of the r row of the connected region, and r is the connected region mass center institute
Line position set, rmaxAnd rminIt is the row where the minimum and maximum width of lane line respectively, in fact, rmaxIt is the height of image,
rminIt is image initial row subscript, ε 2 is lane line width redundancy value.In the present embodiment, max=40, min=0, ε 2=5.
S35, judge whether the area of the connected region is greater than preset area threshold, if being then judged as described preliminary
Otherwise lane line connected region is judged as non-lane line connected region.
The present embodiment can effectively exclude desultory point company using the screening process of preliminary lane line connected region shown in Fig. 3
Non- lane line connected region is rejected so that it may be lane line connected region that preliminary screening, which goes out, in logical region.
After interference information removal and binary conversion treatment, formed inside the Lane detection model for training
Several connected domains.It may be blocked by other objects due to being likely to occur uneven illumination or lane line in image, it is accessed
The actual boundary of connected domain may not be straight line.Therefore, the present embodiment is using improved RANSAC algorithm to connected domain
Boundary carries out straight line fitting.
RANSAC (Randomsampleconsensus, random sampling consistency) algorithm is to include abnormal number according to one group
According to sample data set, calculate the mathematical model parameter of data, obtain the algorithm of effective sample data.Existing RANSAC is calculated
Method is when carrying out straight line fitting, it is not intended that the response intensity of the sample point for fitting a straight line.In other words, existing
In RANSAC algorithm, all sample points status having the same.It is provided in this embodiment relative to conventional RANSAC algorithm
RANSAC algorithm is weighted each sample point using the response intensity of different sample points as the weighting parameters of the sample point,
Straight line fitting is carried out further according to later numerical value is weighted.
Specifically, the step S4 includes step S41~S43 with reference to Fig. 4:
S41, all connections for inputting the preliminary left-lane line connected region or the preliminary right-lane line connected region
Area coordinate.
After carrying out preliminary screening to two-value connected region, according to the direction of connected region, connected region is divided into left and right
Two parts.RANSAC fitting classification is carried out to the two-part connected region in left and right respectively.
S42, using improved RANSAC algorithm to the preliminary left-lane line connected region or the preliminary right-lane line
All connected region coordinates of connected region carry out straight line fitting.
Specifically, can randomly choose the subsample in sample set in the boundary of the connected domain carries out models fitting,
Then the supplementary set for calculating model subset in sample carries out model estimation, until selecting optimal model.This motion considers
It is approximately straight line to lane line connected domain point set, straight line fitting is carried out using RANSAC, the interior point then selected according to RANSAC
Connected domain positioning is carried out, it may be lane line connected domain that the connected domain where chosen interior point, which is considered optimal, such as Fig. 5 institute
Show, which specifically includes:
Most sample in S421, the selection preliminary left-lane line connected region or the preliminary right-lane line connected region
This subset;
S422, judge whether the smallest sample subset has been previously used carry out model parameter calculation, if so, returning
Step S421, it is no to then follow the steps S423;
The supplementary set progress model evaluation of S423, the selection smallest sample subset;
S424, judge whether "current" model is better than previous optimal models, if executing step S425, otherwise return step
S426;
S425, "current" model is judged as optimal models;
S426, judge whether to reach maximum number of iterations, if executing step S427, otherwise return step S421;
S427, preservation meet all coordinate points of optimal models.
S43, the interior point for being included according to fitting a straight line are by the preliminary left-lane line connected region or the preliminary right vehicle
Diatom connected region is positioned as lane line connected region.
Lane detection based on Hough transform can only detect linear vehicle diatom, for long bending lane line and bending
Dotted line lane line has biggish detection error.
After obtaining lane line connected region, Boundary Extraction is carried out to lane line connected region, to the boundary of extraction into
Row B-spline curves are fitted lane line.Wherein B-spline curves interpolation fitting lane line technology is familiar with by those skilled in the art,
Details are not described herein.
As it can be seen that a kind of method for detecting lane lines provided in this embodiment emits calculation process elimination figure by using morphology top
Interference information on the lane line of picture simultaneously remains lane line information simultaneously, the robustness of lane detection is improved, so that lane
Line detection is more accurate, improves the reliability of Lane Departure Warning System.In addition, the present invention is quasi- using B-spline curves interpolation
Conjunction lane line processing can effectively solve the problem that in the prior art for long bending lane line and bending dotted line lane line with larger
Detection error problem.The embodiment of the present invention is particularly suitable for hatched, sundries covering, fracture, abrasion or road on lane line
The lane detection of the unstructured roads of interference informations such as face mark.
With reference to Fig. 6, be using a kind of method for detecting lane lines provided in an embodiment of the present invention on lane line with interference
Information is that the unstructured road of shade carries out the flow diagram of lane detection.Specifically include step S101~S105:
S101, the image acquired in real time is pre-processed;
Wherein, to the image acquired in real time carry out pretreatment include each frame image for acquiring in real time is carried out ROI selection,
Image gray processing and image median filter processing.It is as shown in Figure 7 that pretreated image is carried out to the image acquired in real time.
S102, morphology top is used to emit the shade on operation elimination lane line to pretreated image;
The present embodiment to pretreated image use morphology top emit operation removal lane line on shader procedure for:First
Target image is corroded, to the result reflation after corrosion, the figure of expansion is then subtracted with original image.Because etching operation is lane
Line region replaces with shadow region, and expansion is again filled the shadow edge being corroded, and original image subtracts the knot after expansion
Fruit eliminates shade while just remaining lane line.Its detailed process can refer to Fig. 2, omit description herein.To pretreatment
Image after image afterwards uses morphology top to emit the shade on operation elimination lane line is as shown in Figure 8.As seen from the figure, top emits fortune
It calculates and remains lane line information while removal image shade well.
S103, binary conversion treatment is carried out to the image after the shadow removing on lane line, to the image after binary conversion treatment
Connected component labeling is carried out, and preliminary screening is carried out to the connected region after label, obtains preliminary lane line connected region;
When it is implemented, carrying out binary conversion treatment, the result of binaryzation such as Fig. 9 institute to the gray level image of removal shade first
Show.
Then, connection area identification is carried out to the image of binaryzation, a step preliminary screening is carried out to the UNICOM domain after mark,
Reject non-lane line part.Before to binaryzation connection territorial classification, first according to the property of lane line, preliminary screening goes out may
It is the connection region of lane line, rejects non-lane line connection region.The screening process of preliminary lane line connected region can refer to
Fig. 3, details are not described herein.The selection result of preliminary lane line connected region is as shown in Figure 10.As seen from the figure, preliminary lane line connects
The screening process in logical region can effectively exclude desultory point connected region, so that it may be lane line connected region that preliminary screening, which goes out,
Non- lane line connected region is rejected in domain.
S104, according to the direction of the preliminary lane line connected region, the preliminary lane line connected region is divided into just
Left-lane line connected region and preliminary right-lane line connected region are walked, and respectively to the preliminary left-lane line connected region and institute
It states preliminary right-lane line connected region and straight line fitting is carried out using RANSAC, obtain optimal left-lane line connected region and/or most
Excellent right-lane line connected region;
When it is implemented, the implementation procedure of step S104 can refer to above-described embodiment, straight line fitting is carried out using RANSAC
The lane line connection region navigated to is as shown in figure 11.
S105, boundary is carried out respectively to the optimal left-lane line connected region and/or optimal right-lane line connected region
It extracts, and the processing of B-spline curves interpolation fitting lane line is carried out to the boundary of extraction, obtain final left-lane line and/or final
Right-lane line.
When it is implemented, the implementation procedure of step S105 can refer to above-described embodiment, details are not described herein.It is blocked by shadow
Lane line B-spline curves fitting result it is as shown in figure 12.
In order to test method proposed by the present invention to the test effect of different scenes, have chosen respectively typical unstructured
The scene of road is such as rained, night, vehicle interferes and abrasion lane line.Wherein, Figure 13~Figure 16 is to utilize the present invention respectively
Embodiment provide method for detecting lane lines under rainy scene, under night-time scene, on lane line with vehicle interference information with
And the image result schematic diagram of the progress lane detection of the unstructured road with abrasion interference information on lane line.From figure
From the point of view of the result that 13~Figure 16 is shown, the method for detecting lane lines that the embodiment of the present invention proposes is to the lane line of unstructured road
Detection all has good robustness under different scenes.
It is a kind of structural schematic diagram for lane detection device that one embodiment of the invention provides referring to Figure 17, including:
Image pre-processing module 171, for being pre-processed to the image acquired in real time;
Morphology top emits calculation process module 172, eliminates for emitting operation using morphology top to pretreated image
Interference information on lane line;
Preliminary lane line connected region screening module 173, for the image after being eliminated to the interference information on lane line into
Row binary conversion treatment carries out connected component labeling to the image after binary conversion treatment, and carries out just to the connected region after label
Step screening, obtains preliminary lane line connected region;
RANSAC categorization module 174, for the direction according to the preliminary lane line connected region, by the preliminary lane
Line connected region is divided into preliminary left-lane line connected region and preliminary right-lane line connected region, and respectively to the preliminary left vehicle
Diatom connected region and the preliminary right-lane line connected region obtain optimal left-lane line using RANSAC progress straight line fitting
Connected region and/or optimal right-lane line connected region;
B-spline curves interpolation fitting module 175, for the optimal left-lane line connected region and/or optimal right vehicle
Diatom connected region carries out Boundary Extraction respectively, and carries out the processing of B-spline curves interpolation fitting lane line to the boundary of extraction, obtains
To final left-lane line and/or final right-lane line.
Wherein, as shown in figure 18, the morphology top emits calculation process module 172 and includes:
Etching operation unit 1721 is covered for carrying out etching operation to pretreated image with eliminating disturbed information
The lane line of lid;
Expansive working unit 1722 is corroded for carrying out expansive working to the image after etching operation with filling
Interference information zone boundary, the image after obtaining expansive working;
Image subtraction processing unit 1723, for the pretreated image to be subtracted to the figure after the expansive working
Picture obtains morphology top and emits the image after calculation process, and the morphology top emits the image after calculation process and remains lane line
While eliminate interference information on lane line.
Specifically, shown in the implementation procedure such as formula (1) of the etching operation unit 1721:
Wherein, O is the object of corrosion, and SE is corrosion structure member, length in pixels Length (SE)=Max of corrosion structure member
(Lane_Width) 1+ε, Max (Lane_Width) are lane line maximum pixel width, and ε 1 is preset constant;Corrosion structure member
Vector direction is vertical with lane line direction;
Shown in the implementation procedure such as formula (2) of the expansive working unit 1722:
Wherein, O ' is the object of expansion, and O '=O ⊙ SE;SE ' is first for expansion structure, and SE '=SE;
Described image is subtracted each other shown in the implementation procedure such as formula (3) of processing unit 1723:
Wherein, Result is that the morphology top emits the image after calculation process.
Lane detection device provided in this embodiment emits calculation process module 172 by using morphology top and eliminates image
Lane line on interference information and simultaneously remain lane line information, the robustness of lane detection is improved, so that lane line
It is more accurate to detect, and improves the reliability of Lane Departure Warning System.In addition, the present invention uses B-spline curves interpolation fitting
Module 175 is fitted lane line processing, can effectively solve the problem that in the prior art for long bending lane line and bending dotted line
Lane line has biggish detection error problem.The embodiment of the present invention be particularly suitable for hatched, sundries covering on lane line,
The lane detection of the unstructured roads of interference informations such as fracture, abrasion or road surface identification.
It should be understood that the working principle and the course of work of lane detection device provided in this embodiment can refer to it is above-mentioned
The method for detecting lane lines that embodiment provides omits description herein.
One embodiment of the invention provide lane detection system include:Processor, memory and it is stored in described deposit
In reservoir and the computer program that can run on the processor, such as lane detection program.The processor executes institute
The step in above-mentioned each method for detecting lane lines embodiment, such as step lane shown in FIG. 1 are realized when stating computer program
Line detecting method.Alternatively, the processor realizes each module in above-mentioned each Installation practice/mono- when executing the computer program
The function of member, such as lane detection device.
Illustratively, the computer program can be divided into one or more module/units, one or more
A module/unit is stored in the memory, and is executed by the processor, to complete the present invention.It is one or more
A module/unit can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing institute
State implementation procedure of the computer program in the lane detection device.
The lane detection system can be the meter such as desktop PC, notebook, palm PC and cloud server
Calculate equipment.The lane detection system may include, but be not limited only to, processor, memory.Those skilled in the art can manage
Solution, the schematic diagram is only the example of lane detection system, does not constitute the restriction to lane detection system, can wrap
It includes than illustrating more or fewer components, perhaps combines certain components or different components, such as the lane detection system
System can also include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng the processor is the control centre of the lane detection system, utilizes various interfaces and the entire lane line of connection
The various pieces of detection system.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of lane detection system.The memory can mainly include storing program area and storage data area, wherein storage
It program area can application program needed for storage program area, at least one function (such as sound-playing function, image player function
Deng) etc.;Storage data area, which can be stored, uses created data (such as audio data, phone directory etc.) etc. according to mobile phone.This
Outside, memory may include high-speed random access memory, can also include nonvolatile memory, such as hard disk, memory, insert
Connect formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash memory
Block (Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
Wherein, if module/unit of the lane detection system integration is realized in the form of SFU software functional unit simultaneously
When sold or used as an independent product, it can store in a computer readable storage medium.Based on such reason
Solution, the present invention realize all or part of the process in above-described embodiment method, can also instruct correlation by computer program
Hardware complete, the computer program can be stored in a computer readable storage medium, the computer program is in quilt
When processor executes, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program
Code, the computer program code can be source code form, object identification code form, executable file or certain intermediate forms
Deng.The computer-readable medium may include:Any entity or device, record of the computer program code can be carried
Medium, USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), with
Machine access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..
It should be noted that the content that the computer-readable medium includes can be according to legislation and patent practice in jurisdiction
It is required that carrying out increase and decrease appropriate, such as in certain jurisdictions, do not wrapped according to legislation and patent practice, computer-readable medium
Include electric carrier signal and telecommunication signal.
It should be noted that the apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.In addition, device provided by the invention
In embodiment attached drawing, the connection relationship between module indicate between them have communication connection, specifically can be implemented as one or
A plurality of communication bus or signal wire.Those of ordinary skill in the art are without creative efforts, it can understand
And implement.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art
For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as
Protection scope of the present invention.
Claims (14)
1. a kind of method for detecting lane lines, which is characterized in that including step:
S1, the image acquired in real time is pre-processed;
S2, morphology top is used to emit the interference information on operation elimination lane line to pretreated image;
S3, on lane line interference information eliminate after image carry out binary conversion treatment, to the image after binary conversion treatment into
Row connected component labeling, and preliminary screening is carried out to the connected region after label, obtain preliminary lane line connected region;
S4, according to the direction of the preliminary lane line connected region, the preliminary lane line connected region is divided into preliminary left vehicle
Diatom connected region and preliminary right-lane line connected region, and respectively to the preliminary left-lane line connected region and described preliminary
Right-lane line connected region carries out straight line fitting using RANSAC, obtains optimal left-lane line connected region and/or optimal right vehicle
Diatom connected region;
S5, Boundary Extraction is carried out respectively to the optimal left-lane line connected region and/or optimal right-lane line connected region, and
The processing of B-spline curves interpolation fitting lane line is carried out to the boundary of extraction, obtains final left-lane line and/or final right lane
Line.
2. method for detecting lane lines as described in claim 1, which is characterized in that the step S2 includes:
S21, etching operation is carried out to pretreated image, to eliminate the lane line of disturbed information covering;
S22, expansive working is carried out to the image after etching operation, to fill the interference information zone boundary being corroded, obtained
Image after expansive working;
S23, the pretreated image is subtracted into the image after the expansive working, obtained after morphology top emits calculation process
Image, the morphology top emits the interference letter eliminated on lane line while the image after calculation process remains lane line
Breath.
3. method for detecting lane lines as claimed in claim 2, which is characterized in that
In the step S21, shown in the implementation procedure of the etching operation such as formula (1):
Wherein, O is the object of corrosion, and SE is corrosion structure member, length in pixels Length (SE)=Max of corrosion structure member
(Lane_Width) 1+ε, Max (Lane_Width) are lane line maximum pixel width, and ε 1 is preset constant;Corrosion structure member
Vector direction is vertical with lane line direction;
In the step S22, shown in the implementation procedure of the expansive working such as formula (2):
Wherein, O ' is the object of expansion, and O '=O ⊙ SE;SE ' is first for expansion structure, and SE '=SE;
In the step S23, implementation procedure that the image after the pretreated image and expansive working is handled
As shown in formula (3):
Wherein, Result is that the morphology top emits the image after calculation process.
4. method for detecting lane lines as described in claim 1, which is characterized in that in the step S3, to the company after label
Logical region carries out preliminary screening, obtains preliminary lane line connected region and specifically includes step:
Whether the angle absolute value of the connected region after S31, judge mark is no if entering step 32 within the scope of 15~85 °
Then judge the connected region for non-lane line connected region;
S32, judge whether the connected region bottom intersects with image boundary, if executing step S34, otherwise go to step
S33;
S33, judge whether the connected region bottom intersects at the lower section of 2/3 width of image, if then entering step
Otherwise S34 is judged as non-lane line connected region;
S34, the lane line width of the connected region is judged whether within the scope of lane line width threshold value, if then entering step
Otherwise S35 is judged as non-lane line connected region;
S35, judge whether the area of the connected region is greater than preset area threshold, if being then judged as the preliminary lane
Otherwise line connected region is judged as non-lane line connected region.
5. method for detecting lane lines as claimed in claim 4, which is characterized in that
The lane line width threshold value is indicated with [min, max], wherein min is lane line width Low threshold, and max is high threshold;
The following formula of lane line width (4) of the connected region calculates:
Wherein, width (r) is the lane line width of the r row of the connected region, where r is the connected region mass center
Line position is set, rmaxIt is the height of image, rminIt is image initial row subscript, ε 2 is lane line width redundancy value.
6. method for detecting lane lines as claimed in claim 4, which is characterized in that the step S4 includes:
S41, all connected regions for inputting the preliminary left-lane line connected region or the preliminary right-lane line connected region
Coordinate;
S42, using RANSAC algorithm to the preliminary left-lane line connected region or the preliminary right-lane line connected region
All connected region coordinates carry out straight line fitting;
S43, the interior point for being included according to fitting a straight line are by the preliminary left-lane line connected region or the preliminary right-lane line
Connected region is positioned as lane line connected region.
7. method for detecting lane lines as claimed in claim 6, which is characterized in that the step S42 includes:
S421, select the smallest sample in the preliminary left-lane line connected region or the preliminary right-lane line connected region sub
Collection;
S422, judge whether the smallest sample subset has been previously used carry out model parameter calculation, if so, return step
S421, it is no to then follow the steps S423;
The supplementary set progress model evaluation of S423, the selection smallest sample subset;
S424, judge whether "current" model is better than previous optimal models, if executing step S425, otherwise return step
S426;
S425, "current" model is judged as optimal models;
S426, judge whether to reach maximum number of iterations, if executing step S427, otherwise return step S421;
S427, preservation meet all coordinate points of optimal models.
8. method for detecting lane lines as described in claim 1, which is characterized in that do not walking in S1, the pretreatment includes pair
The image acquired in real time carries out ROI selection, image gray processing and image median filter processing.
9. method for detecting lane lines as described in claim 1, which is characterized in that the interference information on the lane line includes vehicle
Shade, sundries covering, fracture, abrasion or road surface identification interference information on diatom.
10. a kind of lane detection device, which is characterized in that including:
Image pre-processing module, for being pre-processed to the image acquired in real time;
Morphology top emits calculation process module, eliminates lane line for emitting operation using morphology top to pretreated image
Interference information;
Preliminary lane line connected region screening module carries out binaryzation for the image after eliminating to the interference information on lane line
Processing carries out connected component labeling to the image after binary conversion treatment, and carries out preliminary screening to the connected region after label, obtains
To preliminary lane line connected region;
The preliminary lane line is connected to by RANSAC categorization module for the direction according to the preliminary lane line connected region
Region is divided into preliminary left-lane line connected region and preliminary right-lane line connected region, and connects respectively to the preliminary left-lane line
Logical region and the preliminary right-lane line connected region obtain optimal left-lane line connected region using RANSAC progress straight line fitting
Domain and/or optimal right-lane line connected region;
B-spline curves interpolation fitting module, for being connected to the optimal left-lane line connected region and/or optimal right-lane line
Region carries out Boundary Extraction respectively, and carries out the processing of B-spline curves interpolation fitting lane line to the boundary of extraction, obtains a final left side
Lane line and/or final right-lane line.
11. lane detection device as claimed in claim 10, which is characterized in that the morphology top emits calculation process module
Including:
Etching operation unit, for carrying out etching operation to pretreated image, to eliminate the lane of disturbed information covering
Line;
Expansive working unit, for carrying out expansive working to the image after etching operation, to fill the interference information being corroded
Zone boundary, the image after obtaining expansive working;
Image subtraction processing unit obtains shape for the pretreated image to be subtracted the image after the expansive working
State top emits the image after calculation process, and the morphology top emits elimination while the image after calculation process remains lane line
Interference information on lane line.
12. lane detection device as claimed in claim 11, which is characterized in that
Shown in the implementation procedure such as formula (1) of the etching operation unit:
Wherein, O is the object of corrosion, and SE is corrosion structure member, length in pixels Length (SE)=Max of corrosion structure member
(Lane_Width) 1+ε, Max (Lane_Width) are lane line maximum pixel width, and ε 1 is preset constant;Corrosion structure member
Vector direction is vertical with lane line direction;
Shown in the implementation procedure such as formula (2) of the expansive working unit:
Wherein, O ' is the object of expansion, and O '=O ⊙ SE;SE ' is first for expansion structure, and SE '=SE;
Shown in the implementation procedure of image subtraction processing unit such as formula (3):
Wherein, Result is that the morphology top emits the image after calculation process.
13. a kind of lane detection system, it is characterised in that including processor, memory and storage in the memory and
It is configured as the computer program executed by the processor, the processor realizes such as right when executing the computer program
It is required that method for detecting lane lines described in any one of 1 to 9.
14. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes the calculating of storage
Machine program, wherein equipment where controlling the computer readable storage medium in computer program operation is executed as weighed
Benefit require any one of 1 to 9 described in method for detecting lane lines.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710912674 | 2017-09-29 | ||
CN2017109126742 | 2017-09-29 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108875607A true CN108875607A (en) | 2018-11-23 |
Family
ID=64336854
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810560358.8A Pending CN108875607A (en) | 2017-09-29 | 2018-06-03 | Method for detecting lane lines, device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108875607A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109948413A (en) * | 2018-12-29 | 2019-06-28 | 禾多科技(北京)有限公司 | Method for detecting lane lines based on the fusion of high-precision map |
CN110287779A (en) * | 2019-05-17 | 2019-09-27 | 百度在线网络技术(北京)有限公司 | Detection method, device and the equipment of lane line |
CN111160086A (en) * | 2019-11-21 | 2020-05-15 | 成都旷视金智科技有限公司 | Lane line recognition method, lane line recognition device, lane line recognition equipment and storage medium |
CN111368605A (en) * | 2018-12-26 | 2020-07-03 | 易图通科技(北京)有限公司 | Lane line extraction method and device |
CN112597846A (en) * | 2020-12-14 | 2021-04-02 | 合肥英睿***技术有限公司 | Lane line detection method, lane line detection device, computer device, and storage medium |
CN113255405A (en) * | 2020-02-12 | 2021-08-13 | 广州汽车集团股份有限公司 | Parking space line identification method and system, parking space line identification device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103136341A (en) * | 2013-02-04 | 2013-06-05 | 北京航空航天大学 | Lane line reconstruction device based on Bezier curve |
CN103500322A (en) * | 2013-09-10 | 2014-01-08 | 北京航空航天大学 | Automatic lane line identification method based on low-altitude aerial images |
CN106228125A (en) * | 2016-07-15 | 2016-12-14 | 浙江工商大学 | Method for detecting lane lines based on integrated study cascade classifier |
CN106529505A (en) * | 2016-12-05 | 2017-03-22 | 惠州华阳通用电子有限公司 | Image-vision-based lane line detection method |
-
2018
- 2018-06-03 CN CN201810560358.8A patent/CN108875607A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103136341A (en) * | 2013-02-04 | 2013-06-05 | 北京航空航天大学 | Lane line reconstruction device based on Bezier curve |
CN103500322A (en) * | 2013-09-10 | 2014-01-08 | 北京航空航天大学 | Automatic lane line identification method based on low-altitude aerial images |
CN106228125A (en) * | 2016-07-15 | 2016-12-14 | 浙江工商大学 | Method for detecting lane lines based on integrated study cascade classifier |
CN106529505A (en) * | 2016-12-05 | 2017-03-22 | 惠州华阳通用电子有限公司 | Image-vision-based lane line detection method |
Non-Patent Citations (2)
Title |
---|
卢卫娜 等: ""基于单目视觉的车道线和道路边界同步检测"", 《传感技术学报》 * |
陈龙: ""城市环境下无人驾驶智能车感知***若干关键技术研究"", 《中国博士学位论文全文数据库工程科技辑》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368605A (en) * | 2018-12-26 | 2020-07-03 | 易图通科技(北京)有限公司 | Lane line extraction method and device |
CN111368605B (en) * | 2018-12-26 | 2023-08-25 | 易图通科技(北京)有限公司 | Lane line extraction method and device |
CN109948413A (en) * | 2018-12-29 | 2019-06-28 | 禾多科技(北京)有限公司 | Method for detecting lane lines based on the fusion of high-precision map |
CN109948413B (en) * | 2018-12-29 | 2021-06-04 | 禾多科技(北京)有限公司 | Lane line detection method based on high-precision map fusion |
CN110287779A (en) * | 2019-05-17 | 2019-09-27 | 百度在线网络技术(北京)有限公司 | Detection method, device and the equipment of lane line |
CN111160086A (en) * | 2019-11-21 | 2020-05-15 | 成都旷视金智科技有限公司 | Lane line recognition method, lane line recognition device, lane line recognition equipment and storage medium |
CN111160086B (en) * | 2019-11-21 | 2023-10-13 | 芜湖迈驰智行科技有限公司 | Lane line identification method, device, equipment and storage medium |
CN113255405A (en) * | 2020-02-12 | 2021-08-13 | 广州汽车集团股份有限公司 | Parking space line identification method and system, parking space line identification device and storage medium |
CN112597846A (en) * | 2020-12-14 | 2021-04-02 | 合肥英睿***技术有限公司 | Lane line detection method, lane line detection device, computer device, and storage medium |
CN112597846B (en) * | 2020-12-14 | 2022-11-11 | 合肥英睿***技术有限公司 | Lane line detection method, lane line detection device, computer device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108875607A (en) | Method for detecting lane lines, device and computer readable storage medium | |
CN109635685B (en) | Target object 3D detection method, device, medium and equipment | |
Rakibe et al. | Background subtraction algorithm based human motion detection | |
Sen-Ching et al. | Robust techniques for background subtraction in urban traffic video | |
Faro et al. | Adaptive background modeling integrated with luminosity sensors and occlusion processing for reliable vehicle detection | |
US8773535B2 (en) | Adaptation for clear path detection using reliable local model updating | |
CN110799982A (en) | Method and system for object-centric stereo vision in an autonomous vehicle | |
CN113761999B (en) | Target detection method and device, electronic equipment and storage medium | |
CN112507862B (en) | Vehicle orientation detection method and system based on multitasking convolutional neural network | |
US8681222B2 (en) | Adaptation for clear path detection with additional classifiers | |
GB2520338A (en) | Automatic scene parsing | |
EP2275971A1 (en) | Method of obstacle detection for a vehicle | |
EP2275970A1 (en) | Method of obstacle detection for a vehicle | |
CN112446246B (en) | Image occlusion detection method and vehicle-mounted terminal | |
CN111967396A (en) | Processing method, device and equipment for obstacle detection and storage medium | |
CN111881832A (en) | Lane target detection method, device, equipment and computer readable storage medium | |
Chang et al. | An efficient method for lane-mark extraction in complex conditions | |
CN115620090A (en) | Model training method, low-illumination target re-recognition method and device and terminal equipment | |
FAN et al. | Robust lane detection and tracking based on machine vision | |
CN115965934A (en) | Parking space detection method and device | |
CN109523570B (en) | Motion parameter calculation method and device | |
CN113379789A (en) | Moving target tracking method in complex environment | |
CN113569600A (en) | Method and device for identifying weight of object, electronic equipment and storage medium | |
Michael et al. | Fast change detection for camera-based surveillance systems | |
CN116071713A (en) | Zebra crossing determination method, device, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |