The lane line of vehicular autonomous navigation detects and tracking
Technical field
The present invention relates to the self-service air navigation aid of a kind of intelligent vehicle, the especially a kind of lane line that can handle the vehicular autonomous navigation of any crankcase ventilaton detects and tracking.
Background technology
In recent years, fast development along with China's economic construction, the population in city and communications and transportation are also flourish, these development have promoted the convenience of people-to-people contacts and material exchange greatly, the following negative effect that becomes increasingly conspicuous that also produced, such as frequent traffic congestion, road block and the traffic hazard etc. that occur, these negative effects are more and more seriously perplexing each metropolitan traffic.Point out that according to China's traffic survey report in recent years the mortality ratio that the traffic hazard of China causes is higher than developed country and some developing country far away.At above-mentioned serious day by day transport need; except utilizing Limited resources financial resources and environmental protection pressure; consider the fast development of urbanization science and technology process, intelligent transportation system (ITS-Intelligent Transportation Systems) is arisen at the historic moment.
What ITS mainly considered on the whole is the combination of driver, the vehicles and road, environment three aspect factor.Broadly, ITS comprises intelligent planning, design, enforcement and the operation etc. that realize traffic system, thereby then mainly be modern high technology to be combined with traffic and transportation system traditional traffic and transportation system is improved narrowly, form a kind of novel modern transportation system.Particularly, ITS be with advanced integrated applications such as electronic technology, infotech, sensing technology and system engineering technology on more perfect road equipment basis, thereby set up a kind of real-time precise and high efficiency, the comprehensive traffic management system that plays a role.It has taken full advantage of the condition of existing traffic infrastructure, has alleviated traffic congestion, has improved conevying efficiency, has ensured traffic safety.
At present, the traffic surveillance and control system among the ITS has adopted computer vision and image processing techniques more and more widely, and at traffic hazard day by day frequently, the intelligent vehicle navigation system also grows up thereupon gradually.The intelligent vehicle navigation system just refers to that information translation when vehicle travels that the driver is received is photoelectric image information, and machine respective handling as calculated can produce rational behavior planning and decision-making in complex environment again.In the intelligent vehicle navigation system, the detection of lane line and tracking are an one basis and important function, in addition, consider structuring characteristic (the so-called structuring of present road, showing the way on the face significantly exactly, pavement marker satisfies stronger geometric properties, interruption markings and continuous mark line etc. such as double amber lines in the road or white), detection and tracking with lane line can obtain lane line information easily, guarantee to travel or change the accuracy in track, improve the reliability of intelligent vehicle navigation system greatly.
Existing lane line detection and tracking method can be summed up as following three classes: based on the method in zone, based on the method for feature and based on the method for model.And be the lane line detection and follow the tracks of modal a kind of method based on the method for model, this method uses certain geometric model that lane line is carried out characterization, that is: use known model, for example coupling work that target image is correlated with such as straight line, para-curve, serpentine.And be lane line to be made straight line handle more widely based on using in the model method, and at straight-line detection preferably disposal route be the Hough conversion, this method is insensitive to noise, can handle the situation that the object part is blocked and covers in the image preferably.It is following not enough that but this method remains down: the required memory capacity of the first, Hough conversion is big, in case parameter space increases, calculated amount just can sharply rise, and expends huge storage space simultaneously; The second, huge calculated amount also can cause detection speed too slow, can't accomplish real-time control; The 3rd, precision is not high enough, and the information of expectation detects less than making false judgment on the contrary, and then produces a large amount of redundant datas; The 4th, need carry out one-to-many mapping and the exhaustive search operation of image space and parameter space, so that it calculates required time and space complexity is all very high, thereby increased time of lane line detection.
Summary of the invention
The present invention is in order to solve the above-mentioned technical matters of existing in prior technology, to provide a kind of lane line that can handle the vehicular autonomous navigation of any crankcase ventilaton to detect and tracking.
Technical solution of the present invention is: 1. the lane line of a vehicular autonomous navigation detects and tracking, it is characterized in that carrying out as follows:
Agreement: I refers to handled video frame images; M, n be line number and the columns of presentation video respectively; (o p) deposits in the image I each pixel p with respect to the fuzzy connection degree of seed point o to array f
Formation Q is used for depositing the pixel value of waiting to ask for fuzzy connection degree; T is used for relatively judging for extracting the set higher value of road point; DELETE_ANGLE is threshold value, is used for the choice operation of Vector Lane angle value;
A. initial setting up
Obtain video frame images and variable is carried out the initialization setting;
B. fuzzy connection degree is handled
B.1 the line number of reading images and columns arrange in the image I each pixel with respect to the fuzzy connection degree of seed point o
Be 0, namely (o is zero p) to f; The fuzzy connection degree that seed point is set is 1;
B.2 the neighbours territory point of o is put in the middle of the formation Q;
B.3 if formation Q is empty, then change b.6 step over to; Otherwise, from Q, shift out a pixel p;
B.4 if f (o, p) less than for extracting the threshold value T of road point setting, then the maximum path of each neighborhood d of pixel p is:
B.5 if
, so
, and all are satisfied
Pixel q insert formation Q; Change over to b.3;
B.5 for all pixel p, if (o p) greater than zero, judges that then p is the pixel on the road to its fuzzy connection degree f, and its gray-scale value is 1; Otherwise, judge that p is not the pixel on the road, its gray-scale value is zero;
C. Edge extraction and refinement
Convert image I to I ' by OpenCV from tape function cvCanny and parallel thinning algorithm;
D.Vector Lane algorithm
D.1 use 3 horizontal lines with image I ' be divided into 4 parts;
D.2 utilize sweep trace bottom-up, from the centre to both sides, line by line scan, find two initial control point of road, left and right sides route respectively
D.3 make up the vector of left and right sides road respectively
D.4 calculate the curvature of road line boundary according to following formula:
D.5 judge
Whether greater than a certain angle DELETE_ANGLE that sets in advance, if greater than, then this point is not starting point on both sides of the road, need proceed to scan, till finding starting point;
E. marginal point extracts
E.1 continue upwards to scan to both sides successively respectively from mid point, finding pixel value is 255 point
, with
Carry out calculating of vector value
E.2 advance to calculate this curvature and last one difference of curvature constantly respectively:
,
E.3 if the gained result
Greater than DELETE_ANGLE, then
Not the gained reference mark, need to continue left or scanning to the right, scan at 255 and still calculate by said process afterwards;
E.4 if this line scanning is counted and surpassed 5 and still do not have point up to specification, then continue upwards to scan, till finding point up to specification;
F. utilize the NUBS method to carry out match at above-mentioned resulting reference mark;
G. repeat b ~ f, finish up to the video frame images processing.
The present invention at first is converted to gray level image with frame of video, describes locally-attached tightness degree of each point in the image with bluring connection degree and membership function, extracts the general profile of road; Secondly, utilize Canny operator extraction edge, use thinning algorithm that image is carried out refinement, utilize line of vector to detect the road edge reference mark then; At last, utilize non-consistent B spline interpolation (NUBS) that the road edge point is carried out match, namely utilize control vertex to calculate the match summit.Experimental result shows that method of the present invention has reduced shade or other interference of noise owing to considered gray scale, the gradient feature of road, has higher accuracy rate, and the probability of successful inspection vehicle diatom is 92% in the detection of 50 width of cloth images.
Compared with prior art, the present invention has following beneficial effect:
The first, fuzzy connection degree and membership function have been described the connectedness in point-to-point transmission feature correlation and zone from the angle of the overall situation.Before carrying out rim detection, earlier road is blured to connect and handle, can detect abundant more lane line information, be conducive to improve the quality at the reference mark that selects.And fuzzy connection degree can partly be cast out the non-road in distant view zone, comes out thereby avoid that the image in the distant view zone is used as Road Detection;
The second, except can be at different situations with comparalive ease the analysis image, the framework that extracts image by image thinning can keep the basic topological structure of its original-shape constant in compression raw image data amount;
The 3rd, the method for line of vector can be crossed over the little breakpoint that is formed by tree shade or other noise, and non-consistent B spline interpolation is the road mark line of match different shape well, thereby makes method of the present invention have stronger robustness.
Description of drawings
Fig. 1 is that the embodiment of the invention is at the lane line testing result figure under the road surface shade situation.
There is lane line testing result figure under the barrier situation of the place ahead in Fig. 2 for the embodiment of the invention.
Fig. 3 is the lane line testing result figure under the embodiment of the invention left-hand bend situation.
Fig. 4 is the lane line testing result figure under the embodiment of the invention exists a small amount of shade situation.
Fig. 5 is the lane line testing result figure under the embodiment of the invention exists a large amount of shade situations.
Fig. 6 is the frame scan testing result figure of embodiment of the invention part lane line coordinate, curvature and accuracy rate.
Fig. 7 is that the lane line of the embodiment of the invention and classical Vector Lane method detects accuracy rate comparative analysis figure.
Embodiment
Method of the present invention comprises four-stage altogether: the fuzzy processing of connection degree, rim detection and refinement, Vector Lane algorithm and non-consistent B spline interpolation.
Agreement: I refers to handled video frame images; M, n be line number and the columns of presentation video respectively; (o p) deposits in the image I each pixel p with respect to the fuzzy connection degree of seed point o to array f
Formation Q is used for depositing the pixel value of waiting to ask for fuzzy connection degree; T is used for relatively judging for extracting the higher value that arranges; DELETE_ANGLE is threshold value, is used for the choice operation of Vector Lane angle value.
Concrete steps are as shown in Figure 1:
Agreement: I refers to handled video frame images; M, n be line number and the columns of presentation video respectively; (o p) deposits in the image I each pixel p with respect to the fuzzy connection degree of seed point o to array f
Formation Q is used for depositing the pixel value of waiting to ask for fuzzy connection degree; T is used for relatively judging for extracting the set higher value of road point; DELETE_ANGLE is threshold value, is used for the choice operation of Vector Lane angle value;
A. initial setting up
Obtain video frame images and variable is carried out the initialization setting;
B. fuzzy connection degree is handled
B.1 the line number of reading images and columns arrange in the image I each pixel with respect to the fuzzy connection degree of seed point o
Be 0, namely (o is zero p) to f; The fuzzy connection degree that seed point is set is 1;
B.2 the neighbours territory point of o is put in the middle of the formation Q;
B.3 if formation Q is empty, then change b.6 step over to; Otherwise, from Q, shift out a pixel p;
B.4 if f (o, p) less than for extracting the threshold value T of road point setting, then the maximum path of each neighborhood d of pixel p is:
B.5 if
, so
, and all are satisfied
Pixel q insert formation Q; Change over to b.3;
B.5 for all pixel p, if (o p) greater than zero, judges that then p is the pixel on the road to its fuzzy connection degree f, and its gray-scale value is 1; Otherwise, judge that p is not the pixel on the road, its gray-scale value is zero;
C. Edge extraction and refinement
Convert image I to I ' by OpenCV from tape function cvCanny and parallel thinning algorithm;
D.Vector Lane algorithm
D.1 use 3 horizontal lines with image I ' be divided into 4 parts;
D.2 utilize sweep trace bottom-up, from the centre to both sides, line by line scan, find two initial control point of road, left and right sides route respectively
D.3 make up the vector of left and right sides road respectively
D.4 calculate the curvature of road line boundary according to following formula:
D.5 judge
Whether greater than a certain angle DELETE_ANGLE that sets in advance, if greater than, then this point is not starting point on both sides of the road, need proceed to scan, till finding starting point;
E. marginal point extracts
E.1 continue upwards to scan to both sides successively respectively from mid point, finding pixel value is 255 point
, with
Carry out calculating of vector value
E.2 advance to calculate this curvature and last one difference of curvature constantly respectively:
,
E.3 if the gained result
Greater than DELETE_ANGLE, then
Not the gained reference mark, need to continue left or scanning to the right, scan at 255 and still calculate by said process afterwards;
E.4 if this line scanning is counted and surpassed 5 and still do not have point up to specification, then continue upwards to scan, till finding point up to specification;
F. utilize the NUBS method to carry out match at above-mentioned resulting reference mark;
G. repeat b ~ f, finish up to the video frame images processing.
Experiment test and parameter setting:
Experiment is to carry out under the Visul C++ environment in conjunction with the OpenCV instrument, testing involved all is that resolution is the coloured image of 256 * 240 pixels, can download from following website: http://vasc.ri.cmu.edu//idb/html/road/may30_90/index.html.
Road surface shown in Figure 1 exists under the situation of shade, and the embodiment of the invention is to the testing result of lane line, and wherein (a) fuzzy connection degree is handled; (b) reference mark is chosen; (c) testing result.
Figure 2 shows that the place ahead exists under the barrier situation, the lane line testing result of the embodiment of the invention, wherein (a) fuzzy connection degree is handled; (b) reference mark is chosen; (c) testing result.
Figure 3 shows that the embodiment of the invention was to the testing result of lane line when road existed to turn left, wherein (a) is original graph; (b) fuzzy connection degree is handled; (c) reference mark is chosen; (d) testing result.
When Figure 4 shows that the shade that has a small amount of scenery on every side, the testing result of the embodiment of the invention.
Shown in Figure 5 then is to exist under the situation of a large amount of scenery shades in the scene, the detection knot of the embodiment of the invention
Really.
Fig. 6 has shown the frame scan testing result of part lane line coordinate, curvature and accuracy rate.
The lane line that Figure 7 shows that the embodiment of the invention and classical Vector Lane method detects accuracy rate relatively.