CN109948504A - A kind of Lane detection method and device - Google Patents

A kind of Lane detection method and device Download PDF

Info

Publication number
CN109948504A
CN109948504A CN201910189488.XA CN201910189488A CN109948504A CN 109948504 A CN109948504 A CN 109948504A CN 201910189488 A CN201910189488 A CN 201910189488A CN 109948504 A CN109948504 A CN 109948504A
Authority
CN
China
Prior art keywords
identified
point
target image
region
mean value
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
CN201910189488.XA
Other languages
Chinese (zh)
Other versions
CN109948504B (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.)
Neusoft Rui Auto Technology (shenyang) Co Ltd
Neusoft Reach Automotive Technology Shenyang Co Ltd
Original Assignee
Neusoft Rui Auto Technology (shenyang) 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 Neusoft Rui Auto Technology (shenyang) Co Ltd filed Critical Neusoft Rui Auto Technology (shenyang) Co Ltd
Priority to CN201910189488.XA priority Critical patent/CN109948504B/en
Publication of CN109948504A publication Critical patent/CN109948504A/en
Application granted granted Critical
Publication of CN109948504B publication Critical patent/CN109948504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

This application discloses a kind of Lane detection method and devices, this method comprises: after getting target image to be identified, it can be by being pre-processed to target image, determine the region to be identified for including in target image, then, calculate the area of the boundary rectangle in region to be identified, and the area in region to be identified, then, if judging, the area in region to be identified occupies the ratio of its boundary rectangle area greater than preset ratio threshold value, then determine that the region to be identified is lane line candidate region, and then it can be according to lane line candidate region, determine the lane line in target image.It can be seen that, the application is whether to be greater than preset ratio threshold value by judging that the area in region to be identified occupies the ratio of its boundary rectangle area, to determine whether it is lane line candidate region, it is rejected so as to will not belong to candidate region corresponding to lane line, accurately to determine lane line using the candidate region after screening, and then improve the accuracy of Lane detection.

Description

A kind of Lane detection method and device
Technical field
This application involves field of intelligent transportation technology more particularly to a kind of Lane detection method and devices.
Background technique
As intellectualizing system is applied in vehicle drive field, being configured on more and more vehicles be can be realized certainly The dynamic intelligence system for driving function or auxiliary driving function.In order to realize Function for Automatic Pilot or assist driving function, on vehicle Intelligence system usually require to identify lane line from the road image of vehicle periphery, to determine the Travel vehicle near vehicle Road, thus the driving of guiding vehicle.
But existing Lane detection method is usually to utilize symmetrical local threshold (Symmetrical Local at present Threshold, abbreviation SLT) algorithm, determined that the candidate point of composition lane line was (white from the carriageway image that shooting obtains before this Color/yellow pixel), it is then fitted to obtain lane line candidate line based on these lane line candidate points again, and then be based on these vehicles Diatom candidate line determines lane line candidate region, finally, determining lane line by lane line candidate region again, but in this knowledge , may be by the even influence of uneven illumination when determining lane line candidate point using SLT algorithm in other method, determination makes mistake Candidate point, it is thereby possible to cause to determine the candidate line that makes mistake, and then may cause the candidate region for determining and making mistake, shadow The accuracy rate of last identification lane line is rung, and candidate line is being formed by candidate point, then be made of the mistake of candidate region candidate line Cheng Zhong, it is also possible to it will appear calculating mistake, therefore, and in order to improve the recognition accuracy of lane line, before identifying lane line, It needs to screen all candidate regions, rejecting is wherein not belonging to candidate region corresponding to lane line, but at present not One kind can accurately screen candidate region and know method for distinguishing, therefore, how to realize and carry out to lane line candidate region Accurate screening and identification, accurately to determine lane line using the candidate region after screening, it has also become urgent problem to be solved.
Summary of the invention
The main purpose of the embodiment of the present application is to provide a kind of Lane detection method and device, can be improved lane line The accuracy of recognition result.
The embodiment of the present application provides a kind of Lane detection method, comprising:
Target image to be identified is obtained, the target image is the carriageway image comprising target lane line;
By pre-processing to the target image, the region to be identified for including in the target image is determined;
Calculate the area of the boundary rectangle in the region to be identified and the area in the region to be identified;
If judge the area in the region to be identified occupy the area of the region boundary rectangle to be identified ratio it is big In preset ratio threshold value, it is determined that the region to be identified is lane line candidate region;
According to the lane line candidate region, the lane line in the target image is determined.
Optionally, described by being pre-processed to target image conversion, it determines in the target image and includes Region to be identified, comprising:
By pre-processing to the target image, the lane line candidate point for including in the target image is determined;
According to the lane line candidate point, the lane line candidate line for including in the target image is determined;
If judging, the continuous strip number of the lane line candidate line is more than default continuous strip number, by the continuous strip number The region of lane line candidate line composition is as region to be identified.
Optionally, described by being pre-processed to target image conversion, it determines in the target image and includes Lane line candidate point, comprising:
The target image is converted into gray level image, obtains the corresponding gray scale of each point to be identified in the target image Value;
The first mean value and the second mean value are obtained, first mean value is the picture in the left side predetermined number of the point to be identified The mean value of the corresponding gray value of vegetarian refreshments, second mean value are that the pixel in the right side predetermined number of the point to be identified is corresponding Gray value mean value;
If the difference of the gray value and first mean value of judging the point to be identified is greater than the first preset threshold, and institute The difference of the gray value and second mean value of stating point to be identified is greater than first preset threshold, it is determined that the point to be identified For lane line candidate point.
Optionally, described by being pre-processed to target image conversion, it determines in the target image and includes Lane line candidate point, comprising:
The target image is converted into gray level image, obtains the corresponding gray scale of each point to be identified in the target image Value;
The first mean value and the second mean value are obtained, first mean value is the picture in the left side predetermined number of the point to be identified The mean value of the corresponding gray value of vegetarian refreshments, second mean value are that the pixel in the right side predetermined number of the point to be identified is corresponding Gray value mean value;
If the ratio of the gray value and first mean value of judging the point to be identified is greater than the second preset threshold, and institute The ratio of the gray value and second mean value of stating point to be identified is greater than second preset threshold, it is determined that the point to be identified For lane line candidate point.
Optionally, second preset threshold is 1-1.3.
The embodiment of the present application also provides a kind of Lane detection devices, comprising:
Target image acquiring unit, for obtaining target image to be identified, the target image is to include target lane The carriageway image of line;
Area determination unit to be identified, for determining the target image by pre-processing to the target image In include region to be identified;
Areal calculation unit, for calculate the boundary rectangle in the region to be identified area and the area to be identified The area in domain;
Candidate region determination unit, if for judging that the area in the region to be identified occupies outside the region to be identified The ratio for connecing the area of rectangle is greater than preset ratio threshold value, it is determined that the region to be identified is lane line candidate region;
Lane line determination unit, for determining the lane line in the target image according to the lane line candidate region.
Optionally, the area determination unit to be identified includes:
Candidate point determines subelement, for determining in the target image by pre-processing to the target image The lane line candidate point for including;
Candidate line determines subelement, for determining the vehicle for including in the target image according to the lane line candidate point Diatom candidate line;
Region to be identified determines subelement, if the continuous strip number for judging the lane line candidate line is more than default connects Continuous item number, then the region formed the lane line candidate line of the continuous strip number is as region to be identified.
Optionally, the candidate point determines that subelement includes:
Gray value obtains subelement and obtains in the target image for the target image to be converted to gray level image The corresponding gray value of each point to be identified;
Mean value obtains subelement, and for obtaining the first mean value and the second mean value, first mean value is the point to be identified Left side predetermined number in the corresponding gray value of pixel mean value, second mean value be the point to be identified right side it is pre- If the mean value of the corresponding gray value of pixel in number;
First candidate point determines subelement, if for judge the point to be identified gray value and first mean value Difference is greater than the first preset threshold, and the difference of the gray value of the point to be identified and second mean value is greater than described first in advance If threshold value, it is determined that the point to be identified is lane line candidate point.
Optionally, the candidate point determines that subelement includes:
Gray value obtains subelement and obtains in the target image for the target image to be converted to gray level image The corresponding gray value of each point to be identified;
Mean value obtains subelement, and for obtaining the first mean value and the second mean value, first mean value is the point to be identified Left side predetermined number in the corresponding gray value of pixel mean value, second mean value be the point to be identified right side it is pre- If the mean value of the corresponding gray value of pixel in number;
Second candidate point determines subelement, if for judge the point to be identified gray value and first mean value Ratio is greater than the second preset threshold, and the gray value of the point to be identified and the ratio of second mean value are greater than described second in advance If threshold value, it is determined that the point to be identified is lane line candidate point.
Optionally, second preset threshold is 1-1.3.
A kind of Lane detection method and device provided by the embodiments of the present application, is getting target image to be identified Afterwards, the region to be identified for including in target image can be determined, wherein target image by pre-processing to target image It refers to the carriageway image comprising target lane line, then, calculates the area of the boundary rectangle in region to be identified, and wait know The area in other region, then, if judging, the area in region to be identified occupies the ratio of its boundary rectangle area greater than default ratio Example threshold value, it is determined that the region to be identified is lane line candidate region, and then can determine target according to lane line candidate region Lane line in image.As it can be seen that the embodiment of the present application is by judging that the area in region to be identified occupies its boundary rectangle area Ratio whether be greater than preset ratio threshold value, to determine whether it is lane line candidate region, so as to will not belong to lane Candidate region corresponding to line is rejected, and accurately to determine lane line using the candidate region after screening, and then improves vehicle The accuracy of diatom identification.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the application Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow diagram of Lane detection method provided by the embodiments of the present application;
Fig. 2 be it is provided by the embodiments of the present application by target image pre-process include in determining target image to The flow diagram of identification region;
Fig. 3 is the schematic diagram of point to be identified provided by the embodiments of the present application and two sides pixel;
Fig. 4 is the schematic diagram of the carriageway image provided by the embodiments of the present application comprising lane line;
Fig. 5 is a kind of composition schematic diagram of Lane detection device provided by the embodiments of the present application.
Specific embodiment
In some Lane detection methods, it is normally based on SLT algorithm, from the carriageway image that shooting obtains really before this The candidate point (white/yellow pixel) of composition lane line is made, but is determining lane line candidate point using SLT algorithm In the process, judge the corresponding threshold value of front and back window pixel value difference be it is fixed, it is this logical when different time sections light intensity difference It crosses and judges whether front and back window pixel value difference meets fixed threshold to determine the mode of lane line candidate point, the accuracy of recognition result It can be deteriorated.And candidate line is being formed by candidate point, then during forming candidate region by candidate line, it is also possible to will appear meter Mistake is calculated therefore in order to improve the recognition accuracy of lane line, before identifying lane line, to need to all candidate regions Screened, rejecting be wherein not belonging to candidate region corresponding to lane line, but there is no one kind at present can be to candidate region Method for distinguishing is accurately screened and known, therefore, how to realize and lane line candidate region is accurately screened and identified, so as to Lane line is accurately determined using the candidate region after screening, it has also become urgent problem to be solved.
To solve drawbacks described above, the embodiment of the present application provides a kind of Lane detection method, to be identified getting After target image, it can be pre-processed by being converted to target image, determine the region to be identified for including in target image, In, target image refers to the carriageway image comprising target lane line, then, calculates the face of the boundary rectangle in region to be identified The area in region long-pending and to be identified, then, if judging, the area in region to be identified occupies the ratio of its boundary rectangle area Greater than preset ratio threshold value, it is determined that the region to be identified is lane line candidate region, and then can be according to lane line candidate regions Domain determines the lane line in target image.As it can be seen that the embodiment of the present application is by judging that the area in region to be identified occupies outside it Whether the ratio for connecing rectangular area is greater than the mode of preset ratio threshold value, to determine whether it is lane line candidate region, thus It can will not belong to the rejecting of candidate region corresponding to lane line, accurately to determine lane using the candidate region after screening Line, and then improve the accuracy of Lane detection.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
First embodiment
It is a kind of flow diagram of Lane detection method provided in this embodiment, this method includes following referring to Fig. 1 Step:
S101: target image to be identified is obtained, wherein target image is the carriageway image comprising target lane line.
In the present embodiment, it will realize that any carriageway image comprising lane line of Lane detection is determined using the present embodiment Justice is target image, and the lane line in the target image is defined as target lane line.Furthermore, it is desirable to explanation, this reality Apply the acquisition modes that example does not limit target image, for example, target image can shoot by being mounted on the camera of roof to obtain or It is obtained by the personnel being sitting in vehicle using other photographing devices (such as smart phone) shooting.
It should be noted that the present embodiment does not limit the type of target image, for example, target image can be by red (G), Green (G), the color image of blue (B) three primary colors composition or gray level image etc..
S102: by pre-processing to target image, the region to be identified for including in target image is determined.
It in the present embodiment, may further be using existing if after getting target image to be identified by step S101 Have or the following image processing method occurred pre-processes target image, it is to be identified with determine to include in target image Region, referring to fig. 2, the specific implementation process of this step S102 may include following step S1021-S1023:
S1021: by pre-processing to target image, the lane line candidate point for including in target image is determined.
It in the present embodiment, may further be using existing if after getting target image to be identified by step S101 Have or the following image processing method occurred pre-processes target image, to determine the lane line for including in target image Candidate point, it should be noted that one kind is optionally achieved in that, under the specific implementation process of this step S1021 may include State step A1-A3:
Step A1: being converted to gray level image for target image, obtains the corresponding gray scale of each point to be identified in target image Value.
In this implementation, if getting target image to be identified inherently gray level image by step S101, And then the corresponding gray value of each point to be identified in target image can be directly calculated, it is defined as PO, wherein what point to be identified referred to It is each pixel in target image, to execute subsequent step, realizes Lane detection.
If getting target image to be identified by step S101 is not gray level image, for example is by red, green, blue The color image of three primary colors composition, that is, the color of each pixel in target image corresponds to RGB (R, G, a B) value, this When, target image can be converted into gray level image, to obtain the corresponding gray value of each point to be identified in target image.
Wherein, when colored target image is converted to gray level image, it can use floating-point arithmetic (following formula (1)), integer method (following formula (2)), displacement method (following formula (3)), mean value method (following formula (4)), only take it is green Any one method in color (following formula (5)) carries out gradation conversion to colored target image, and specific conversion regime can It is selected according to the actual situation, the embodiment of the present application is not limited this.
Gray=R*0.3+G*0.59+B*0.11 (1)
Gray=(R*30+G*59+B*11)/100 (2)
Gray=(R*76+G*151+B*28) > > 8 (3)
Gray=(R+G+B)/3 (4)
Gray=G (5)
Wherein, Gray indicates the corresponding gray value of each pixel in the gray level image after conversion;R is indicated in target image Corresponding red (red) value of each pixel;G indicates corresponding green (green) value of each pixel in target image; B indicates corresponding blue (blue) value of each pixel in target image.
Step A2: the first mean value and the second mean value are obtained.
It in the present embodiment, can be with after getting the corresponding gray value of each point to be identified of target image by step A1 Each pixel is identified according to step A2-A3.It should be noted that the present embodiment will be with target in subsequent content Introduced subject to some point to be identified in image and how to identify whether the point to be identified is lane line candidate point, and it is other to The identification method of identification point is similar therewith, no longer repeats one by one.
In this step A2, need to calculate the corresponding gray value of pixel on the left of point to be identified in predetermined number first Mean value be defined as the first mean valueSimilarly, it is also necessary to calculate the picture on the right side of point to be identified in predetermined number The mean value of the corresponding gray value of vegetarian refreshments is defined as the second mean valueIt is a kind of optional in order to improve recognition accuracy Be achieved in that, the value range of predetermined number can be taken as 8-15, further, predetermined number can be taken as 10, As shown in figure 3, black box represents point to be identified in figure, the white box at left and right sides of the point to be identified respectively represents 10 pictures Vegetarian refreshments..
Step A3: if judge point to be identified gray value and the first mean value difference be greater than the first preset threshold, and to The difference of the gray value of identification point and the second mean value is greater than the first preset threshold, it is determined that point to be identified is lane line candidate point.
In this implementation, the corresponding gray value P of point to be identified is calculated by step A1O, and pass through step A2 Get the first mean valueWith the second mean valueAfterwards, it can be determined that go out the gray value of point to be identified and the difference of the first mean value ValueWhether the first preset threshold is greater than, at the same time it can also judge the gray value of point to be identified With the difference of the second mean valueWhether the first preset threshold is greater than, if Pdiff1Value be greater than first Preset threshold and Pdiff2Value also greater than the first preset threshold, then can determine point to be identified be lane line candidate point, need Bright, the first preset threshold can be determined based on practical experience, and the embodiment of the present application is not limited this.
In addition, another be optionally achieved in that, the specific implementation process of above-mentioned steps S1021 can also include following Step B1-B3:
Step B1: being converted to gray level image for target image, obtains the corresponding gray scale of each point to be identified in target image Value.
Step B2: the first mean value and the second mean value are obtained.
It should be noted that the implementation procedure of step B1 and B2 are consistent with step A1-A2, particular content be can be found in The introduction of step A1-A2 is stated, details are not described herein.
Step B3: if judge point to be identified gray value and the first mean value ratio be greater than the second preset threshold, and to The gray value of identification point and the ratio of the second mean value are also greater than the second preset threshold, it is determined that point to be identified is lane line candidate point
In this implementation, the corresponding gray value P of point to be identified is calculated by step B1O, and pass through step B2 Get the first mean valueWith the second mean valueAfterwards, it can be determined that go out the gray value of point to be identified and the ratio of the first mean value ValueWhether the second preset threshold is greater than, at the same time it can also judge the gray value of point to be identified and the ratio of the second mean value ValueWhether the second preset threshold is greater than, ifValue be greater than the second preset threshold andValue also greater than Second preset threshold can then determine that point to be identified is lane line candidate point.
It should be noted that one kind is optionally achieved in that in order to improve recognition accuracy, it can be by the second default threshold The range of value is taken as 1-1.3, further, the second preset range can be taken as 1.15.But it should be recognized that second is default Threshold value can also be determined based on practical experience, and the embodiment of the present application is not limited this.
S1022: according to lane line candidate point, the lane line candidate line for including in target image is determined.
In the present embodiment, determine point to be identified for after lane line candidate point, further basis is all by step S1021 It is determined lane line candidate point through the above way, the continuous number of lane line candidate point may further be judged whether pre- If continuous number in the range of, if so, showing that these continuous lane line candidate points may be constructed a lane line candidate Line, to execute subsequent step S1023.
S1023: if judging, the continuous strip number of lane line candidate line is more than default continuous strip number, by the continuous strip number The region of lane line candidate line composition is as region to be identified.
It in the present embodiment, may further after determining the lane line candidate line in target image by step S1022 The continuous strip number for judging lane line candidate line is more than default continuous strip number, if so, showing that these continuous lane lines are candidate Line may be constructed a region as region to be identified.
S103: the area of the boundary rectangle in region to be identified and the area in region to be identified are calculated.
In the present embodiment, if after determining the region to be identified for including in target image by step S102, for standard Candidate region therein is really filtered out, the external square of solution image-region minimum area of existing or future appearance can be used first The method of shape finds out the boundary rectangle in region to be identified, for example, can use open source computer vision library (Open Source Computer Vision Library, abbreviation opencv) the minimum area boundary rectangle of determining image-region, then adopt again With the algorithm of the solution rectangular area of existing or future appearance, the face of the minimum area boundary rectangle in the region to be identified is calculated The area in region long-pending and to be identified.
S104: if judging, the area in region to be identified occupies the ratio of the area of region boundary rectangle to be identified greater than pre- If proportion threshold value, it is determined that region to be identified is lane line candidate region.
In the present embodiment, if calculating the area of the boundary rectangle in region to be identified by step S103, and wait know After the area in other region, it may further judge that the area in region to be identified occupies the area of region boundary rectangle to be identified Whether ratio is greater than preset ratio threshold value, if so, can determine that region to be identified is lane line candidate region, this is because one As in the case of the tilt angle of lane line that gets it is usually smaller (such as in the carriageway image comprising lane line taken In, " trapezoidal " can be generally presented in lane line, as shown in Figure 4), it is seen then that under normal circumstances, the area of lane line occupies its external square The ratio regular meeting of the area of shape is bigger, and the area that the area of corresponding candidate region occupies boundary rectangle is also larger, if judge to The ratio that identification region area occupies its boundary rectangle area is very small, then shows the inclined degree in this region to be identified very Greatly, i.e., the region to be identified is not the corresponding candidate region of lane line;Conversely, if judging, region area to be identified occupies it The large percentage of boundary rectangle area then shows that the inclined degree in this region to be identified is smaller, it can determine that this is to be identified Region is the corresponding candidate region of lane line.
S105: according to lane line candidate region, the lane line in target image is determined.
It, can after determining all lane line candidate regions in target image by step S104 in this implementation These subsequent sections are further constituted lane line by cluster, and then it can determine the lane for including in target image Line.
To sum up, a kind of Lane detection method provided in this embodiment can be with after getting target image to be identified By pre-processing to target image, the region to be identified for including in target image is determined, wherein target image refers to wrapping The carriageway image of the lane line containing target, then, calculate the boundary rectangle in region to be identified area and region to be identified Area, then, if judge the area in region to be identified occupy its boundary rectangle area ratio be greater than preset ratio threshold value, It determines that the region to be identified is lane line candidate region, and then can be determined in target image according to lane line candidate region Lane line.As it can be seen that the embodiment of the present application is to be by judging that the area in region to be identified occupies the ratio of its boundary rectangle area It is no to be greater than preset ratio threshold value, to determine whether it is lane line candidate region, so as to will not belong to corresponding to lane line Candidate region reject, accurately to determine lane line using the candidate region after screening, and then improve Lane detection Accuracy.
Second embodiment
A kind of Lane detection device will be introduced in the present embodiment, and related content refers to above method embodiment.
It is a kind of composition schematic diagram of Lane detection device provided in this embodiment referring to Fig. 5, which includes:
Target image acquiring unit 501, for obtaining target image to be identified, the target image is to include target carriage The carriageway image of diatom;
Area determination unit 502 to be identified, for determining the target figure by pre-processing to the target image The region to be identified for including as in;
Areal calculation unit 503, for calculating the area of the boundary rectangle in the region to be identified and described to be identified The area in region;
Candidate region determination unit 504, if for judging that the area in the region to be identified occupies the area to be identified The ratio of the area of domain boundary rectangle is greater than preset ratio threshold value, it is determined that the region to be identified is lane line candidate region;
Lane line determination unit 505, for determining the lane in the target image according to the lane line candidate region Line.
In a kind of implementation of the present embodiment, the area determination unit 502 to be identified includes:
Candidate point determines subelement, for determining in the target image by pre-processing to the target image The lane line candidate point for including;
Candidate line determines subelement, for determining the vehicle for including in the target image according to the lane line candidate point Diatom candidate line;
Region to be identified determines subelement, if the continuous strip number for judging the lane line candidate line is more than default connects Continuous item number, then the region formed the lane line candidate line of the continuous strip number is as region to be identified.
In a kind of implementation of the present embodiment, the candidate point determines that subelement includes:
Gray value obtains subelement and obtains in the target image for the target image to be converted to gray level image The corresponding gray value of each point to be identified;
Mean value obtains subelement, and for obtaining the first mean value and the second mean value, first mean value is the point to be identified Left side predetermined number in the corresponding gray value of pixel mean value, second mean value be the point to be identified right side it is pre- If the mean value of the corresponding gray value of pixel in number;
First candidate point determines subelement, if for judge the point to be identified gray value and first mean value Difference is greater than the first preset threshold, and the difference of the gray value of the point to be identified and second mean value is greater than described first in advance If threshold value, it is determined that the point to be identified is lane line candidate point.
In a kind of implementation of the present embodiment, the candidate point determines that subelement includes:
Gray value obtains subelement and obtains in the target image for the target image to be converted to gray level image The corresponding gray value of each point to be identified;
Mean value obtains subelement, and for obtaining the first mean value and the second mean value, first mean value is the point to be identified Left side predetermined number in the corresponding gray value of pixel mean value, second mean value be the point to be identified right side it is pre- If the mean value of the corresponding gray value of pixel in number;
Second candidate point determines subelement, if for judge the point to be identified gray value and first mean value Ratio is greater than the second preset threshold, and the gray value of the point to be identified and the ratio of second mean value are greater than described second in advance If threshold value, it is determined that the point to be identified is lane line candidate point.
In a kind of implementation of the present embodiment, second preset threshold is 1-1.3.
To sum up, a kind of Lane detection device provided in this embodiment can be with after getting target image to be identified By pre-processing to target image, the region to be identified for including in target image is determined, wherein target image refers to wrapping The carriageway image of the lane line containing target, then, calculate the boundary rectangle in region to be identified area and region to be identified Area, then, if judge the area in region to be identified occupy its boundary rectangle area ratio be greater than preset ratio threshold value, It determines that the region to be identified is lane line candidate region, and then can be determined in target image according to lane line candidate region Lane line.As it can be seen that the embodiment of the present application is to be by judging that the area in region to be identified occupies the ratio of its boundary rectangle area It is no to be greater than preset ratio threshold value, to determine whether it is lane line candidate region, so as to will not belong to corresponding to lane line Candidate region reject, accurately to determine lane line using the candidate region after screening, and then improve Lane detection Accuracy.
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation All or part of the steps in example method can be realized by means of software and necessary general hardware platform.Based on such Understand, substantially the part that contributes to existing technology can be in the form of software products in other words for the technical solution of the application It embodies, which can store in storage medium, such as ROM/RAM, magnetic disk, CD, including several Instruction is used so that a computer equipment (can be the network communications such as personal computer, server, or Media Gateway Equipment, etc.) execute method described in certain parts of each embodiment of the application or embodiment.
It should be noted that each embodiment in this specification is described in a progressive manner, each embodiment emphasis is said Bright is the difference from other embodiments, and the same or similar parts in each embodiment may refer to each other.For reality For applying device disclosed in example, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place Referring to method part illustration.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of Lane detection method characterized by comprising
Target image to be identified is obtained, the target image is the carriageway image comprising target lane line;
By pre-processing to the target image, the region to be identified for including in the target image is determined;
Calculate the area of the boundary rectangle in the region to be identified and the area in the region to be identified;
If judging, the area in the region to be identified occupies the ratio of the area of the region boundary rectangle to be identified greater than pre- If proportion threshold value, it is determined that the region to be identified is lane line candidate region;
According to the lane line candidate region, the lane line in the target image is determined.
2. Lane detection method according to claim 1, which is characterized in that described by being converted to the target image It is pre-processed, determines the region to be identified for including in the target image, comprising:
By pre-processing to the target image, the lane line candidate point for including in the target image is determined;
According to the lane line candidate point, the lane line candidate line for including in the target image is determined;
If judging, the continuous strip number of the lane line candidate line is more than default continuous strip number, by the lane of the continuous strip number The region of line candidate line composition is as region to be identified.
3. Lane detection method according to claim 2, which is characterized in that described by being converted to the target image It is pre-processed, determines the lane line candidate point for including in the target image, comprising:
The target image is converted into gray level image, obtains the corresponding gray value of each point to be identified in the target image;
The first mean value and the second mean value are obtained, first mean value is the pixel in the left side predetermined number of the point to be identified The mean value of corresponding gray value, second mean value are the corresponding ash of pixel in the right side predetermined number of the point to be identified The mean value of angle value;
If judge the point to be identified gray value and first mean value difference be greater than the first preset threshold, and it is described to The difference of the gray value of identification point and second mean value is greater than first preset threshold, it is determined that the point to be identified is vehicle Diatom candidate point.
4. Lane detection method according to claim 2, which is characterized in that described by being converted to the target image It is pre-processed, determines the lane line candidate point for including in the target image, comprising:
The target image is converted into gray level image, obtains the corresponding gray value of each point to be identified in the target image;
The first mean value and the second mean value are obtained, first mean value is the pixel in the left side predetermined number of the point to be identified The mean value of corresponding gray value, second mean value are the corresponding ash of pixel in the right side predetermined number of the point to be identified The mean value of angle value;
If judge the point to be identified gray value and first mean value ratio be greater than the second preset threshold, and it is described to The gray value of identification point and the ratio of second mean value are greater than second preset threshold, it is determined that the point to be identified is vehicle Diatom candidate point.
5. Lane detection method according to claim 4, which is characterized in that second preset threshold is 1-1.3.
6. a kind of Lane detection device characterized by comprising
Target image acquiring unit, for obtaining target image to be identified, the target image is to include target lane line Carriageway image;
Area determination unit to be identified, for determining and being wrapped in the target image by being pre-processed to the target image The region to be identified contained;
Areal calculation unit, for calculate the boundary rectangle in the region to be identified area and the region to be identified Area;
Candidate region determination unit, if for judging that the area in the region to be identified occupies the external square in region to be identified The ratio of the area of shape is greater than preset ratio threshold value, it is determined that the region to be identified is lane line candidate region;
Lane line determination unit, for determining the lane line in the target image according to the lane line candidate region.
7. Lane detection device according to claim 6, which is characterized in that the area determination unit packet to be identified It includes:
Candidate point determines subelement, includes for determining in the target image by pre-processing to the target image Lane line candidate point;
Candidate line determines subelement, for determining the lane line for including in the target image according to the lane line candidate point Candidate line;
Region to be identified determines subelement, if the continuous strip number for judging the lane line candidate line is more than default continuous strip Number, then the region formed the lane line candidate line of the continuous strip number is as region to be identified.
8. Lane detection device according to claim 7, which is characterized in that the candidate point determines that subelement includes:
Gray value obtains subelement and obtains each in the target image for the target image to be converted to gray level image The corresponding gray value of point to be identified;
Mean value obtains subelement, and for obtaining the first mean value and the second mean value, first mean value is a left side for the point to be identified The mean value of the corresponding gray value of pixel in the predetermined number of side, second mean value are default of the right side of the point to be identified The mean value of the corresponding gray value of pixel in number;
First candidate point determines subelement, if for judging the gray value of the point to be identified and the difference of first mean value Greater than the first preset threshold, and the difference of the gray value of the point to be identified and second mean value is greater than the described first default threshold Value, it is determined that the point to be identified is lane line candidate point.
9. Lane detection device according to claim 7, which is characterized in that the candidate point determines that subelement includes:
Gray value obtains subelement and obtains each in the target image for the target image to be converted to gray level image The corresponding gray value of point to be identified;
Mean value obtains subelement, and for obtaining the first mean value and the second mean value, first mean value is a left side for the point to be identified The mean value of the corresponding gray value of pixel in the predetermined number of side, second mean value are default of the right side of the point to be identified The mean value of the corresponding gray value of pixel in number;
Second candidate point determines subelement, if for judging the gray value of the point to be identified and the ratio of first mean value Greater than the second preset threshold, and the gray value of the point to be identified and the ratio of second mean value are greater than the described second default threshold Value, it is determined that the point to be identified is lane line candidate point.
10. Lane detection device according to claim 9, which is characterized in that second preset threshold is 1- 1.3。
CN201910189488.XA 2019-03-13 2019-03-13 Lane line identification method and device Active CN109948504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910189488.XA CN109948504B (en) 2019-03-13 2019-03-13 Lane line identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910189488.XA CN109948504B (en) 2019-03-13 2019-03-13 Lane line identification method and device

Publications (2)

Publication Number Publication Date
CN109948504A true CN109948504A (en) 2019-06-28
CN109948504B CN109948504B (en) 2022-02-18

Family

ID=67009777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910189488.XA Active CN109948504B (en) 2019-03-13 2019-03-13 Lane line identification method and device

Country Status (1)

Country Link
CN (1) CN109948504B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110531661A (en) * 2019-08-22 2019-12-03 浙江吉利汽车研究院有限公司 A kind of vehicle is automatically with control method of speeding, device and equipment
CN113255905A (en) * 2021-07-16 2021-08-13 成都时识科技有限公司 Signal processing method of neurons in impulse neural network and network training method
CN113920324A (en) * 2021-12-13 2022-01-11 广州思德医疗科技有限公司 Image recognition method and device, electronic equipment and storage medium
CN114264657A (en) * 2020-09-16 2022-04-01 南亚科技股份有限公司 Wafer inspection method and system
CN114511832A (en) * 2022-04-21 2022-05-17 深圳比特微电子科技有限公司 Lane line analysis method and device, electronic device and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010152900A (en) * 2010-01-18 2010-07-08 Toshiba Corp Image processor and image processing program
CN102592114A (en) * 2011-12-26 2012-07-18 河南工业大学 Method for extracting and recognizing lane line features of complex road conditions
CN107330376A (en) * 2017-06-06 2017-11-07 广州汽车集团股份有限公司 A kind of Lane detection method and system
CN107680246A (en) * 2017-10-24 2018-02-09 深圳怡化电脑股份有限公司 Curved boundary localization method and equipment in a kind of banknote prints
CN107895151A (en) * 2017-11-23 2018-04-10 长安大学 Method for detecting lane lines based on machine vision under a kind of high light conditions
CN107944388A (en) * 2017-11-24 2018-04-20 海信集团有限公司 A kind of method for detecting lane lines, device and terminal
CN108205667A (en) * 2018-03-14 2018-06-26 海信集团有限公司 Method for detecting lane lines and device, lane detection terminal, storage medium
CN108600740A (en) * 2018-04-28 2018-09-28 Oppo广东移动通信有限公司 Optical element detection method, device, electronic equipment and storage medium
CN108716982A (en) * 2018-04-28 2018-10-30 Oppo广东移动通信有限公司 Optical element detection method, device, electronic equipment and storage medium
WO2019007508A1 (en) * 2017-07-06 2019-01-10 Huawei Technologies Co., Ltd. Advanced driver assistance system and method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010152900A (en) * 2010-01-18 2010-07-08 Toshiba Corp Image processor and image processing program
CN102592114A (en) * 2011-12-26 2012-07-18 河南工业大学 Method for extracting and recognizing lane line features of complex road conditions
CN107330376A (en) * 2017-06-06 2017-11-07 广州汽车集团股份有限公司 A kind of Lane detection method and system
WO2019007508A1 (en) * 2017-07-06 2019-01-10 Huawei Technologies Co., Ltd. Advanced driver assistance system and method
CN107680246A (en) * 2017-10-24 2018-02-09 深圳怡化电脑股份有限公司 Curved boundary localization method and equipment in a kind of banknote prints
CN107895151A (en) * 2017-11-23 2018-04-10 长安大学 Method for detecting lane lines based on machine vision under a kind of high light conditions
CN107944388A (en) * 2017-11-24 2018-04-20 海信集团有限公司 A kind of method for detecting lane lines, device and terminal
CN108205667A (en) * 2018-03-14 2018-06-26 海信集团有限公司 Method for detecting lane lines and device, lane detection terminal, storage medium
CN108600740A (en) * 2018-04-28 2018-09-28 Oppo广东移动通信有限公司 Optical element detection method, device, electronic equipment and storage medium
CN108716982A (en) * 2018-04-28 2018-10-30 Oppo广东移动通信有限公司 Optical element detection method, device, electronic equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
DAJUN DING等: ""An adaptive Road ROI Determination Algorithm for Lane Detection"", 《2013 IEEE INTERNATIONAL CONFERENCE ON IEEE REGION》 *
杨益等: ""基于RGB空间的车道线检测与辨识方法"", 《计算机与现代化》 *
苏娟等: ""高分辨率SAR图像中建筑物特征融合检测算法"", 《测绘学报》 *
韦春桃等: ""基于自适应阈值的细小裂缝与微灰度差异裂缝自动检测方法"", 《中外公路》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110531661A (en) * 2019-08-22 2019-12-03 浙江吉利汽车研究院有限公司 A kind of vehicle is automatically with control method of speeding, device and equipment
CN114264657A (en) * 2020-09-16 2022-04-01 南亚科技股份有限公司 Wafer inspection method and system
CN113255905A (en) * 2021-07-16 2021-08-13 成都时识科技有限公司 Signal processing method of neurons in impulse neural network and network training method
CN113255905B (en) * 2021-07-16 2021-11-02 成都时识科技有限公司 Signal processing method of neurons in impulse neural network and network training method
CN113920324A (en) * 2021-12-13 2022-01-11 广州思德医疗科技有限公司 Image recognition method and device, electronic equipment and storage medium
CN113920324B (en) * 2021-12-13 2022-04-01 广州思德医疗科技有限公司 Image recognition method and device, electronic equipment and storage medium
CN114511832A (en) * 2022-04-21 2022-05-17 深圳比特微电子科技有限公司 Lane line analysis method and device, electronic device and storage medium

Also Published As

Publication number Publication date
CN109948504B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN109948504A (en) A kind of Lane detection method and device
US8045761B2 (en) Detection of environmental conditions in a sequence of images
US9619897B2 (en) Correction of blotches in component images
US8405780B1 (en) Generating a clean reference image
WO2018040756A1 (en) Vehicle body colour identification method and device
US20100040300A1 (en) Image processing method and apparatus for correcting distortion caused by air particles as in fog
JP2011521521A (en) Optimal video selection
KR20210006276A (en) Image processing method for flicker mitigation
KR101885088B1 (en) Apparatus and method for processing color image using depth image
US8693783B2 (en) Processing method for image interpolation
US8482630B2 (en) Apparatus and method for adjusting automatic white balance by detecting effective area
CN111311500A (en) Method and device for carrying out color restoration on image
CN118264763A (en) Multi-camera video stitching method, system and device with self-adaption of light rays and moving objects
CN109726708A (en) A kind of Lane detection method and device
KR101854432B1 (en) Method and apparatus for detecting and compensating back light frame
CN111382736B (en) License plate image acquisition method and device
CN109934169A (en) A kind of Lane detection method and device
CA2549797C (en) Detection of environmental conditions in a sequence of images
CN117876387A (en) Image segmentation method and device
CN115272781A (en) Method and apparatus for evaluating vehicle image
CN117710696A (en) Method and system for defining picture characteristics and comparing similarity
CN113256522A (en) Method and device for enhancing low-illumination image and readable storage medium
CN117934385A (en) Defect detection method and device for display unit
CN118823726A (en) Method and device for constructing multi-task data set for automatic parking and vehicle
KR20140071187A (en) Method for determining foreground and surveillance system

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