CN109858307A - A kind of Lane detection method and apparatus - Google Patents

A kind of Lane detection method and apparatus Download PDF

Info

Publication number
CN109858307A
CN109858307A CN201711236420.XA CN201711236420A CN109858307A CN 109858307 A CN109858307 A CN 109858307A CN 201711236420 A CN201711236420 A CN 201711236420A CN 109858307 A CN109858307 A CN 109858307A
Authority
CN
China
Prior art keywords
lane line
pixel
value
lane
positional relationship
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711236420.XA
Other languages
Chinese (zh)
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.)
Alibaba China Co Ltd
Original Assignee
Autonavi Software 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 Autonavi Software Co Ltd filed Critical Autonavi Software Co Ltd
Priority to CN201711236420.XA priority Critical patent/CN109858307A/en
Publication of CN109858307A publication Critical patent/CN109858307A/en
Pending legal-status Critical Current

Links

Landscapes

  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a kind of Lane detection method and apparatus.Method include: traverse binary conversion treatment after road image in pixel value be equal to preset lane line pixel value pixel, obtain at least one connected region;Determine the pixel coordinate for the intermediary image vegetarian refreshments being located among every row pixel in each connected region;The pixel coordinate of intermediary image vegetarian refreshments, is converted to the space coordinate of spatial point by the parameter information of the equipment according to shooting road image;The space coordinate of spatial point based on each connected region carries out straight line fitting to the spatial point of connected region, obtains the lane line of connected region;Obtain the position where when equipment shoots the road image to each lane line positional relationship value;According to positional relationship value, obtain being located at when equipment shoots road image on the left of position and/or right side lane line.The application improves the recognition accuracy of lane line.

Description

A kind of Lane detection method and apparatus
Technical field
This application involves technical field of image processing more particularly to a kind of Lane detection method and apparatus.
Background technique
The correct extraction of lane line and vectorization calculation, can be the skills such as autodraft, automobile assistant driving, unmanned Art provides important data and supports service.The prior art may be implemented to detect from road image may be lane line pixel Point, but the prior art lacks the technical solution identified to lane line relative position.
Summary of the invention
In view of this, the application provides a kind of Lane detection method and apparatus, the identification that can be improved lane line is accurate Degree, technical solution are as follows:
The one side of the application provides a kind of Lane detection method, comprising:
Pixel value is equal to the pixel of preset lane line pixel value in road image after traversing binary conversion treatment, obtains At least one connected region;
Determine the pixel coordinate for the intermediary image vegetarian refreshments being located among every row pixel in each connected region;
According to the parameter information for the equipment for shooting the road image, the pixel coordinate of the intermediary image vegetarian refreshments is converted to The space coordinate of spatial point;
It is quasi- to carry out straight line to the spatial point of the connected region for the space coordinate of spatial point based on each connected region It closes, obtains the lane line of the connected region;
Obtain the position where when the equipment shoots the road image to each lane line positional relationship value;
According to the positional relationship value, obtain being located at the vehicle when equipment shoots the road image on the left of position Diatom and/or the lane line on right side.
The another aspect of the application provides a kind of Lane detection device, comprising:
Connected region determination unit is equal to preset lane for traversing pixel value in the road image after binary conversion treatment The pixel of line pixel value obtains at least one connected region;
Pixel coordinate determination unit, for determining the intermediary image vegetarian refreshments being located among every row pixel in each connected region Pixel coordinate;
Space coordinate conversion unit, for the parameter information according to the equipment for shooting the road image, by the centre The pixel coordinate of pixel is converted to the space coordinate of spatial point;
Lane line determination unit, for the space coordinate of the spatial point based on each connected region, to the connected region Spatial point carry out straight line fitting, obtain the lane line of the connected region;
Positional relationship acquiring unit, for the position to each lane where obtaining when the equipment shoots the road image The positional relationship value of line;
Lane line position determination unit is located at the equipment shooting road for obtaining according to the positional relationship value The lane line of lane line and/or right side when the image of road on the left of position.
In Lane detection method and apparatus provided by the present application, picture in the road image first after traversal binary conversion treatment Element value is equal to the pixel of preset lane line pixel value, obtains at least one connected region, and determine each connected region In be located at every row pixel among intermediary image vegetarian refreshments pixel coordinate;And then the ginseng according to the equipment for shooting the road image The pixel coordinate of intermediary image vegetarian refreshments, is converted to the space coordinate of spatial point, and the space based on each connected region by number information The space coordinate of point carries out straight line fitting to the spatial point of connected region, obtains the lane line of connected region;Further, The positional relationship value of each lane line is arrived according to the position where obtaining when the equipment shoots the road image, described in last foundation Positional relationship value obtains being located at the lane line and/or right side when the equipment shoots the road image on the left of position Lane line.The application is after obtaining lane line, and position is described in when shooting the road image by obtaining the equipment The positional relationship value of lane line determines sky of all lane lines relative to the equipment finally according to the positional relationship value Between position, realize the identification of lane line relative position.
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 only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of Lane detection method provided by the embodiments of the present application;
Fig. 2 is the flow chart of another Lane detection method provided by the embodiments of the present application;
Fig. 3 is the space length schematic diagram that each lane line arrives camera respectively in the embodiment of the present application;
Fig. 4 is the method flow diagram that connected region is determined in the embodiment of the present application;
Fig. 5 is a kind of structural schematic diagram of Lane detection device provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
This application provides a kind of Lane detection method, this method is carried out for the road image after binary conversion treatment Identification, and then obtain lane line and be equivalent to the relative position for shooting the equipment of the road image, therefore, mentioned executing the application Before the Lane detection method of confession, need first to obtain the road image including lane line, and two are carried out to the road image Value processing, the road image (abbreviation binary image) after obtaining binary conversion treatment.Specifically, camera, phase be can use The photographic devices such as machine (below by taking camera as an example) obtain the road image including lane line in real time, and then use CNN (Convolutional Neural Networks, convolutional neural networks) the image-recognizing method processing road image, obtains The binary image.The pixel of binary image arranges in the way of ranks.In the application, according to the direction pair of lane line The pixel branch of binary image arranges, wherein the row of the pixel of binary image perpendicular to lane line, binary image The column of pixel are parallel to lane line.
Referring to Fig. 1, it illustrates a kind of flow charts of Lane detection method provided by the present application, comprising:
Step 101, pixel value is equal to the picture of preset lane line pixel value in the road image after traversing binary conversion treatment Vegetarian refreshments obtains at least one connected region.
Step 102, the pixel coordinate for the intermediary image vegetarian refreshments being located among every row pixel in each connected region is determined.
Step 103, the parameter information according to the equipment for shooting the road image sits the pixel of the intermediary image vegetarian refreshments Mark is converted to the space coordinate of spatial point.
Step 104, the space coordinate of the spatial point based on each connected region carries out the spatial point of the connected region Straight line fitting obtains the lane line of the connected region.
Step 105, obtain the position where when the equipment shoots the road image to each lane line positional relationship Value.
Step 106, it according to the positional relationship value, obtains being located at position when the equipment shoots the road image The lane line in left side and/or the lane line on right side.
It is a kind of Lane detection method provided by the present application above, the application is after obtaining lane line, by obtaining institute State position when equipment shoots the road image to the lane line positional relationship value, finally according to the positional relationship Value, determines spatial position of all lane lines relative to the equipment, realizes the identification of lane line relative position.
On the basis of the above embodiments, it is preferable that as shown in Fig. 2, the application obtains the equipment and clap in step 105 After position to the positional relationship value of each lane line where when taking the photograph the road image, it can further include:
Step 107, it according to the positional relationship value, obtains the position where when the equipment shoots the road image and arrives The space length of each lane line.
Specifically, the lane line that the application obtain after straight line fitting can be expressed with linear equation, for example, lane line The linear equation of Ln is Ax+By+C=0, and A, B, C are the parameters of the linear equation in straight line fitting procedure, obtained.Accordingly, originally Application can use following formula (1), and position where when camera shoots the road image is calculated to each lane line Space length Disn:
Formula (1),
Step 108, from the lane line that the positional relationship value is negative, the smallest vehicle of the value of space length is selected Left-hand lane line of the diatom as lane where the equipment.
Step 109, from the lane line that the positional relationship value is positive number, the smallest vehicle of the value of space length is selected Right-hand lane line of the diatom as lane where the equipment.
It should be noted that the application for above-mentioned steps 108 and step 109 execution sequence without limitation, the application Step 109 can also be first carried out, then executes step 108 or step 108 and step 109 is performed simultaneously.
Specifically, since the space length of lane line to the camera in place lane when camera shoots the road image is certain Be it is the smallest, therefore, the application is the left-hand lane in lane where can determine that camera using above-mentioned steps 108 and step 109 Line and right-hand lane line.
After the application left-hand lane line and right-hand lane line in lane where determining camera, camera bat has been fully considered The space geometry distribution situation of all lane lines of position when taking the photograph the road image, therefore, the application is based further on The left-hand lane line and right-hand lane line in lane, determine the relative position of all lane lines where above-mentioned camera, in order to provide The identification information of more accurate lane line.It describes in detail below in conjunction with attached drawing 3 to this partial content.
Specifically in conjunction with shown in attached drawing 3, (the lane where camera space length D2 and lane line L3 of lane line L2 to camera Left-hand lane line) to camera space length D3 difference be equal to a lane width, the space length D1 of lane line L1 to camera It is equal to two lane widths with the difference of the space length D3 of lane line L3 to camera;Lane line L5 to camera space length D5 with The difference for the space length D4 that lane line L4 (the right-hand lane line in lane where camera) arrives camera is equal to a lane width.
Accordingly, the application is in step 108, step 109, the left-hand lane line and right-hand lane in lane where determining camera It, can be according to the sky of lane line for being located at lane line when camera shoots the road image on the left of position after line Between the left-hand lane line in lane where distance and camera space length and preset lane width, obtain the number of lane line; It, can be according to the space length and camera of lane line for being located at lane line when camera shoots the road on the right side of position The space length and preset lane width of the right-hand lane line in place lane, obtain the number of lane line.
Specifically, the application is that the left-hand lane line L3 in lane where camera assigns a number, such as -1 in advance, is in advance The right-hand lane line L4 in lane assigns another number where camera, and such as+1, then, according to formula Lane line when to shoot the road image positioned at camera on the left of position is numbered;
According to formulaPosition when to shoot the road image positioned at camera The lane line on right side is numbered.
Wherein, D (left) is the left-hand lane line (L3 as shown in the figure) in place lane when camera shoots the road image To the space length of camera, the right-hand lane line in place lane is (as schemed institute when D (right) shoots the road image for camera Show L4) to the space length of camera, LaneWidth is lane width value, general LaneWidth=3.5m.If it is camera The number that the left-hand lane line and right-hand lane line in place lane assign is not -1 and+1, then -1 in above-mentioned formula and+1 needs Replaced with corresponding number.The above concrete example is only to be illustrated more clearly that technical scheme, is not construed as to the application Limitation.
Therefore, it after by the way that each lane line is numbered, is realized pair according to ascending sequence sequence is numbered The sequence of lane line { Ln }.
Further, in order to guarantee obtain lane line accuracy, the application on the basis of aforementioned offers embodiment, and also It may further include:
The length for numbering identical lane line is obtained, the length for numbering identical lane line is compared, retains the long vehicle of length Diatom deletes the short lane line of length.
In the application, if there is the number of at least two lane lines is identical, illustrate this two lane line space lengths very It is close, and can not there are two lane lines to be within close proximity in actual conditions, there is such case and illustrates that lane detection has mistake Detection as a result, therefore, the application retains the relatively long lane line of lane line length according to lane line length longest principle, The relatively short lane line of lane line length is deleted, to ensure that the accuracy of final output lane line.
In order to emerge more clearly out the position of lane line on the original image, further, in above-described embodiment On the basis of, the application can execute following steps 110 and step 111 to the lane line deleted after error detection lane line, Following steps 110 and step 111 can be executed to the lane line that step 104 obtains, specific:
Step 110, the starting point coordinate P of every lane line is determined0With terminal point coordinate P1, i.e. { P0, P1}。
Step 111, by { P0, P1Back projection to original image, obtains picture point { P0', P1’}。
Specifically, the application can use formula P '=K × (R | T) × P and obtain { P0, P1 } back projection to original image Take picture point { P0 ', P1 ' }.
Wherein, P is the coordinate (coordinate can be three-dimensional and be also possible to two dimension) of the endpoint (beginning or end) of lane line, P ' is the coordinate of the endpoint (beginning or end) of lane line in original image, and K is camera intrinsic parameter, and (R | T) is Camera extrinsic number. Camera intrinsic parameter is parameter relevant to camera self-characteristic, such as focal length, the pixel size of camera etc.;Camera extrinsic number be Parameter in world coordinate system, such as position, the direction of rotation of camera etc..
Step 112, according to picture point { P0', P1' display lane line is exported on the original image.
Specific implementation below in conjunction with attached drawing to each technological means used in Lane detection method provided by the present application Method describes in detail.
About the application step 101, pixel value is equal to preset lane line in the road image after traversing binary conversion treatment The pixel of pixel value obtains at least one connected region, can be realized, be specifically included using method shown in Fig. 4:
Step 1011, it from the road image after binary conversion treatment, chooses one and is not traversed and is not endowed with the first mark The pixel of label.
The application can be by the way of by row one by one selected pixels point, to the picture in the road image after binary conversion treatment Vegetarian refreshments is traversed, and then obtains a pixel for not being traversed and being not endowed with the first label.
Step 1012, judge whether the pixel value of the pixel is equal to preset lane line pixel value, if it is not, Return step 1011 executes step 1013 if be equal to.
Step 1013, the first label is assigned for the pixel.
Wherein, preset lane line pixel value is, for example, 255, and the first label is, for example, label1.
Step 1014, judge to be equal in the pixel on the pixel periphery for assigning the first label with the presence or absence of pixel value The pixel of preset lane line pixel value, if it is present assigning the first label for these pixels.
Wherein, the pixel for assigning the pixel periphery of the first label refers to the pixel with the first label of the imparting Four pixels at adjacent upper and lower, left and right position.
Step 1015, for the pixel for being endowed the first label, step 1014 is repeated, until being endowed the first mark When the pixel value of the pixel on the pixel periphery of label is not equal to preset lane line pixel value, first has been endowed by all The pixel of label is determined as a connected region.
Step 1016, with the presence or absence of not being traversed and be not endowed with the in the road image after judging the binary conversion treatment The pixel of one label, and if it exists, then return to step 1011, be such as not present, then execute abovementioned steps 102.
Specifically in the embodiment of the present application, the application can be with behavior unit, the pixel value of order traversal pixel, and sentences Whether the pixel value of disconnected pixel is equal to 255.The application, pixel of the pixel value equal to 255 is in the road image of binaryzation Lane line, pixel of the pixel value equal to 0 is background, and the application is by judging whether the pixel value of pixel is equal to as a result, 255, it can determine whether the pixel belongs to lane line.
When detecting first pixel, when such as the pixel value of the first pixel A1 is equal to 255, for first pixel A1 Assign the first label, for example, label1, and by its position coordinates A1 (x1, y1) pop down.And then remove the first pixel A1 of detection Whether the pixel value of the pixel on periphery is equal to 255.Wherein, the pixel on the first periphery pixel A1 refers to and first picture Four pixels at vegetarian refreshments A1 adjacent upper and lower, left and right position.
It is understood that the first row of the road image and head/tail pixel of last line are removed, if first Pixel A1 be the first row on pixel, then the pixel on the first periphery pixel A1 only include it is adjacent thereto under, it is left and right Three pixels at position, if the first pixel A1 is the pixel on first row, the first periphery pixel A1 Pixel only includes three pixels at upper and lower, right position adjacent thereto, if the first pixel A1 is in last line Pixel, then the pixel on the first periphery pixel A1 only includes upper, at left and right position three pixels adjacent thereto, If the first pixel A1 is the pixel on last column, the pixel on the first periphery pixel A1 is only included and its phase Set three pixels at place in adjacent upper and lower, left position.
If there are the pixels that pixel value is equal to 255 in the pixel on the first periphery pixel A1, for these pixels Point equally assigns the first label label1, after position coordinates pop down, continues to test these and assigns the first label label1 Pixel periphery pixel in be equal to 255 pixel with the presence or absence of pixel value, if it is present repeating aforementioned to assign the The pixel that one label label1 and detection assign the pixel periphery of the first label label1 is equal to 255 with the presence or absence of pixel value Pixel the step of, until any pixel periphery for assigning the first label label1 all can't detect pixel value equal to 255 Pixel when, determine it is all assign the first label label1 pixels covering region be a connected region.
After the application determines a connected region, the application can be numbered for the connected region, such as Mark1, and then corresponding relationship will be established between the Mark1 and label1, then in subsequent processes, as long as checking pixel Label value, can determine which connected region the pixel belongs to.
After the application determines a connected region, restoring to normal position to the next pixel adjacent with first pixel A1 The position of point, for example, it is assumed that the first pixel A1, pixel B1, pixel C1, pixel D1 are sequentially arranged in a row.When The application is using the first pixel A1 as starting point, after determining a connected region, the application restoring to normal position to pixel B1, if Pixel B1 is assigned the first label label1, then, pixel B1 is skipped, if there is no assigned pixel C1 The first label label1 is given, then repeats the aforementioned process for pixel A1, determines next connected region, until by mileage chart Pixel as in all traverses.
Using the above method provided by the present application, the multiple connected regions determined from binary image are all mutually solely Vertical, overlapping region is not present.
Furthermore preferred as the application, the application can further calculate connection after determining multiple connected regions The area in region deletes the connected region that area is less than preset area threshold value, to guarantee the processing accuracy of data, reduces and misses Difference.
About the application step 102, the intermediary image vegetarian refreshments being located among every row pixel in each connected region is determined Pixel coordinate.
In practical applications, the application determines position in each connected region after obtaining at least one connected region respectively The pixel coordinate of intermediary image vegetarian refreshments among every row pixel obtains the coordinate set { Sn } for each connected region, institute It states coordinate set { Sn } to be made of the pixel coordinate of intermediary image vegetarian refreshments all in connected region, n is the number of connected region.
In the application, the pixel value of all pixels point in each connected region is equal to 255, and therefore, the application is true After making the connected region in binary image, the binary image is scanned by row again, is belonged to when detecting in certain a line When the pixel of some connected region, the position coordinates P of the starting pixels point in the pixel in the connected region is determinedBeginWith Terminate the position coordinates P of pixelOnly, utilize formulaIt obtains being located in the row pixel in the connected region Between intermediary image vegetarian refreshments pixel coordinate PIn, therefore, one is crossed over for the connected region of L row, coordinate set { Sn } In have the pixel coordinate P of L intermediary image vegetarian refreshmentsIn.For example, the application defines 10 connected regions, each connected region pair A coordinate set { Sn } is answered, therefore, has 10 coordinate set { S1 } ... { S10 } altogether.
About the application step 103, according to the parameter information for the equipment for shooting the road image, by the intermediate pixel The pixel coordinate of point is converted to the space coordinate of spatial point.
Specifically, parameter information of the application according to the equipment for shooting the road image, will be in coordinate set { Sn } Pixel coordinate is respectively converted into the space coordinate of spatial point, obtains spatial point set { Pn }.
The equipment that the application as previously described shoots the road image can be the photographic devices such as camera, camera, in order to Convenient for explanation, the application obtains position and the attitude parameter information of camera by taking camera as an example, by the centre in coordinate set { Sn } The pixel coordinate of pixel is respectively converted into the space coordinate of spatial point, obtains spatial point set { Pn }.
Specifically, the application can use formula P=s × Inv (R) × Inv (K) × p, in coordinate set { Sn } Between pixel pixel coordinate, be respectively converted into the space coordinate of spatial point, obtain spatial point set { Pn }.
Wherein, K is camera intrinsic parameter, and (R | T) is Camera extrinsic number, and P is the space coordinate of spatial point, and p is intermediate pixel The pixel coordinate of point, Inv (R) are the inverse matrix of R, and Inv (K) is the inverse matrix of K, and s is constant coefficient relevant to camera heights H.
About the application step 104, the space coordinate of the spatial point based on each connected region, to the connected region Spatial point carries out straight line fitting, obtains the lane line of the connected region.
In practical applications, the application is in the space coordinate for obtaining the spatial point for each connected region, that is, spatial point After gathering { Pn }, each spatial point in the spatial point set { Pn } is subjected to straight line fitting, obtains the lane line of connected region {Ln}。
For example, 10 spatial point set { Pn } that the application obtains, then click through space in each spatial point set { Pn } Row straight line fitting obtains 10 lane lines.That is, the corresponding lane line of one spatial point set { Pn } of the application.
About the application step 105, position where when the equipment shoots the road image is obtained to each lane line Positional relationship value.
As previously mentioned, the space coordinate of spatial point of the application based on each connected region, to the sky of the connected region Between point carry out straight line fitting, obtain the lane line of the connected region, herein it should be noted that the application to carry out straight line quasi- After conjunction, lane line can be indicated using linear equation, for example, the linear equation of lane line Ln is Ax+By+C=0, wherein A, B, C is the parameter of the linear equation in straight line fitting procedure, obtained.
If the coordinate of position is (X when camera shoots the road imagep, Yp), then can be used formula Dn=A × Xp+B×Yp+ C, obtain indicating the position where when camera shoots the road image to the lane line Ln positional relationship value.
In the application, coordinate origin is in the position where when shooting the road image using camera, therefore, when Dn is less than 0 When, the left side for the position that the corresponding lane line of the Dn is located at where when camera shoots the road image is indicated, when Dn is greater than 0 When, indicate the right side for the position that the corresponding lane line of the Dn is located at where when camera shoots the road image.
About the application step 106, according to the positional relationship value, obtain being located at the equipment shooting road image When position on the left of lane line and/or right side lane line.
Specifically, the application determines that the positional relationship value is corresponding by judging that positional relationship value is positive number or negative Lane line is the lane line of the lane line or right side when shooting the road image positioned at the equipment on the left of position.Its In, if positional relationship value is negative, it is to shoot the road positioned at the equipment which, which is worth corresponding lane line, Lane line when image on the left of position;If positional relationship value is positive number, which is Lane line when shooting the road image positioned at the equipment on the right side of position.
Based on a kind of Lane detection method provided by the present application above, the application also provides a kind of Lane detection dress It sets, as shown in Figure 5, comprising:
Connected region determination unit 10 is equal to preset vehicle for traversing pixel value in the road image after binary conversion treatment The pixel of diatom pixel value obtains at least one connected region;
Pixel coordinate determination unit 20, for determining the intermediate pixel being located among every row pixel in each connected region The pixel coordinate of point;
Space coordinate conversion unit 30, for the parameter information according to the equipment for shooting the road image, in described Between the pixel coordinate of pixel be converted to the space coordinate of spatial point;
Lane line determination unit 40, for the space coordinate of the spatial point based on each connected region, to the connected region The spatial point in domain carries out straight line fitting, obtains the lane line of the connected region;
Positional relationship acquiring unit 50, for the position where obtaining when the equipment shoots the road image to each vehicle The positional relationship value of diatom;
Lane line position determination unit 60 is located at described in equipment shooting for obtaining according to the positional relationship value The lane line of lane line and/or right side when road image on the left of position.
Wherein, the lane line position determination unit 60 can also include:
Positional relationship value judgment sub-unit, for judging that the positional relationship value is positive number or negative;
Left-hand lane line determines subelement, for judging that positional relationship value is negative in the positional relationship value judgment sub-unit When number, determine that the corresponding lane line of the positional relationship value is that position is left when shooting the road image positioned at the equipment The lane line of side;
Right-hand lane line determines subelement, for judging that positional relationship value is just in the positional relationship value judgment sub-unit When number, determine that the corresponding lane line of the positional relationship value is that position is right when shooting the road image positioned at the equipment The lane line of side.
Further, Lane detection device provided by the present application can also include:
Space length acquiring unit, for obtaining the equipment and shooting the road image according to the positional relationship value When where position to the lane line space length.
The lane line position determination unit 60 can also include:
Lane left-hand lane line determines subelement, for from the lane line that the positional relationship value is negative, selection to be empty Between distance left-hand lane line of the smallest lane line of value as lane where the equipment;
Lane right-hand lane line determines subelement, for from the lane line that the positional relationship value is positive number, selection to be empty Between distance right-hand lane line of the smallest lane line of value as lane where the equipment.
Optionally, Lane detection device provided by the present application can also include:
Left-hand lane line numbered cell, for for being located at when the equipment shoots the road image on the left of position Lane line obtain according to the space length of lane line and the space length and preset lane width of the left-hand lane line The number of lane line;
Right-hand lane line numbered cell, for for being located at the vehicle when equipment shoots the road on the right side of position Diatom obtains lane according to the space length of lane line and the space length and preset lane width of the right-hand lane line The number of line.
Optionally, Lane detection device provided by the present application can also include:
Lane line screening unit compares the identical lane line of number for obtaining the length for numbering identical lane line Length retains the long lane line of length, deletes the short lane line of length.
In the application, the connected region determination unit 10 may include:
Pixel chooses subelement, for choosing one and not being traversed from the road image after the binary conversion treatment And it is not endowed with the pixel of the first label;
The first judgment sub-unit of pixel value, for judging whether the pixel value of the pixel is equal to preset lane line picture Element value;
First label subelement, for judging the pixel value etc. of the pixel in first judgment sub-unit of pixel value When preset lane line pixel value, the first label is assigned for the pixel;
The second judgment sub-unit of pixel value, for judge it is described assign the first label pixel periphery pixel in be It is no that there are the pixels that pixel value is equal to preset lane line pixel value;
Second label subelement, for judging the picture for assigning the first label in second judgment sub-unit of pixel value There are when the pixel that pixel value is equal to preset lane line pixel value in the pixel on vegetarian refreshments periphery, assigned for these pixels First label;
Second judgment sub-unit of pixel value and the second label subelement repeat corresponding operating, until being assigned When giving the pixel value of the pixel on the pixel periphery of the first label and being not equal to preset lane line pixel value, connected domain is triggered Determine subelement;
The connected domain determines subelement, for all pixels for being endowed the first label to be determined as a connection Region;
Pixel judgment sub-unit, for judging in the road image after the binary conversion treatment with the presence or absence of not being traversed And the pixel of the first label is not assigned;If it exists, then it returns and executes the operation that the pixel chooses subelement.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For device class embodiment, since it is basically similar to the method embodiment, so being described relatively simple, related place ginseng See the part explanation of embodiment of the method.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
A kind of Lane detection method and apparatus provided herein are described in detail above, it is used herein The principle and implementation of this application are described for specific case, and the above embodiments are only used to help understand The present processes and its core concept;At the same time, for those skilled in the art is having according to the thought of the application There will be changes in body embodiment and application range, in conclusion the content of the present specification should not be construed as to the application Limitation.

Claims (12)

1. a kind of Lane detection method characterized by comprising
Pixel value is equal to the pixel of preset lane line pixel value in road image after traversing binary conversion treatment, obtains at least One connected region;
Determine the pixel coordinate for the intermediary image vegetarian refreshments being located among every row pixel in each connected region;
According to the parameter information for the equipment for shooting the road image, the pixel coordinate of the intermediary image vegetarian refreshments is converted into space The space coordinate of point;
The space coordinate of spatial point based on each connected region carries out straight line fitting to the spatial point of the connected region, obtains To the lane line of the connected region;
Obtain the position where when the equipment shoots the road image to each lane line positional relationship value;
According to the positional relationship value, obtain being located at the lane line when equipment shoots the road image on the left of position And/or the lane line on right side.
2. the method according to claim 1, wherein obtaining being located at the equipment according to the positional relationship value The lane line of lane line and/or right side when shooting the road image on the left of position includes:
Judge that the positional relationship value is positive number or negative, if it is negative, then the corresponding lane line of the positional relationship value is Lane line when shooting the road image positioned at the equipment on the left of position;If it is positive number, then the positional relationship Being worth corresponding lane line is lane line when shooting the road image positioned at the equipment on the right side of position.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
According to the positional relationship value, obtain the position where when the equipment shoots the road image to each lane line sky Between distance;
From the lane line that the positional relationship value is negative, select the smallest lane line of the value of space length as described in The left-hand lane line in lane where equipment;
From the lane line that the positional relationship value is positive number, select the smallest lane line of the value of space length as described in The right-hand lane line in lane where equipment.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
For be located at the equipment shoot the road image when position on the left of lane line, according to lane line space away from From and the left-hand lane line space length and preset lane width, obtain the number of lane line;
For be located at the equipment shoot the road when position on the right side of lane line, according to lane line space length and The space length and preset lane width of the right-hand lane line, obtain the number of lane line.
5. the method according to weighing and require 4, which is characterized in that the method also includes:
Obtain the length for numbering identical lane line;
Compare the length for numbering identical lane line, retain the long lane line of length, deletes the short lane line of length.
6. method described in any one of -5 claims according to claim 1, which is characterized in that at the traversal binaryzation Pixel value is equal to the pixel of preset lane line pixel value in road image after reason, obtains at least one connected region packet It includes:
From the road image after the binary conversion treatment, a pixel for not being traversed and being not endowed with the first label is chosen Point;
Judge whether the pixel value of the pixel is equal to preset lane line pixel value, if being equal to preset lane line pixel Value then assigns the first label for the pixel;
Judge to be equal to preset lane line with the presence or absence of pixel value in the pixel on the pixel periphery for assigning the first label The pixel of pixel value, if it is present assigning the first label for these pixels;
For the pixel for being endowed the first label, the judgement pixel periphery for assigning the first label is repeated It is equal to the pixel of preset lane line pixel value in pixel with the presence or absence of pixel value, if it is present executing is these pictures Vegetarian refreshments assigns the step of the first label, and the pixel value of the pixel on the pixel periphery until being endowed the first label is not equal to When preset lane line pixel value, all pixels for being endowed the first label are determined as a connected region;
It whether there is the pixel for not being traversed and not assigning the first label in road image after judging the binary conversion treatment, If it exists, then it returns from the road image after the binary conversion treatment, chooses one and be not traversed and be not endowed with the first mark The step of pixel of label.
7. a kind of Lane detection device characterized by comprising
Connected region determination unit is equal to preset lane line picture for traversing pixel value in the road image after binary conversion treatment The pixel of element value, obtains at least one connected region;
Pixel coordinate determination unit, for determining the picture for the intermediary image vegetarian refreshments being located among every row pixel in each connected region Plain coordinate;
Space coordinate conversion unit, for the parameter information according to the equipment for shooting the road image, by the intermediate pixel The pixel coordinate of point is converted to the space coordinate of spatial point;
Lane line determination unit, for the space coordinate of the spatial point based on each connected region, to the sky of the connected region Between point carry out straight line fitting, obtain the lane line of the connected region;
Positional relationship acquiring unit, for the position where obtaining when the equipment shoots the road image to each lane line Positional relationship value;
Lane line position determination unit is located at the equipment shooting mileage chart for obtaining according to the positional relationship value As when position on the left of lane line and/or right side lane line.
8. device according to claim 7, which is characterized in that the lane line position determination unit includes:
Positional relationship value judgment sub-unit, for judging that the positional relationship value is positive number or negative;
Left-hand lane line determines subelement, for judging that positional relationship value is negative in the positional relationship value judgment sub-unit When, determine that the corresponding lane line of the positional relationship value is position left side when shooting the road image positioned at the equipment Lane line;
Right-hand lane line determines subelement, for judging that positional relationship value is positive number in the positional relationship value judgment sub-unit When, determine that the corresponding lane line of the positional relationship value is position right side when shooting the road image positioned at the equipment Lane line.
9. device according to claim 8, which is characterized in that described device further include:
Space length acquiring unit, for obtaining equipment shooting road image when institute according to the positional relationship value Position to each lane line space length;
The lane line position determination unit further include:
Lane left-hand lane line determines subelement, for from the positional relationship value be negative lane line in, select space away from From left-hand lane line of the smallest lane line of value as lane where the equipment;
Lane right-hand lane line determines subelement, for from the positional relationship value be positive number lane line in, select space away from From right-hand lane line of the smallest lane line of value as lane where the equipment.
10. device according to claim 9, which is characterized in that described device further include:
Left-hand lane line numbered cell, for for being located at the vehicle when equipment shoots the road image on the left of position Diatom obtains lane according to the space length of lane line and the space length and preset lane width of the left-hand lane line The number of line;
Right-hand lane line numbered cell, for for being located at the lane when equipment shoots the road on the right side of position Line obtains lane line according to the space length of lane line and the space length and preset lane width of the right-hand lane line Number.
11. device according to claim 10, which is characterized in that described device further include:
Lane line screening unit compares the length for numbering identical lane line for obtaining the length for numbering identical lane line, Retain the long lane line of length, deletes the short lane line of length.
12. according to the described in any item devices of claim 7-11, which is characterized in that the connected region determination unit includes:
Pixel chooses subelement, for from the road image after the binary conversion treatment, chooses one and is not traversed and not It is endowed the pixel of the first label;
The first judgment sub-unit of pixel value, for judging whether the pixel value of the pixel is equal to preset lane line pixel Value;
First label subelement, for judging that it is pre- that the pixel value of the pixel is equal in first judgment sub-unit of pixel value If lane line pixel value when, for the pixel assign the first label;
The second judgment sub-unit of pixel value, for judge it is described assign the first label pixel periphery pixel in whether deposit It is equal to the pixel of preset lane line pixel value in pixel value;
Second label subelement, for judging the pixel for assigning the first label in second judgment sub-unit of pixel value There are when the pixel that pixel value is equal to preset lane line pixel value in the pixel on periphery, first is assigned for these pixels Label;
Second judgment sub-unit of pixel value and the second label subelement repeat corresponding operating, until being endowed When the pixel value of the pixel on the pixel periphery of one label is not equal to preset lane line pixel value, triggering connected domain is determined Subelement;
The connected domain determines subelement, for all pixels for being endowed the first label to be determined as a connected region Domain;
Pixel judgment sub-unit, for judging in the road image after the binary conversion treatment with the presence or absence of not being traversed and not Assign the pixel of the first label;If it exists, then it returns and executes the operation that the pixel chooses subelement.
CN201711236420.XA 2017-11-30 2017-11-30 A kind of Lane detection method and apparatus Pending CN109858307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711236420.XA CN109858307A (en) 2017-11-30 2017-11-30 A kind of Lane detection method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711236420.XA CN109858307A (en) 2017-11-30 2017-11-30 A kind of Lane detection method and apparatus

Publications (1)

Publication Number Publication Date
CN109858307A true CN109858307A (en) 2019-06-07

Family

ID=66887954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711236420.XA Pending CN109858307A (en) 2017-11-30 2017-11-30 A kind of Lane detection method and apparatus

Country Status (1)

Country Link
CN (1) CN109858307A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855883A (en) * 2019-11-05 2020-02-28 浙江大华技术股份有限公司 Image processing system, method, device equipment and storage medium
CN111160086A (en) * 2019-11-21 2020-05-15 成都旷视金智科技有限公司 Lane line recognition method, lane line recognition device, lane line recognition equipment and storage medium
CN111639593A (en) * 2020-05-28 2020-09-08 东软睿驰汽车技术(沈阳)有限公司 Lane line label processing method and device
CN111815742A (en) * 2020-09-14 2020-10-23 蘑菇车联信息科技有限公司 Lane line generation method and system
CN111950469A (en) * 2020-08-14 2020-11-17 上海云从汇临人工智能科技有限公司 Road sign detection method, system, equipment and medium
CN112184799A (en) * 2019-07-05 2021-01-05 北京地平线机器人技术研发有限公司 Lane line space coordinate determination method and device, storage medium and electronic equipment
CN115147794A (en) * 2022-06-30 2022-10-04 小米汽车科技有限公司 Lane line determination method and device, vehicle, medium and chip

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101131321A (en) * 2007-09-28 2008-02-27 深圳先进技术研究院 Real-time safe interval measurement method and device used for vehicle anti-collision warning
CN103786729A (en) * 2012-10-26 2014-05-14 现代自动车株式会社 Lane recognition method and system
EP2759959A2 (en) * 2013-01-25 2014-07-30 Ricoh Company, Ltd. Method and system for detecting multi-lanes
CN104299221A (en) * 2014-07-11 2015-01-21 奇瑞汽车股份有限公司 Determination method and apparatus for traffic sign image
US20150269446A1 (en) * 2014-03-24 2015-09-24 Toyota Jidosha Kabushiki Kaisha Boundary detection apparatus and boundary detection method
CN105674992A (en) * 2014-11-20 2016-06-15 高德软件有限公司 Navigation method and apparatus
CN105740809A (en) * 2016-01-28 2016-07-06 东南大学 Expressway lane line detection method based on onboard camera
CN106056100A (en) * 2016-06-28 2016-10-26 重庆邮电大学 Vehicle auxiliary positioning method based on lane detection and object tracking
CN107330380A (en) * 2017-06-14 2017-11-07 千寻位置网络有限公司 Lane line based on unmanned plane image is automatically extracted and recognition methods

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101131321A (en) * 2007-09-28 2008-02-27 深圳先进技术研究院 Real-time safe interval measurement method and device used for vehicle anti-collision warning
CN103786729A (en) * 2012-10-26 2014-05-14 现代自动车株式会社 Lane recognition method and system
EP2759959A2 (en) * 2013-01-25 2014-07-30 Ricoh Company, Ltd. Method and system for detecting multi-lanes
US20150269446A1 (en) * 2014-03-24 2015-09-24 Toyota Jidosha Kabushiki Kaisha Boundary detection apparatus and boundary detection method
CN104299221A (en) * 2014-07-11 2015-01-21 奇瑞汽车股份有限公司 Determination method and apparatus for traffic sign image
CN105674992A (en) * 2014-11-20 2016-06-15 高德软件有限公司 Navigation method and apparatus
CN105740809A (en) * 2016-01-28 2016-07-06 东南大学 Expressway lane line detection method based on onboard camera
CN106056100A (en) * 2016-06-28 2016-10-26 重庆邮电大学 Vehicle auxiliary positioning method based on lane detection and object tracking
CN107330380A (en) * 2017-06-14 2017-11-07 千寻位置网络有限公司 Lane line based on unmanned plane image is automatically extracted and recognition methods

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184799A (en) * 2019-07-05 2021-01-05 北京地平线机器人技术研发有限公司 Lane line space coordinate determination method and device, storage medium and electronic equipment
CN110855883A (en) * 2019-11-05 2020-02-28 浙江大华技术股份有限公司 Image processing system, method, device equipment and storage medium
CN110855883B (en) * 2019-11-05 2021-07-20 浙江大华技术股份有限公司 Image processing system, method, device equipment and storage medium
CN111160086A (en) * 2019-11-21 2020-05-15 成都旷视金智科技有限公司 Lane line recognition method, lane line recognition device, lane line recognition equipment and storage medium
CN111160086B (en) * 2019-11-21 2023-10-13 芜湖迈驰智行科技有限公司 Lane line identification method, device, equipment and storage medium
CN111639593A (en) * 2020-05-28 2020-09-08 东软睿驰汽车技术(沈阳)有限公司 Lane line label processing method and device
CN111950469A (en) * 2020-08-14 2020-11-17 上海云从汇临人工智能科技有限公司 Road sign detection method, system, equipment and medium
CN111815742A (en) * 2020-09-14 2020-10-23 蘑菇车联信息科技有限公司 Lane line generation method and system
CN115147794A (en) * 2022-06-30 2022-10-04 小米汽车科技有限公司 Lane line determination method and device, vehicle, medium and chip
CN115147794B (en) * 2022-06-30 2023-08-29 小米汽车科技有限公司 Lane line determining method, lane line determining device, vehicle, medium and chip

Similar Documents

Publication Publication Date Title
CN109858307A (en) A kind of Lane detection method and apparatus
EP3620964B1 (en) Lane line processing method and device
CN109658454B (en) Pose information determination method, related device and storage medium
JP2022528301A (en) Calibration method, positioning method, equipment, electronic devices and storage media
CN106203418A (en) A kind of method and device of car plate detection
CN106485207A (en) A kind of Fingertip Detection based on binocular vision image and system
CN112801988B (en) Object grabbing pose detection method based on RGBD and deep neural network
CN112198878B (en) Instant map construction method and device, robot and storage medium
CN106980851B (en) Method and device for positioning data matrix DM code
CN105931261A (en) Method and device for modifying extrinsic parameters of binocular stereo camera
CN110378942A (en) Barrier identification method, system, equipment and storage medium based on binocular camera
CN107123138B (en) Based on vanilla-R point to the point cloud registration method for rejecting strategy
JP7121454B2 (en) Obstacle position simulation method, device and terminal based on statistics
CN112150538B (en) Method and device for determining vehicle pose in three-dimensional map construction process
CN108460333B (en) Ground detection method and device based on depth map
CN108376384A (en) Antidote, device and the storage medium of disparity map
CN111476062A (en) Lane line detection method and device, electronic equipment and driving system
CN104240247B (en) Building overlooking outline quick extraction method based on single picture
CN103871068B (en) A kind of high-precision calibrating method based on genetic algorithm
CN109147469B (en) Calligraphy practicing method
CN114973752B (en) License plate and parking space number association method and device, intelligent vehicle and readable storage medium
CN105550650A (en) Fingerprint security protection method and system
CN101403607B (en) Geometrical shape difference detection method and device for electronic map
CN110634136B (en) Pipeline wall damage detection method, device and system
CN111222514B (en) Local map optimization method based on visual positioning

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
TA01 Transfer of patent application right

Effective date of registration: 20200506

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 102200, No. 8, No., Changsheng Road, Changping District science and Technology Park, Beijing, China. 1-5

Applicant before: AUTONAVI SOFTWARE Co.,Ltd.

TA01 Transfer of patent application right