CN109359602A - Method for detecting lane lines and device - Google Patents

Method for detecting lane lines and device Download PDF

Info

Publication number
CN109359602A
CN109359602A CN201811228745.8A CN201811228745A CN109359602A CN 109359602 A CN109359602 A CN 109359602A CN 201811228745 A CN201811228745 A CN 201811228745A CN 109359602 A CN109359602 A CN 109359602A
Authority
CN
China
Prior art keywords
lane line
sliding window
current
model coefficient
binary map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811228745.8A
Other languages
Chinese (zh)
Other versions
CN109359602B (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.)
Changsha Intelligent Driving Research Institute Co Ltd
Original Assignee
Changsha Intelligent Driving Research Institute 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 Changsha Intelligent Driving Research Institute Co Ltd filed Critical Changsha Intelligent Driving Research Institute Co Ltd
Priority to CN201811228745.8A priority Critical patent/CN109359602B/en
Publication of CN109359602A publication Critical patent/CN109359602A/en
Application granted granted Critical
Publication of CN109359602B publication Critical patent/CN109359602B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road

Abstract

This application involves a kind of method for detecting lane lines and devices.This method comprises: converting image to be processed to the color space including saturation degree channel and luminance channel, color space image is obtained;Saturation degree channel and luminance channel based on color space image, are filtered respectively, obtain the image segmentation information of color space image, and image segmentation information includes: to carry out the first edge information that gradient direction filtering obtains to saturation degree channel;Carry out the second edge information that horizontal direction filtering obtains respectively to saturation degree channel and luminance channel;Lane line binary map is determined based on image segmentation information;It is carried out curve fitting according to the effective pixel points in lane line binary map, obtains fitting lane line.The interference that the edge of shade, vehicle or other barriers can be effectively avoided using this method improves the accuracy rate of fitting lane line.

Description

Method for detecting lane lines and device
Technical field
This application involves intelligent driving technical fields, more particularly to a kind of method for detecting lane lines and device.
Background technique
In recent years, as computer and robot technology continue to develop, intelligent driving technology has also obtained development at full speed. In intelligent driving technology, road environment is perceived by vehicle-mounted sensor-based system, the lane line in road is accurately detected, is Realize the key factor of driving intelligent.Therefore, how to guarantee accurately to detect lane line under various Complex Natural Environments, be to have The problem that effect promotes intelligent driving performance and safety needs to capture.
Current method for detecting lane lines can not solve the complicated states pair such as shadow occlusion, vehicle or other barriers In the interference of lane detection, and these interference significantly reduce the accuracy rate of lane detection.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of vehicle of accuracy rate that can be improved lane detection Road line detecting method and device.
A kind of method for detecting lane lines, which comprises
Image to be processed is converted to the color space including saturation degree channel and luminance channel, color space figure is obtained Picture;
It based on the saturation degree channel of the color space image and luminance channel, is filtered respectively, obtains color The image segmentation information of spatial image, described image segmentation information include: to carry out gradient direction filtering to the saturation degree channel The first edge information of acquisition;That horizontal direction filtering obtains is carried out respectively to the saturation degree channel and the luminance channel Two marginal informations;
Lane line binary map is determined based on described image segmentation information;
It is carried out curve fitting according to the effective pixel points in the lane line binary map, obtains fitting lane line.
A kind of lane detection device, described device include:
Conversion processing module obtains color space image, the color for converting image to be processed to color space Space includes saturation degree channel and luminance channel;
Module is filtered, for being carried out respectively based on the saturation degree channel of the color space image and luminance channel Filtering processing, obtains the image segmentation information of color space image, described image segmentation information includes: to the saturation degree channel Carry out the first edge information that gradient direction filtering obtains;Level is carried out respectively to the saturation degree channel and the luminance channel The second edge information that trend pass filtering obtains;
Binary map determining module, for determining lane line binary map based on described image segmentation information;
Process of fitting treatment module is obtained for being carried out curve fitting according to the effective pixel points in the lane line binary map It is fitted lane line.
Above-mentioned method for detecting lane lines and device are led to by converting image to be processed to including saturation degree channel and brightness The color space in road obtains color space image, and saturation degree channel and luminance channel based on color space image carry out respectively Filtering processing, obtain the image segmentation information of color space image, wherein image segmentation information include: to saturation degree channel into The first edge information that the filtering of row gradient direction obtains;Horizontal direction filtering is carried out respectively to saturation degree channel and luminance channel to obtain The second edge information obtained.And then the image segmentation information obtained based on multiple filter determines lane line binary map.Pass through color Space conversion, then the multiple filter of gradient direction and horizontal direction is carried out to saturation degree channel and luminance channel respectively, effectively filter Except the edge of shade, vehicle or other barriers, obtaining includes accurate lane line edge and the lane line two for interfering less with edge Value figure.Further, it is carried out curve fitting based on the effective pixel points in the lane line binary map, effectively increases fitting lane The accuracy rate of line.
Detailed description of the invention
Fig. 1 is the applied environment figure of method for detecting lane lines in one embodiment;
Fig. 2 is the flow diagram of method for detecting lane lines in one embodiment;
Fig. 3 is the flow diagram that effective pixel points determine step in one embodiment;
Fig. 4 is the flow diagram that sliding window determines step in one embodiment;
Fig. 5 is the flow diagram that sliding window center determines step in one embodiment;
Fig. 6 is the flow diagram of lane fit procedure in one embodiment;
Fig. 7 is the flow diagram of current lane line model coefficient update step in one embodiment;
Fig. 8 is the flow diagram of method for detecting lane lines in one embodiment;
Fig. 9 is the effect picture of method for detecting lane lines in one embodiment;
Figure 10 is the structural block diagram of method for detecting lane lines device in one embodiment;
Figure 11 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Method for detecting lane lines provided by the present application can be applied in application environment as shown in Figure 1.In this implementation Example, by taking terminal 102 is car terminals as an example.Firstly, car terminals 102 acquire the original image of lane line, to the original image Lane detection is carried out, fitting lane line is obtained, fitting lane line is shown, or make the control in car terminals 102 Device processed keeps stablizing smooth traveling according to fitting lane line traffic control automobile.In other embodiments, terminal 102 is also possible to and vapour Vehicle terminal passes through network connection, for realizing the cloud server terminal of lane detection, and cloud server terminal is specially server.In addition, eventually End 102 can also be any required equipment for realizing lane detection.
In one embodiment, as shown in Fig. 2, providing a kind of method for detecting lane lines, it is applied in Fig. 1 in this way Terminal for be illustrated, comprising the following steps:
Image to be processed is converted to the color space including saturation degree channel and luminance channel, it is empty to obtain color by S202 Between image.
Wherein, color space is also referred to as color model (also known as color space or color system), (is usually made using a class value With three, four value or color component) indicate color approach abstract mathematical model.In the present embodiment, color space is Triple channel color space including saturation degree channel and luminance channel.For example, HSV (Hue, Saturation, Value) face The colour space, wherein H refers to that tone, S refer to saturation degree, the brightness that V refers to;HLS (Hue, Saturation, Lightness/ Luminance) color space, wherein H refers to that tone, S refer to saturation degree, the brightness that L refers to.Color space image refers to The image of the color space format obtained after converting to corresponding color space, such as HSV format-pattern, HLS format-pattern.
Specifically, the color vector of pixel is obtained according to image zooming-out to be processed, is counted by the color vector of pixel Calculation obtains each channel value in corresponding color space, and each channel value includes saturation degree channel value and luminance channel value, by each channel value shape At color space image.It, can be just by converting image to be processed to the color space including saturation degree channel and luminance channel Processing is distinguished to yellow lane line and white lane line in subsequent, improves the accuracy of lane detection.
Further, image to be processed, which refers to, is acquired image obtained to lane line.In one embodiment, wait locate Reason image can be the original image of acquisition;In another embodiment, image to be processed is also possible to carry out original image pre- Treated image.Wherein, pretreatment includes but is not limited to any one or more of processing such as image denoising, normalization.And The interference that tiny noise can be reduced by image denoising can convert the image into reference format by normalization, after being convenient for Continuous processing.
When image to be processed is to carry out pretreated image to original image, image to be processed is converted to including full With degree channel and luminance channel color space, obtain color space image the step of before, further includes: obtain acquisition lane line Original image;Original image is pre-processed, image to be processed is obtained.It, can be with when being pre-processed to original image Denoising purpose is realized using any one filtering method such as bilateral filtering algorithm, median filtering, gaussian filtering.
S204, saturation degree channel and luminance channel based on color space image, is filtered respectively, obtains color The image segmentation information of spatial image, image segmentation information include: carry out that gradient direction filtering obtains to saturation degree channel the One marginal information;Carry out the second edge information that horizontal direction filtering obtains respectively to saturation degree channel and luminance channel.
Specifically, gradient direction filtering is carried out to the saturation degree channel of color space image, obtains first edge information;It is right The saturation degree channel of color space image and luminance channel carry out horizontal direction filtering respectively, obtain second edge information.Wherein, Second edge information is by carrying out the first vertical edge information and lead to brightness that horizontal direction filtering obtains to saturation degree channel Road carries out the second vertical edge information that horizontal direction filtering obtains and carries out step-by-step or handle to obtain.The mesh of step-by-step herein or processing Be to make second edge information while carrying the first vertical edge information and the second vertical edge information.Wherein, marginal information is The pixel value for referring to edge pixel point is nonzero value, and the pixel value of non-edge pixels point is zero picture element matrix.
In the present embodiment, by carrying out horizontal direction filtering to saturation degree channel, the yellow of vertical direction can be obtained Marginal information (the first vertical edge information) can obtain vertical direction by carrying out horizontal direction filtering to luminance channel White edge information (the second vertical edge information), and lane line generally includes white lane line and yellow lane line, by this Processing is also obtained with white lane line marginal information and yellow lane line marginal information.
Specifically, the gradient calculating carried out when executing gradient direction and filtering will be realized by following formula (1), it may be assumed that
Wherein, (x, y) indicates the pixel coordinate of each pixel of color space image;F (x, y) indicates corresponding pixel points Gray value;The gradient value of Grad expression corresponding pixel points.
When carrying out horizontal direction filtering processing, the filtering algorithm of use can be any achievable Vertical edge detection Filtering algorithm, for example, Sobel filtering algorithm.
To carry out horizontal direction filtering to channel S and the channel V using Sobel, for obtaining second edge information, calculate Formula is as follows:
Wherein, S indicates channel S value;SobelxSIt indicates to carry out the first vertical edge that horizontal direction filters to channel S Edge information;V indicates V channel value;SobelxVIt indicates to carry out the second vertical edge information that horizontal direction filters to the channel V; M1Indicate second edge information.
S206 determines lane line binary map based on image segmentation information.
Wherein, lane line binary map refers to the binary map including lane line marginal information.Specifically, believed according to first edge Breath and second edge information determine lane line marginal information, generate lane line two-value based on identified lane line marginal information Figure.More specifically, 1 is set by the gray value of the edge pixel point determined according to lane line marginal information, other pixels Gray value is set as 0, generates lane line binary map.
S208 carries out curve fitting according to the effective pixel points in lane line binary map, obtains fitting lane line.
Specifically, according to preset curve matching rule, it is quasi- that curve is carried out to the effective pixel points in lane line binary map It closes, determines lane line model, generate fitting lane line in lane line binary map according to lane line model.Wherein, lane line mould Type refers to the function model of fitting lane line.
Above-mentioned method for detecting lane lines, by converting image to be processed to the face including saturation degree channel and luminance channel The colour space obtains color space image, and saturation degree channel and luminance channel based on color space image are filtered place respectively Reason, obtains the image segmentation information of color space image, wherein image segmentation information includes: to carry out gradient to saturation degree channel The first edge information that trend pass filtering obtains;Carry out horizontal direction filtering obtains the respectively to saturation degree channel and luminance channel Two marginal informations.And then the image segmentation information obtained based on multiple filter determines lane line binary map.Turned by color space Change, then carry out the multiple filter of gradient direction and horizontal direction to saturation degree channel and luminance channel respectively, effectively filter out shade, The edge of vehicle or other barriers, obtaining includes accurate lane line edge and the lane line binary map for interfering less with edge.Into One step, it is carried out curve fitting based on the effective pixel points in the lane line binary map, effectively increases the standard of fitting lane line True rate.
In one embodiment, the step of lane line binary map being determined based on image segmentation information, comprising: first edge is believed Breath, second edge information carry out step-by-step and processing, determine lane line marginal information;According to lane line marginal information, lane is generated Line binary map.
Specifically, the calculating for carrying out step-by-step and processing to first edge information, second edge information will pass through following formula (3) it realizes, it may be assumed that
M=Grad&M1 (3)
Wherein, M indicates lane line marginal information.
In the present embodiment, it filters to obtain first edge information by the way that gradient direction will be carried out to saturation degree channel, and Horizontal direction is carried out respectively to saturation degree channel and luminance channel respectively to filter to obtain the progress step-by-step of second edge information and operation, So that the pixel value for only belonging to the pixel at edge after gradient filtering and horizontal filtering is nonzero value, namely by multiple Filtering achieved the purpose that filter out irrelevant point, is only retained in the pixel that edge is belonged to after gradient filtering and horizontal filtering Point is edge pixel point.For example, by step-by-step and processing filter out shade in image to be processed, vehicle, other barriers or its The edge pixel point of his background object reduces the interference of environmental element to obtain accurate lane line marginal information.
In one embodiment, image segmentation information further include: the overall situation is carried out certainly to saturation degree channel and luminance channel respectively Adapt to the mask area information that Threshold segmentation obtains.Wherein, mask area information is global adaptive by carrying out to saturation degree channel The first sub- mask area information that Threshold segmentation obtains and global adaptive threshold fuzziness obtains is carried out to luminance channel the Two sub- mask area informations carry out step-by-step or processing obtains.The purpose of step-by-step herein or processing is to make mask area information while taking The sub- mask area information of band first and the second sub- mask area information.Wherein, mask area information, which refers to, belongs to masked areas The pixel value of pixel is nonzero value, and the pixel value of the pixel of unmasked areas is zero picture element matrix.
Further, the saturation degree channel based on color space image and luminance channel, are filtered respectively, obtain The step of image segmentation information of color space image, specifically further include: to the saturation degree channel of color space image and brightness Channel carries out global adaptive threshold fuzziness respectively, obtains mask area information.
By carrying out global adaptive threshold fuzziness to saturation degree channel, yellow mask area information (first can be obtained Sub- mask area information), by carrying out global adaptive threshold fuzziness to luminance channel, white mask area information can be obtained (the second sub- mask area information), and lane line generally includes white lane line and yellow lane line, also can through this process White lane line region and yellow lane line region are obtained to extract.
When carrying out global adaptive threshold fuzziness, the calculation formula of global adaptive threshold is as follows:
Wherein, g indicates the gray value of each tonal gradation of grey level histogram;H (g) indicates to belong to g in present image The pixel quantity of gray level;Amount indicates pixel quantity summation;ThreshAvg indicates average gray value;Thresh indicates complete Office's adaptive threshold.
The pixel that gray value is less than the threshold value can be filtered out by global adaptive threshold fuzziness, retains gray value and reaches To the pixel of the threshold value, mask area information is obtained.
Assuming that MThresh-SIndicate the first sub- mask area information, MThresh-VIndicate the second sub- mask area information, then mask Area information M2Acquisition can be calculated by the following formula:
M2=MThresh-S|MThresh-V (5)
Further, the step of lane line binary map being determined based on image segmentation information, comprising: to first edge information, Second edge information and mask area information carry out step-by-step and processing, determine lane line marginal information;Believed according to lane line edge Breath generates lane line binary map.
Specifically, the calculating of step-by-step and processing is carried out to first edge information, second edge information and mask area information It will be realized by following formula (6), it may be assumed that
M=Grad&M1&M2 (6)
Referring to Fig. 9 (a), (b), wherein Fig. 9 (a) is when only carrying out global adaptive threshold fuzziness to color space image Effect picture;Fig. 9 (b) is to the more of color space image progress gradient direction, horizontal direction and global adaptive threshold fuzziness The effect picture filtered again.It will thus be seen that by the way that the mask area information of global adaptive threshold fuzziness and first edge are believed Breath, second edge information carry out step-by-step and processing, have further filtered out the tiny vertical edge such as road surface top shadow, gap, have kept away Its interference constituted to subsequent processing is exempted from.
Further, after determining lane line binary map based on image segmentation information, further includes: determine lane line binary map In effective pixel points.Wherein, effective pixel points refer to the pixel that can be used for carrying out curve fitting.
In one embodiment, the step of determining the effective pixel points in lane line binary map, comprising: determine lane line two-value Multiple sliding windows of lane line in figure;Using the non-zero pixels point in sliding window as effective pixel points.
Specifically, rule is determined according to sliding window, multiple sliding windows is generated in lane line binary map, make multiple cunnings It include lane line in dynamic window.Further according to identified sliding window, the non-zero pixels point in sliding window is obtained, by non-zero picture Vegetarian refreshments is as effective pixel points, to be carried out curve fitting using effective pixel points.
In another embodiment, as shown in figure 3, determine lane line binary map in effective pixel points the step of, including with Lower sub-step:
S302 carries out perspective transform to lane line binary map, obtains birds-eye view.
Perspective transform refers to using the centre of perspectivity, picture point, the condition of target point three point on a straight line, makes to hold by chasles theorem Shadow face (perspective plane) rotates a certain angle around trace (axis of homology), destroys original projected light harness, is still able to maintain on image-bearing surface The constant transformation of perspective geometry figure.
In the present embodiment, lane line binary map is converted to by the birds-eye view overlooked under visual angle by perspective transform, namely By the lane line binary map under former three-dimensional system of coordinate, the birds-eye view under two-dimensional coordinate system is converted to.Under birds-eye view, lane line base This is in parastate, and lane line bending degree is than small in former lane line binary map, more convenient to be searched for using sliding window With carry out curve fitting.
S304 determines multiple sliding windows of lane line in birds-eye view.
Specifically, rule is determined according to sliding window, multiple sliding windows is generated in birds-eye view, so that multiple sliding windows It include lane line in mouthful.
S306, using the non-zero pixels point in sliding window as effective pixel points.As shown in Fig. 9 (d), (e), Fig. 9 (d) is The schematic diagram of effective pixel points is searched in one embodiment by sliding window, Fig. 9 (e) is according to the effective picture determined in Fig. 9 (d) Vegetarian refreshments carries out curve fitting, the schematic diagram of the fitting lane line of acquisition.
By the way that the perspective transform of lane line binary map at birds-eye view, is reduced the bending degree of lane line, more convenient for making It is searched for sliding window and determines effective pixel points.
Further, referring to Fig. 4, the step of determining multiple sliding windows of lane line in birds-eye view, including following sub-step It is rapid:
S402, be based on the corresponding pixel distribution histogram of birds-eye view, determine initial sliding window and with initial sliding window The center of the first adjacent sliding window.
Pixel distribution histogram refers to the histogram for describing pixel distribution situation, specifically, pixel distribution histogram Horizontal axis it is identical as the horizontal axis of birds-eye view pixel coordinate system, the axis of ordinates of pixel distribution histogram indicates non- Zero pixel quantity.In the present embodiment, the corresponding pixel distribution histogram of birds-eye view refers to the picture of setting regions in birds-eye view Plain distribution histogram.Setting regions can be specifically configured according to demand, be not limited thereto.For example, setting regions can be The arbitrary region between 1/3 region~1/2 region below birds-eye view.It is the pixel point in an embodiment as shown in Fig. 9 (c) Cloth histogram.
Specifically, the horizontal coordinate value where the corresponding pixel distribution histogram middle left and right peak value of birds-eye view is obtained, by this Two horizontal coordinate values respectively as left and right lane line initial sliding window, while also by two horizontal coordinate values difference Center as first sliding window adjacent with initial sliding window.Wherein, center refers in sliding window Heart horizontal coordinate, initial sliding window refer to first sliding window on lane line, and adjacent with initial sliding window Second sliding window on one sliding window actually lane line.
Pixel as where lane line all concentrates in x-axis (horizontal axis) a certain range, and picture one is divided It is two, the position where the peak value of the right and left pixel distribution in x-axis is very likely to be exactly lane line basic point.It therefore, will be left Horizontal coordinate value where the peak value of right both sides pixel distribution is sliding respectively as the initial sliding window of left and right lane line and first The center of dynamic window.
S404 determines initial sliding window and the first sliding according to preset home window size and size change over rule The size of window, using the first sliding window as current sliding window mouth.
Specifically, using preset home window size as the size of initial sliding window, further according to preset initial window Mouth size and size change over rule determine that the size of the first sliding window is prolonged using the first sliding window as current sliding window mouth Lane line extending direction continues growing sliding window.
Wherein, home window size and size change over rule are configured in advance, and home window size includes home window Width and length, size change over rule include the width transformation rule and/or length transformation rule of window.For example, initial window The width W of mouth0It can be configured to 200pix, the length of home window can be configured to 100pix.When size change over rule only includes window When the width/height transformation rule of mouth, then the length/width of all sliding windows is all the length/width of home window.? In one embodiment, the size that the width transformation rule of window further can be configured to newly-increased sliding window is slided than adjacent history Window reduces fixed value Δ W (such as Δ W=5pix).
Certainly, in other embodiments, size change over rule is also configurable to constant rule, so that each sliding window Size remains home window size constancy.
S406, according to the center of current sliding window mouth and the history sliding window adjacent with current sliding window mouth, The non-zero pixels coordinate of current sliding window mouth determines the center of newly-increased sliding window.Wherein, under newly-increased sliding window refers to One it needs to be determined that sliding window, history sliding window refers to the sliding window having determined.
Specifically, it is determined that the center of current sliding window mouth and the history sliding window adjacent with current sliding window mouth Difference, current sliding window mouth non-zero pixels coordinate horizontal coordinate mean value, determine newly-increased sliding window based on the two numerical value Center.
S408 determines the size of newly-increased sliding window according to the size of current sliding window mouth and size change over rule.
For example, when the size that size change over rule is newly-increased sliding window reduces fixed value than adjacent history sliding window When Δ W, then the size W of sliding window is increased newlyi+1=Wi-ΔW.Wherein, WiIndicate i-th of sliding window (current sliding window mouth) Size;Wi+1Indicate the size of i+1 sliding window (newly-increased sliding window).
S410 judges whether to meet termination condition.If so, terminating to determine multiple sliding windows of lane line in birds-eye view Step;If it is not, executing step S412.
Wherein, termination condition can be sliding window total quantity and reach preset value, is also possible to newly-increased sliding window and reaches The top margin of birds-eye view.
S412, using newly-increased sliding window as current sliding window mouth.Return to step S406.
When being unsatisfactory for termination condition, then using newly-increased sliding window as current sliding window mouth, continue to determine next cunning Dynamic window, until meeting termination condition.
In another embodiment, when not carrying out perspective transform to lane line binary map, and lane line binary map is directly determined When multiple sliding windows of middle lane line, then the birds-eye view in each step of embodiment illustrated in fig. 4 is replaced with into lane line binary map , specific steps remain unchanged.
In one embodiment, it referring to Fig. 5, is slided according to current sliding window mouth and the history adjacent with current sliding window mouth The center of window, current sliding window mouth non-zero pixels coordinate, the step of determining the center of newly-increased sliding window, packet Include following sub-step:
S502 determines the non-zero pixels point in current sliding window mouth.
Wherein, non-zero pixels point refers to that gray value is the pixel of nonzero value.Due to birds-eye view and binary map, in the figure Other than the edge pixel point determined according to lane line marginal information, the gray value of other pixels is zero.
In the present embodiment, according to the gray value of pixel each in current sliding window mouth, non-zero pixels point is determined, to obtain The coordinate value of identified non-zero pixels point.
S504 obtains the horizontal coordinate mean value of non-zero pixels point.
Specifically, the horizontal coordinate value of non-zero pixels point determined by obtaining, each horizontal coordinate value is averaged, is obtained The horizontal coordinate mean value of non-zero pixels point in current sliding window mouth.
S506, according to the center of current sliding window mouth and the history sliding window adjacent with current sliding window mouth it Difference, the horizontal coordinate mean value of non-zero pixels point, the determining center with newly-increased sliding window.
Specifically, to the center of current sliding window mouth and the history sliding window adjacent with current sliding window mouth it The horizontal coordinate mean value of poor, current sliding window mouth non-zero pixels coordinate is weighted summation, new by being used as obtained by weighted sum Increase the center of sliding window.
It can specifically be realized by following formula:
Assuming that current sliding window mouth is i-th of sliding window, then i+1 sliding window is to increase sliding window newly, (i-1)-th A sliding window is the history sliding window adjacent with i-th of sliding window.Wherein, xiIndicate the center of i-th of sliding window Position;NiIndicate the horizontal coordinate mean value of the non-zero pixels coordinate of i-th of sliding window;N indicates the sliding on a lane line Window total quantity;K indicates the horizontal coordinate value where the peak value of corresponding lane line pixel distribution;α indicates weight, specifically can basis Empirical value is determined, and referring generally to the maximum deflection amplitude of lane line, bending amplitude is bigger, and α is bigger.Under normal conditions, α can Default setting is 1.
Method is determined by the sliding window, it, can be to avoid because of cunning when the bending amplitude in lane line curved areas is larger The sliding stride of dynamic window is insufficient, and sliding window is caused to deviate with normal lane line, and then produces lane line fitting result The case where raw error;Sliding window can also be allowed to continue to search along lane line extending direction when local lane line lacks Rope enhances the robustness of lane detection.
In one embodiment, it is carried out curve fitting according to the effective pixel points in lane line binary map, obtains fitting lane The step of line, including following sub-step: according to preset curve matching rule, the valid pixel in lane line binary map is clicked through Row curve matching determines current lane line model coefficient;According to current lane line model coefficient, fitting lane line is obtained.
Curve matching rule includes but is not limited to stochastical sampling consistency method, least square method.In the present embodiment, based on pre- If curve matching rule, carry out curve fitting to the effective pixel points in lane line binary map, determine current lane line model Coefficient obtains updated lane line model based on determining current lane line model coefficient, according to lane line model in lane Fitting lane line is generated in line binary map.Wherein, current lane line model coefficient refers to and currently processed image pair to be processed The coefficient for the lane line model answered.
In one embodiment, the effective pixel points in lane line binary map are carried out using stochastical sampling consistency method Curve matching determines current lane line model coefficient.It carries out curve fitting by using stochastical sampling consistency method, due to only right The key point of preset model is fitted, therefore can reduce noise jamming, is quickly obtained accurate current lane line model system Number.
In another embodiment, it referring to Fig. 6, is carried out curve fitting, is obtained according to the effective pixel points in lane line binary map The step of lane line must be fitted, including following sub-step:
S602 carries out curve fitting to the effective pixel points in lane line binary map according to preset curve matching rule, Determine current lane line model coefficient.
S604 is smoothed according to current lane line model coefficient and history lane line model coefficient, will work as front truck Diatom model coefficient is updated to the processing result of smoothing processing.
As described above, current lane line model coefficient refers to lane corresponding with currently processed image to be processed The coefficient of line model;Accordingly, history lane line model coefficient refers in the n frame image before image to be processed, each frame The coefficient of the corresponding lane line model of image, wherein the specific value of n can configure on demand.
In the present embodiment, smoothing processing includes exponential smoothing and Smoothing Prediction, and accordingly, processing result includes referring to Number smooth value and Smoothing Prediction value.The validity for first determining whether current lane line model coefficient, when current lane line model When coefficient is effective, exponential smoothing is carried out to current lane line model coefficient according to history lane line model coefficient, it is flat to obtain index Sliding value;When the failure of current lane line model coefficient, Smoothing Prediction is carried out according to history lane line model coefficient, is referred to Number smoothing prediction value.By current lane line model coefficient update to be obtained exponential smoothing value or Smoothing Prediction value.
S606 obtains fitting lane line according to updated current lane line model coefficient.
Updated lane line model is obtained based on updated lane line model coefficient, according to lane line model in lane Fitting lane line is generated in line binary map.
In one embodiment, as shown in fig. 7, step S604 further comprises following sub-step:
S702 detects current lane line according to the first row pixel coordinate of lane line binary map and the second row pixel coordinate The validity of model coefficient.When current lane line model coefficient is effective, step S704 is executed;When current lane line model coefficient When failure, step S706 is executed.
Wherein, the first row pixel coordinate refers to the row pixel coordinate of the image apex of lane line binary map;Second row pixel Coordinate refers to the row pixel coordinate of the image bottom end of lane line binary map.
Specifically, according to the first row pixel coordinate of lane line binary map and the second row pixel coordinate and current lane line mould Type coefficient obtains radius of curvature, upper intercept and the lower intercept of current lane line model;When radius of curvature, upper intercept and lower intercept When Arbitrary Term meets corresponding failure condition, determine that current lane line model coefficient fails;When radius of curvature, upper intercept and lower section When away from corresponding failure condition is not satisfied, determine that current lane line model coefficient is effective.
Wherein, upper intercept refers to the fitting lane line obtained according to current lane line model coefficient cutting in image apex Away from lower intercept, which refers to, is fitted lane line in the intercept of image bottom end according to what current lane line model coefficient obtained.To work as front truck Road line model is x=ay2For+by+c, then current lane line model coefficient includes: a, b and c.Radius of curvature R are as follows:Upper intercept top_x are as follows: top_x=ay[0] 2+by[0]+c.Lower intercept bottom_x are as follows: Bottom_x=ay[h-1] 2+by[h-1]+c.Wherein, y indicates that the row pixel coordinate in image, h indicate the pixels tall in image. Accordingly, y[0]Indicate the first row pixel coordinate, y[h-1]Indicate the second row pixel coordinate.
In the present embodiment, the failure condition of radius of curvature are as follows: radius of curvature is less than curvature threshold, and curvature threshold is according to curved Road maximum deflection amplitude is set.The failure condition of upper intercept are as follows: upper intercept of the current upper intercept with respect to previous frame image Transformation amplitude be greater than first threshold.The failure condition of lower intercept are as follows: lower intercept of the current lower intercept with respect to previous frame image Transformation amplitude be greater than second threshold.Wherein, first threshold and the specific value of second threshold can be configured respectively on demand, This is not construed as limiting, for example, first threshold, which is configurable to 25%, second threshold, is configurable to 15% etc..
S704 carries out exponential smoothing to current lane line model coefficient according to history lane line model coefficient, obtains index Current lane line model coefficient update is exponential smoothing value by smooth value.
Specifically, when current lane line model coefficient is effective, according to history lane line model coefficient to current lane line Model coefficient carries out exponential smoothing, obtains exponential smoothing value and is realized by following formula:
Wherein, qtIndicate the exponential smoothing value at t frame moment;ptIndicate the lane line that the t frame moment is not smoothed Model coefficient;qt-1Indicate the exponential smoothing value at t-1 frame moment;β is smoothing factor, and value is pre-configured with, and configuration range is [0,1]。
S706 carries out Smoothing Prediction according to history lane line model coefficient, obtains Smoothing Prediction value, will be current Lane line model coefficient is updated to Smoothing Prediction value.
Specifically, when current lane line model coefficient fails, exponential smoothing is carried out according to history lane line model coefficient Prediction obtains Smoothing Prediction value and is realized by following formula:
Wherein,Indicate the Smoothing Prediction value at t frame moment;pt-1Indicate that the t-1 frame moment is not smoothed Lane line model coefficient;qt-1Indicate the exponential smoothing value at t-1 frame moment.
Exponential smoothing or Smoothing Prediction are carried out by using history lane line model coefficient, to current lane line Model coefficient is corrected, and can keep the duration and stability of the fitting lane line between sequential frame image.
Above-mentioned method for detecting lane lines, by being directly fitted to curve using effective pixel points, do not need to distinguish straight line with it is curved Road lane line situation, so that subsequent coefficient correction update method is suitable for straight line and bend lane line situation simultaneously.Also, it is logical It crosses using radius of curvature, upper intercept, lower intercept as principal element, it is accurate to determine not correct the current lane line mould before updating Whether type coefficient is effective, and corrects current lane line model coefficient based on history lane line model coefficient, keeps sequential frame image Between fitting lane line duration and stability.
Further, when effective pixel points be based on after perspective transform lane line binary map (birds-eye view) determine when, According to updated current lane line model coefficient, after the step of obtaining fitting lane line, further includes: to fitting lane line into Row inverse perspective mapping obtains final lane line.
Inverse perspective mapping is carried out by the way that lane line will be fitted, is converted into the final lane under original image same view angle Line, to load on final lane line in original image.It is appreciated that being then fitted lane line when not carrying out perspective transform As final lane line can directly load on fitting lane line in original image.As shown in Fig. 9 (f), for by final lane line Load on the schematic diagram of original image.
In one embodiment, referring to Fig. 8, a kind of method for detecting lane lines is provided, method includes the following steps:
Image to be processed is converted to the color space including saturation degree channel and luminance channel, it is empty to obtain color by S801 Between image.
S802 carries out gradient direction filtering to the saturation degree channel of color space image, obtains first edge information.
S803 carries out horizontal direction filtering to the saturation degree channel of color space image and luminance channel respectively, obtains the Two marginal informations.Wherein, second edge information includes the first vertical edge for carrying out horizontal direction filtering to saturation degree channel and obtaining Edge information, and the second vertical edge information that horizontal direction filtering obtains is carried out to luminance channel, by by the first vertical edge Edge information and the second vertical edge information carry out step-by-step or processing, can be obtained second edge information.
S804 carries out global adaptive threshold fuzziness to the saturation degree channel of color space image and luminance channel respectively, Obtain mask area information.Wherein, mask area information includes: and carries out global adaptive threshold fuzziness to saturation degree channel to obtain The first sub- mask area information, and the second sub- mask region that global adaptive threshold fuzziness obtains is carried out to luminance channel Information can be obtained mask by the way that the first sub- mask area information and the second sub- mask area information are carried out step-by-step or processing Area information.
S805 carries out step-by-step and processing to first edge information, second edge information and mask area information, determines lane Line marginal information.
S806 generates lane line binary map according to lane line marginal information.
S807 carries out perspective transform to lane line binary map, obtains birds-eye view.
S808, be based on the corresponding pixel distribution histogram of birds-eye view, determine initial sliding window and with initial sliding window The center of the first adjacent sliding window.
S809 determines initial sliding window and the first sliding according to preset home window size and size change over rule The size of window, using the first sliding window as current sliding window mouth.
S810 determines the non-zero pixels point in current sliding window mouth.
S811 obtains the horizontal coordinate mean value of non-zero pixels point.
S812, according to the center of current sliding window mouth and the history sliding window adjacent with current sliding window mouth it Difference, the horizontal coordinate mean value of non-zero pixels point, the determining center with newly-increased sliding window.
S813 determines the size of newly-increased sliding window according to the size of current sliding window mouth and size change over rule.
S814 judges whether to meet termination condition.If so, executing step S816;Otherwise, step S815 is executed.
S815, using newly-increased sliding window as current sliding window mouth.And return to step S810.
S816, using the non-zero pixels point in sliding window as effective pixel points.
S817 carries out curve fitting to effective pixel points, determines current lane line mould according to preset curve matching rule Type coefficient.
S818 detects current lane line according to the first row pixel coordinate of lane line binary map and the second row pixel coordinate The validity of model coefficient.When the failure of current lane line model coefficient, step S819 is executed;When current lane line model coefficient When effective, step S820 is executed.
S819 carries out Smoothing Prediction according to history lane line model coefficient, obtains Smoothing Prediction value, will be current Lane line model coefficient is updated to Smoothing Prediction value.
S820 carries out exponential smoothing to current lane line model coefficient according to history lane line model coefficient, obtains index Current lane line model coefficient update is exponential smoothing value by smooth value.
S821 obtains fitting lane line according to updated current lane line model coefficient.
S822 carries out inverse perspective mapping to fitting lane line, obtains final lane line.
Above-mentioned method for detecting lane lines is handled by multiple filter and effectively filters out tiny perpendicular such as road surface top shadow, gap Straight edge and other chaff interferent edges, obtaining includes accurate lane line edge and the lane line two-value for interfering less with edge Figure.And by lane line binary map carry out perspective transform after, then using sliding window search for by the way of determine effective pixel points so that , can be insufficient to avoid the sliding stride because of sliding window when bending amplitude in lane line curved areas is larger, lead to sliding window It the case where mouthful deviateing with normal lane line, and then making lane line fitting result generation error, can also be in local lane line When missing, sliding window is allowed to continue searching along lane line extending direction, enhances the robustness of lane detection.Using having Effect pixel carries out curve fitting, and corrects current lane line model coefficient based on history lane line model coefficient, keeps continuous The duration and stability of fitting lane line between frame image.
It should be understood that although each step in the flow chart of Fig. 2-8 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-8 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in Figure 10, a kind of lane detection device 1000 is provided, comprising: conversion process Module 1002, filtering processing module 1004, binary map determining module 1006 and process of fitting treatment module 1008, in which:
Conversion processing module 1002 obtains color space image, color for converting image to be processed to color space Space includes saturation degree channel and luminance channel.
Be filtered module 1004, for based on color space image saturation degree channel and luminance channel, carry out respectively Filtering processing, obtains the image segmentation information of color space image, and image segmentation information includes: to carry out gradient to saturation degree channel The first edge information that trend pass filtering obtains;Carry out horizontal direction filtering obtains the respectively to saturation degree channel and luminance channel Two marginal informations.
Binary map determining module 1006, for determining lane line binary map based on image segmentation information.
Process of fitting treatment module 1008 is obtained for being carried out curve fitting according to the effective pixel points in lane line binary map It is fitted lane line.
Above-mentioned lane detection device carries out ladder to saturation degree channel and luminance channel respectively by color space conversion The multiple filter for spending direction and horizontal direction effectively filters out the edge of shade, vehicle or other barriers, and obtaining includes accurate vehicle Diatom edge and the lane line binary map for interfering less with edge.Further, based on the effective pixel points in lane line binary map It carries out curve fitting, improves the accuracy rate of fitting lane line.
In one embodiment, binary map determining module 1006 is also used to carry out first edge information, second edge information Step-by-step and processing, determine lane line marginal information;According to lane line marginal information, lane line binary map is generated.
In another embodiment, image segmentation information further include: saturation degree channel and luminance channel are carried out respectively global The mask area information that adaptive threshold fuzziness obtains.Binary map determining module 1006 is also used to first edge information, second Marginal information and mask area information carry out step-by-step and processing, determine lane line marginal information;It is raw according to lane line marginal information At lane line binary map.
In one embodiment, lane detection device further includes effective pixel points determining module, for determining lane line two The effective pixel points being worth in figure.
Further, effective pixel points determining module includes: perspective transform module, sliding window determining module and effective picture Vegetarian refreshments determines submodule.Wherein, perspective transform module obtains birds-eye view for carrying out perspective transform to lane line binary map;It is sliding Dynamic window determining module, for determining multiple sliding windows of lane line in birds-eye view;Effective pixel points determine submodule, are used for Using the non-zero pixels point in sliding window as effective pixel points.
In one embodiment, sliding window determining module include: center determining module, window size determining module and Current window determining module.
Wherein, center determining module determines initial sliding for being based on the corresponding pixel distribution histogram of birds-eye view The center of window and first sliding window adjacent with initial sliding window;Window size determining module, for according to pre- If home window size and size change over rule, determine the size of initial sliding window and the first sliding window;Current window Determining module, for using the first sliding window as current sliding window mouth.
Further, center determining module, be also used to according to current sliding window mouth and with current sliding window mouth phase The center of adjacent history sliding window, current sliding window mouth non-zero pixels coordinate, determine the center of newly-increased sliding window Position;Window size determining module is also used to size and the size change over rule according to current sliding window mouth, determines newly-increased sliding The size of window;Current window determining module is also used to using newly-increased sliding window as current sliding window mouth.
In one embodiment, center determining module includes: non-zero pixels point determining module, coordinate mean value acquisition module Submodule is determined with center.Wherein, non-zero pixels point determining module, for determining the non-zero pixels in current sliding window mouth Point;Coordinate mean value obtains module, for obtaining the horizontal coordinate mean value of non-zero pixels point;Center determines submodule, is used for According to current sliding window mouth and and the adjacent history sliding window of current sliding window mouth the difference of center, non-zero pixels point Horizontal coordinate mean value, the determining center with newly-increased sliding window.
In one embodiment, process of fitting treatment module includes: current coefficient determining module, coefficient updating module and fitting submodule Block.Wherein, current coefficient determining module, for regular according to preset curve matching, to effective picture in lane line binary map Vegetarian refreshments carries out curve fitting, and determines current lane line model coefficient;Coefficient updating module, for according to current lane line model system Several and history lane line model coefficient is smoothed, and is the processing knot of smoothing processing by current lane line model coefficient update Fruit;It is fitted submodule, for obtaining fitting lane line according to updated current lane line model coefficient.
Further, coefficient updating module further includes validation checking module, exponential smoothing module and Smoothing Prediction Module.Wherein, validation checking module, for according to the first row pixel coordinate of lane line binary map and the second row pixel seat Mark detects the validity of current lane line model coefficient;Exponential smoothing module is used for when current lane line model coefficient is effective, Exponential smoothing is carried out to current lane line model coefficient according to history lane line model coefficient, obtains exponential smoothing value, it will be current Lane line model coefficient is updated to exponential smoothing value;Smoothing Prediction module, for failing when current lane line model coefficient When, Smoothing Prediction is carried out according to history lane line model coefficient, Smoothing Prediction value is obtained, by current lane line model Coefficient update is Smoothing Prediction value.
Above-mentioned lane detection device is handled by multiple filter and effectively filters out tiny perpendicular such as road surface top shadow, gap Straight edge and other chaff interferent edges, obtaining includes accurate lane line edge and the lane line two-value for interfering less with edge Figure.And by lane line binary map carry out perspective transform after, then using sliding window search for by the way of determine effective pixel points so that , can be insufficient to avoid the sliding stride because of sliding window when bending amplitude in lane line curved areas is larger, lead to sliding window It the case where mouthful deviateing with normal lane line, and then making lane line fitting result generation error, can also be in local lane line When missing, sliding window is allowed to continue searching along lane line extending direction, enhances the robustness of lane detection.Using having Effect pixel carries out curve fitting, and corrects current lane line model coefficient based on history lane line model coefficient, keeps continuous The duration and stability of fitting lane line between frame image.
Specific about lane detection device limits the restriction that may refer to above for method for detecting lane lines, This is repeated no more.Modules in above-mentioned lane detection device can come fully or partially through software, hardware and combinations thereof It realizes.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with software Form is stored in the memory in computer equipment, executes the corresponding operation of the above modules in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in figure 11.The computer equipment includes the processor connected by system bus, memory, network interface, shows Display screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment Memory includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer Program.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The meter The network interface for calculating machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor To realize a kind of method for detecting lane lines.The display screen of the computer equipment can be liquid crystal display or electric ink is shown Screen, the input unit of the computer equipment can be the touch layer covered on display screen, be also possible on computer equipment shell Key, trace ball or the Trackpad of setting can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Figure 11, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory The step of computer program, which realizes above-mentioned method for detecting lane lines when executing computer program.Lane line is examined herein The step of survey method, can be the step in the method for detecting lane lines of above-mentioned each embodiment.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated The step of machine program realizes above-mentioned method for detecting lane lines when being executed by processor.The step of method for detecting lane lines can be with herein It is the step in the method for detecting lane lines of above-mentioned each embodiment.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (12)

1. a kind of method for detecting lane lines, which is characterized in that the described method includes:
Image to be processed is converted to the color space including saturation degree channel and luminance channel, color space image is obtained;
It based on the saturation degree channel of the color space image and luminance channel, is filtered respectively, obtains color space The image segmentation information of image, described image segmentation information include: to carry out gradient direction filtering to the saturation degree channel to obtain First edge information;The second side that horizontal direction filtering obtains is carried out respectively to the saturation degree channel and the luminance channel Edge information;
Lane line binary map is determined based on described image segmentation information;
It is carried out curve fitting according to the effective pixel points in the lane line binary map, obtains fitting lane line.
2. the method according to claim 1, wherein described determine lane line two based on described image segmentation information Value figure, comprising:
Step-by-step and processing are carried out to the first edge information, the second edge information, determine lane line marginal information;
According to the lane line marginal information, lane line binary map is generated.
3. the method according to claim 1, wherein described image segmentation information further include: respectively to described full The mask area information that global adaptive threshold fuzziness obtains is carried out with degree channel and the luminance channel.
4. according to the method described in claim 3, it is characterized in that, described determine lane line two based on described image segmentation information Value figure, comprising:
Step-by-step and processing are carried out to the first edge information, the second edge information and the mask area information, determined Lane line marginal information;
According to the lane line marginal information, lane line binary map is generated.
5. the method according to claim 1, wherein described determine lane line two based on described image segmentation information It is worth after figure, further includes: determine the effective pixel points in the lane line binary map.
6. according to the method described in claim 5, it is characterized in that, valid pixel in the determination lane line binary map Point, comprising:
Perspective transform is carried out to the lane line binary map, obtains birds-eye view;
Determine multiple sliding windows of lane line in the birds-eye view;
Using the non-zero pixels point in the sliding window as effective pixel points.
7. according to the method described in claim 6, it is characterized in that, in the determination birds-eye view lane line multiple slidings Window, comprising:
Based on the corresponding pixel distribution histogram of the birds-eye view, determine initial sliding window and with the initial sliding window phase The center of the first adjacent sliding window;
According to preset home window size and size change over rule, the initial sliding window and first sliding window are determined The size of mouth, using first sliding window as current sliding window mouth;
According to the center of the current sliding window mouth and the history sliding window adjacent with the current sliding window mouth, institute The non-zero pixels coordinate of current sliding window mouth is stated, determines the center of newly-increased sliding window;
According to the size of the current sliding window mouth and size change over rule, the size of the newly-increased sliding window is determined;
Using the newly-increased sliding window as current sliding window mouth, and returns according to the current sliding window mouth and work as with described The center of the adjacent history sliding window of front slide window, the current sliding window mouth non-zero pixels coordinate, determine new The step of increasing the center of sliding window, until meeting termination condition.
8. the method according to the description of claim 7 is characterized in that described work as according to the current sliding window mouth and with described The center of the adjacent history sliding window of front slide window, the current sliding window mouth non-zero pixels coordinate, determine new Increase the center of sliding window, comprising:
Determine the non-zero pixels point in the current sliding window mouth;
Obtain the horizontal coordinate mean value of the non-zero pixels point;
According to the center of the current sliding window mouth and the history sliding window adjacent with the current sliding window mouth it The horizontal coordinate mean value of poor, the described non-zero pixels point, the determining center with newly-increased sliding window.
9. the method according to claim 1, wherein the valid pixel according in the lane line binary map Point carries out curve fitting, and obtains fitting lane line, comprising:
According to preset curve matching rule, carries out curve fitting, determine to the effective pixel points in the lane line binary map Current lane line model coefficient;
It is smoothed according to the current lane line model coefficient and history lane line model coefficient, by the current lane Line model coefficient update is the processing result of the smoothing processing;
According to the updated current lane line model coefficient, fitting lane line is obtained.
10. according to the method described in claim 9, it is characterized in that, described according to the current lane line model coefficient and going through History lane line model coefficient is smoothed, and is the processing of the smoothing processing by the current lane line model coefficient update As a result, comprising:
According to the first row pixel coordinate of the lane line binary map and the second row pixel coordinate, the current lane line mould is detected The validity of type coefficient;
When the current lane line model coefficient is effective, according to history lane line model coefficient to the current lane line model Coefficient carries out exponential smoothing, obtains exponential smoothing value, is the exponential smoothing value by the current lane line model coefficient update;
When current lane line model coefficient failure, Smoothing Prediction is carried out according to history lane line model coefficient, is obtained Smoothing Prediction value is obtained, is the Smoothing Prediction value by the current lane line model coefficient update.
11. according to the method described in claim 10, it is characterized in that, the first row picture according to the lane line binary map Plain coordinate and the second row pixel coordinate, detect the validity of the current lane line model coefficient, comprising:
According to the first row pixel coordinate of the lane line binary map and the second row pixel coordinate and the current lane line model Coefficient obtains radius of curvature, upper intercept and the lower intercept of current lane line model;
When the radius of curvature, the upper intercept and the lower intercept Arbitrary Term meet corresponding failure condition, described in determination The failure of current lane line model coefficient;
When corresponding failure condition is not satisfied in the radius of curvature, the upper intercept and the lower intercept, work as described in determination Preceding lane line model coefficient is effective.
12. a kind of lane detection device, which is characterized in that described device includes:
Conversion processing module obtains color space image, the color space for converting image to be processed to color space Including saturation degree channel and luminance channel;
Module is filtered, for being filtered respectively based on the saturation degree channel of the color space image and luminance channel Processing, obtains the image segmentation information of color space image, and described image segmentation information includes: to carry out to the saturation degree channel The first edge information that gradient direction filtering obtains;Horizontal direction is carried out respectively to the saturation degree channel and the luminance channel Filter the second edge information obtained;
Binary map determining module, for determining lane line binary map based on described image segmentation information;
Process of fitting treatment module is fitted for being carried out curve fitting according to the effective pixel points in the lane line binary map Lane line.
CN201811228745.8A 2018-10-22 2018-10-22 Lane line detection method and device Active CN109359602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811228745.8A CN109359602B (en) 2018-10-22 2018-10-22 Lane line detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811228745.8A CN109359602B (en) 2018-10-22 2018-10-22 Lane line detection method and device

Publications (2)

Publication Number Publication Date
CN109359602A true CN109359602A (en) 2019-02-19
CN109359602B CN109359602B (en) 2021-02-26

Family

ID=65346180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811228745.8A Active CN109359602B (en) 2018-10-22 2018-10-22 Lane line detection method and device

Country Status (1)

Country Link
CN (1) CN109359602B (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902637A (en) * 2019-03-05 2019-06-18 长沙智能驾驶研究院有限公司 Method for detecting lane lines, device, computer equipment and storage medium
CN110135252A (en) * 2019-04-11 2019-08-16 长安大学 A kind of adaptive accurate lane detection and deviation method for early warning for unmanned vehicle
CN110163930A (en) * 2019-05-27 2019-08-23 北京百度网讯科技有限公司 Lane line generation method, device, equipment, system and readable storage medium storing program for executing
CN110414385A (en) * 2019-07-12 2019-11-05 淮阴工学院 A kind of method for detecting lane lines and system based on homography conversion and characteristic window
CN110472527A (en) * 2019-07-29 2019-11-19 江苏必得科技股份有限公司 A kind of track line detecting method and system
CN110473244A (en) * 2019-08-08 2019-11-19 长沙智能驾驶研究院有限公司 Stereo matching optimization method, device, computer equipment and storage medium
CN111444778A (en) * 2020-03-04 2020-07-24 武汉理工大学 Lane line detection method
CN111797766A (en) * 2020-07-06 2020-10-20 三一专用汽车有限责任公司 Identification method, identification device, computer-readable storage medium, and vehicle
CN112270690A (en) * 2020-10-12 2021-01-26 淮阴工学院 Self-adaptive night lane line detection method based on improved CLAHE and sliding window search
CN112562324A (en) * 2020-11-27 2021-03-26 惠州华阳通用电子有限公司 Automatic driving vehicle crossing passing method and device
WO2021056341A1 (en) * 2019-09-26 2021-04-01 深圳市大疆创新科技有限公司 Lane line fusion method, lane line fusion apparatus, vehicle, and storage medium
CN112949530A (en) * 2021-03-12 2021-06-11 新疆爱华盈通信息技术有限公司 Inspection method and system for parking lot inspection vehicle and inspection vehicle
CN113255506A (en) * 2021-05-20 2021-08-13 浙江合众新能源汽车有限公司 Dynamic lane line control method, system, device, and computer-readable medium
CN113343742A (en) * 2020-12-31 2021-09-03 浙江合众新能源汽车有限公司 Lane line detection method and lane line detection system
CN113449647A (en) * 2021-06-30 2021-09-28 北京纵目安驰智能科技有限公司 Method, system, device and computer-readable storage medium for fitting curved lane line
US11328520B2 (en) 2020-07-20 2022-05-10 Beijing Baidu Netcom Science and Technology Co., Ltd Lane line determination method and apparatus, lane line positioning accuracy evaluation method and apparatus, and device
CN114821530A (en) * 2022-04-22 2022-07-29 北京裕峻汽车技术研究院有限公司 Deep learning-based lane line detection method and system
WO2023124221A1 (en) * 2021-12-31 2023-07-06 中国第一汽车股份有限公司 Area edge detection method and apparatus for vehicle drivable area, and storage medium
TWI823721B (en) * 2022-12-20 2023-11-21 鴻海精密工業股份有限公司 Method for identifying lane line and related devices

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150170514A1 (en) * 2013-12-13 2015-06-18 Here Global B.V. Systems and Methods for Detecting Road Congestion and Incidents in Real Time
CN107045629A (en) * 2017-04-19 2017-08-15 南京理工大学 A kind of Multi-lane Lines Detection method
CN107862290A (en) * 2017-11-10 2018-03-30 智车优行科技(北京)有限公司 Method for detecting lane lines and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150170514A1 (en) * 2013-12-13 2015-06-18 Here Global B.V. Systems and Methods for Detecting Road Congestion and Incidents in Real Time
CN107045629A (en) * 2017-04-19 2017-08-15 南京理工大学 A kind of Multi-lane Lines Detection method
CN107862290A (en) * 2017-11-10 2018-03-30 智车优行科技(北京)有限公司 Method for detecting lane lines and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RICARDO ZUCCOLO: "Self-driving Cars — Advanced computer vision with OpenCV,finding lane lines", 《HTTPS://CHATBOTSLIFE.COM/SELF-DRIVING-CARS-ADVANCED-COMPUTER-VISION-WITH-OPENCV-FINDING-LANE-LINES-488A411B2C3D》 *
张雷 等: "基于信息融合的车道检测算法", 《郑州大学学报(工学版)》 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902637B (en) * 2019-03-05 2021-03-19 长沙智能驾驶研究院有限公司 Lane line detection method, lane line detection device, computer device, and storage medium
CN109902637A (en) * 2019-03-05 2019-06-18 长沙智能驾驶研究院有限公司 Method for detecting lane lines, device, computer equipment and storage medium
CN110135252A (en) * 2019-04-11 2019-08-16 长安大学 A kind of adaptive accurate lane detection and deviation method for early warning for unmanned vehicle
CN110163930A (en) * 2019-05-27 2019-08-23 北京百度网讯科技有限公司 Lane line generation method, device, equipment, system and readable storage medium storing program for executing
CN110414385A (en) * 2019-07-12 2019-11-05 淮阴工学院 A kind of method for detecting lane lines and system based on homography conversion and characteristic window
CN110414385B (en) * 2019-07-12 2021-06-25 淮阴工学院 Lane line detection method and system based on homography transformation and characteristic window
CN110472527A (en) * 2019-07-29 2019-11-19 江苏必得科技股份有限公司 A kind of track line detecting method and system
CN110473244A (en) * 2019-08-08 2019-11-19 长沙智能驾驶研究院有限公司 Stereo matching optimization method, device, computer equipment and storage medium
CN110473244B (en) * 2019-08-08 2022-03-18 长沙智能驾驶研究院有限公司 Stereo matching optimization method and device, computer equipment and storage medium
WO2021056341A1 (en) * 2019-09-26 2021-04-01 深圳市大疆创新科技有限公司 Lane line fusion method, lane line fusion apparatus, vehicle, and storage medium
CN111444778A (en) * 2020-03-04 2020-07-24 武汉理工大学 Lane line detection method
CN111444778B (en) * 2020-03-04 2023-10-17 武汉理工大学 Lane line detection method
CN111797766A (en) * 2020-07-06 2020-10-20 三一专用汽车有限责任公司 Identification method, identification device, computer-readable storage medium, and vehicle
US11328520B2 (en) 2020-07-20 2022-05-10 Beijing Baidu Netcom Science and Technology Co., Ltd Lane line determination method and apparatus, lane line positioning accuracy evaluation method and apparatus, and device
CN112270690B (en) * 2020-10-12 2022-04-26 淮阴工学院 Self-adaptive night lane line detection method based on improved CLAHE and sliding window search
CN112270690A (en) * 2020-10-12 2021-01-26 淮阴工学院 Self-adaptive night lane line detection method based on improved CLAHE and sliding window search
CN112562324A (en) * 2020-11-27 2021-03-26 惠州华阳通用电子有限公司 Automatic driving vehicle crossing passing method and device
CN113343742A (en) * 2020-12-31 2021-09-03 浙江合众新能源汽车有限公司 Lane line detection method and lane line detection system
CN112949530A (en) * 2021-03-12 2021-06-11 新疆爱华盈通信息技术有限公司 Inspection method and system for parking lot inspection vehicle and inspection vehicle
CN113255506A (en) * 2021-05-20 2021-08-13 浙江合众新能源汽车有限公司 Dynamic lane line control method, system, device, and computer-readable medium
CN113255506B (en) * 2021-05-20 2022-10-18 浙江合众新能源汽车有限公司 Dynamic lane line control method, system, device, and computer-readable medium
CN113449647A (en) * 2021-06-30 2021-09-28 北京纵目安驰智能科技有限公司 Method, system, device and computer-readable storage medium for fitting curved lane line
WO2023124221A1 (en) * 2021-12-31 2023-07-06 中国第一汽车股份有限公司 Area edge detection method and apparatus for vehicle drivable area, and storage medium
CN114821530A (en) * 2022-04-22 2022-07-29 北京裕峻汽车技术研究院有限公司 Deep learning-based lane line detection method and system
TWI823721B (en) * 2022-12-20 2023-11-21 鴻海精密工業股份有限公司 Method for identifying lane line and related devices

Also Published As

Publication number Publication date
CN109359602B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN109359602A (en) Method for detecting lane lines and device
US9483835B2 (en) Depth value restoration method and system
US8331652B2 (en) Simultaneous localization and map building method and medium for moving robot
CN109741356B (en) Sub-pixel edge detection method and system
CN110493488B (en) Video image stabilization method, video image stabilization device and computer readable storage medium
CN107578430B (en) Stereo matching method based on self-adaptive weight and local entropy
JP5107409B2 (en) Motion detection method and filtering method using nonlinear smoothing of motion region
US20130188827A1 (en) Human tracking method and apparatus using color histogram
CN107633237B (en) Image background segmentation method, device, equipment and medium
WO2021175180A1 (en) Line of sight determination method and apparatus, and electronic device and computer-readable storage medium
US11747278B2 (en) Deposit detection device for detecting a partial covering location, a not-adhere location, and a diffuse reflection location
US9373053B2 (en) Image processor with edge selection functionality
WO2015014111A1 (en) Optical flow tracking method and apparatus
CN106373128B (en) Method and system for accurately positioning lips
Lo et al. Joint trilateral filtering for depth map super-resolution
GB2536430B (en) Image noise reduction
WO2018082388A1 (en) Skin color detection method and device, and terminal
US20220270204A1 (en) Image registration method, terminal, and computer storage medium
US20220351413A1 (en) Target detection method, computer device and non-transitory readable storage medium
CN109410235B (en) Target tracking method fusing edge features
CN111915541B (en) Image enhancement processing method, device, equipment and medium based on artificial intelligence
CN111105452A (en) High-low resolution fusion stereo matching method based on binocular vision
JP2001126065A (en) Distance distribution detector
KR20150053438A (en) Stereo matching system and method for generating disparity map using the same
CN112132769A (en) Image fusion method and device and computer equipment

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Lane line detection method and device

Effective date of registration: 20220303

Granted publication date: 20210226

Pledgee: China Minsheng Bank Co.,Ltd. Xiangtan sub branch

Pledgor: CHANGSHA INTELLIGENT DRIVING RESEARCH INSTITUTE Co.,Ltd.

Registration number: Y2022430000015

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230601

Granted publication date: 20210226

Pledgee: China Minsheng Bank Co.,Ltd. Xiangtan sub branch

Pledgor: CHANGSHA INTELLIGENT DRIVING RESEARCH INSTITUTE Co.,Ltd.

Registration number: Y2022430000015