Background technology
Along with The development in society and economy, the recoverable amount of automobile increases sharply, and owing to the traffic hazard that reasons such as driver cause is more frequent, has become an obstacle of restriction social development.Intelligence driver assistance technology is the minimizing traffic hazard, improves conevying efficiency, alleviates one of approach of driver's work load, has caused the extensive interest of increasing research institution both at home and abroad and automobile research and development, production firm.The lane departure warning system is an importance of intelligent DAS (Driver Assistant System) research, the ultimate principle of lane departure warning system: system obtains the geological information of lane line by imageing sensor, obtain the necessary vehicle movement parameter of decision making algorithm such as the speed of a motor vehicle, Vehicular turn state etc. by the vehicle movement parameter sensor, system judges whether to take place deviation according to the correlation parameter of these coupling system settings as a result.Some achievements that the development of lane departure warning system has both at home and abroad at present obtained see document Jia Xin for details, the research of the traffic lane line recognition methods in the intelligent vehicle visually-perceptible, Jilin University's PhD dissertation, p6-13,2008.10; And document: Dong Yinping, the algorithm research of Automotive Highway Lane Departure Warning System, Jilin University's doctorate paper, p3-11,2004 is described.
In the lane departure warning system, the suitable early warning moment of determining of the key of the decision-making of deviation distance reports to the police to the driver, reduces unnecessary mistake police when guaranteeing in good time and accurate the warning.Present deviation decision-making mainly contains several: the decision-making technique that departs from based on TLC (the Time to Lane Crossing) decision-making technique of estimating to depart from the time, based on prediction locus, based on the current location of vehicle in the track (Cars Current Position, CCP).Above several method needs information such as the kinematic parameter sensor acquisition speed of a motor vehicle, wheel steering and vehicle turn signal, sensing equipment costliness, model complexity, many, the calculation of complex of algorithm parameter.Sensors such as radar, laser, ultrasound wave, infrared ray carry out the perception road environment relatively, and visual sensing system can obtain higher, more accurate, abundanter road structure environmental information.In real life, the driver can obtain environmental information more than 80%, for example traffic sign, traffic signals, lane line, road shape, vehicle, barrier etc. by vision.On the other hand, the vision sensor expense is cheap, and volume is little, and image processing algorithm has characteristics such as pliability and adaptive faculty be strong.Therefore vision driver assistance technology has broad application prospects in intelligent vehicle.
Summary of the invention
The invention provides a kind of deviation range observation and method for early warning based on monocular vision, this method utilizes image processing techniques to handle the video image that collects, finish lane line detection, extract the geological information of lane line, utilize pinhole imaging system model and solid geometry transformation relation to obtain the distance of automobile, and set up a kind of early warning decision method that departs from according to the deviation distance to left and right lane line.
Technical solution of the present invention is as follows
A kind of deviation range observation and method for early warning based on monocular vision comprise following step:
Step 1: video acquisition device is installed in the vehicle mirrors below, when video acquisition device is installed, should guarantees that video acquisition device can obtain vehicle front lane line image clearly.
Step 2: the demarcation of the inside and outside parameter of video acquisition device.
Step 2-1: demarcate the inner parameter of video acquisition device, described inner parameter comprises the focal distance f of the horizontal direction of video acquisition device
x, the vertical direction focal distance f
yWith collection video image centre coordinate (u
0, v
0) with the position of vehicle axis system relation.
Step 2-2: demarcate the external parameter of video acquisition device, described external parameter comprises the angle of pitch φ and the deflection of video acquisition device
Video camera is installed on the vehicle, is parked in then on two parallel tracks, utilize detected straight line to calculate the angle of pitch φ of video camera, deflection
(see document Ender Kivanc Bas for details, Jill D.Crisman.An Easy to Install Camera Calibration for Traffic Monitoring.IEEE Intelligent Transportation System, 1997.ITSC ' 97.)
Step 3: the video image that collects is carried out lane line detect.
Step 3-1: image binaryzation and rim detection.At first the coloured image that collects is changed into gray level image, use maximum variance between clusters (Ostu) to obtain adaptive threshold then, according to this adaptive threshold gray level image is carried out binary conversion treatment again, utilize the difference boundary operator at last
Make rim detection to extract the edge of lane line both sides.
Step 3-2: utilize improved Hough change detection lane line.
Hough is a kind of line detection method of extensive employing, the present invention in order to reduce since the straight line that the false class peak that Distribution Effect produces leads to errors extract, conversion improves to Hough, has added between local peaking restriction and the parameter minor increment constraint condition Hough territory is screened.Specifically: be 1 point (x at step 3-1 gained all pixel values in the binary image of rim detection, y), pass through peak point that the Hough conversion obtains with H (ρ, θ) (wherein ρ represents pole axis in expression, θ represents polar angle), H (ρ, θ) in the parameter space local peaking of each unit and adjacent peakedness ratio, when comparative result satisfies H (ρ, θ) 〉=H (ρ ± 1, θ ± 1) time, with this peak value be kept at H ' (ρ, θ)=H (ρ, θ), to not satisfy H (ρ, θ) 〉=unit of H (ρ ± 1, θ ± 1) is changed to zero; Utilize then between parameter minor increment to H ' (ρ, θ) peak value in carries out programmed screening, the search maximal value in minor increment window [(ρ ± w, θ ± w)] (window value of w for setting) also keeps, other non-maximal value is changed to zero; (ρ, (ρ θ) carries out descending sort by group to press the big young pathbreaker of pole axis ρ in θ) at H ' at last.
Step 4: the lane line parameter extraction of vehicle and arranged on left and right sides.According to the travel situations of vehicle in current track, according to the relation between pole axis ρ, polar angle θ, (ρ determines the lane line parameter of current and arranged on left and right sides in θ) at parameter matrix H '.Specifically:
Get parameter matrix H ' (ρ, θ) in first group of (ρ
1, θ
1) as article one lane line parameter, work as θ
1>0 o'clock is left-hand lane line parameter, works as θ
1<0 o'clock is right-hand lane line parameter.
When normal vehicle operation, (ρ, (ρ θ) begins to select to satisfy θ * θ from second group in θ) at parameter matrix H '
1One group of parameter of<0 is as the parameter of second lane line; When vehicle was crossed over the track, (ρ, (ρ θ) began to select to satisfy θ * θ from second group in θ) at H '
1One group of parameter of>0 is as second lane line parameter.
Step 5, utilize the slope of lane line to calculate the deviation distance of vehicle in the track.
The image that collects in the vehicle ' process is carried out real-time detection frame by frame,, calculate the slope k of left and right two lane lines in track, current vehicle place according to the lane line parameter that obtains in the step 4
1, k
2, slope k
1, k
2The value left and right lane line parameter that equals in the step 4 to obtain (ρ, θ) in the tangent value tan (θ) of polar angle.As shown in Figure 4, the vertical demension measurement formula that utilizes the pinhole imaging system model to derive is with slope k
1, k
2And the angle of pitch φ that obtains in the step 2, deflection
And in the width W substitution formula (1) in track, (2), obtain vertical range dl, the dr of vehicle to left and right lane line.
The foundation of step 6, lane departure warning decision-making.According to the deviation distance that step 6 obtains, straight line polar angle parameter θ when dl<D and left side
L>λ
LThe time, trigger left avertence from departing from alarm; Straight line parameter polar angle θ when dr<D and right side
R>λ
RThe time, trigger right avertence from departing from alarm, remind the driver possibility that departs to be arranged, the driving of taking care.Wherein, distance threshold D, angle threshold λ
L, λ
RChoose according to the driver safety requirements, reaction time, the decision of car brakeing lamp combined factors.
In the technique scheme, of particular note:
1, video acquisition device described in the step 1 can adopt CCD or cmos camera; When video acquisition device is installed, video acquisition device is installed in vehicle mirrors place and parallel with the along slope coordinate axle of car body, the displacement of cross-car coordinate is zero relatively, can reduce like this because the camera position skew influences the vehicle shift range measurements.
When 2, the step 3 pair video image that collects carries out the lane line detection, because 1/3rd part is the interfere information that comprises sky, trees, nameplate, buildings on the video image of gathering, road and lane line are positioned at 2/3rds parts under the video image of collection, therefore in order to reduce calculated amount, following 2/3rds parts that can select to gather video image are as area-of-interest and carry out step 3-1 and the processing of step 3-2.
3, in the step 2, intrinsic parameters of the camera is demarcated, and generally therefore intrinsic parameters of the camera parameter constant after demarcating has adopted the mode of carrying out camera calibration under the line.The scaling method of inner parameter is more, generally can use general calibration tool to carry out the demarcation of inner parameter, as the Matlab camera calibration tool box of the calibration function among the computer vision storehouse OpenCV that increases income of Intel Company, California Institute of Technology visual experiment chamber, the Easy Camera Calibration tool box of Microsoft etc., the outcome record that calibrates is got off.For the external parameter of video camera, do not consider the side rake angle of video camera, it can be made as zero, therefore only need to demarcate angle of pitch φ, deflection
Get final product.
4, in the step 3, according to the testing result of Hough conversion, (ρ has chosen the point of 10 maximums as candidate's lane line parameter in θ) at peak set H '; The span of setting window value w among the step 3-1 is [3,6].
5, in the step 5, vehicle is to the vertical range of lane line, and this distance should deduct width of the carbody for the vertical range of vehicle-mounted vidicon to left and right sides lane line in the application of reality, so just can obtain the distance of left and right vehicle wheel both sides and lane line.
The invention has the beneficial effects as follows:
The present invention utilizes image processing techniques to handle the video image that collects, based on Hough conversion finish lane line detection, extract the geological information of lane line, utilize pinhole imaging system model and solid geometry transformation relation to obtain the distance of automobile, and set up a kind of early warning decision method that departs from according to the deviation distance to left and right lane line.Wherein Hough change detection lane line has been added constraint condition, it is very fast to get rid of a part false lane line and arithmetic speed like this, improves the accuracy that lane line detects; Use the monocular vision images acquired, realize that by the slope and the width in track of lane line visual pattern finds range, can only utilize image information and can realize lane departure warning without other sensor; Vehicle driftage angle is little and use solid geometry method of changing derivation speed fast to the measurement influence of deviation distance, can satisfy the requirement of intelligent driver assistance technology.
Embodiment
Adopt method of the present invention, provide the example of an indefiniteness, further specific implementation process of the present invention is described in conjunction with Fig. 1, Fig. 2, Fig. 3, Fig. 4, Fig. 5.The present invention realizes in the lane departure warning system that Matlab/Simulink builds, gather video image on highway.Used experimental facilities is all the common apparatus on the market, and some current techiques such as image acquisition, the image transformation etc. of use no longer are described in detail.
Embodiments of the present invention are as follows:
1. the demarcation of camera parameters and installation carried out the demarcation (inner parameter that this example uses the Matlab camera calibration tool box of California Institute of Technology's visual experiment chamber exploitation to carry out is demarcated) of intrinsic parameters of the camera according to step 2-1, then set by step
1, the video camera that will demarcate of step 2-2 is installed on the vehicle, and calibrates external parameter.
2. the detection of lane line and and arranged on left and right sides lane line parameter extraction are determined the parameter of straight line according to step 3, step 4.
3. utilize the slope of lane line to calculate the deviation distance of vehicle in the track, according to step 5 with each parameter bring formula (1) into, (2) obtain the vertical range of vehicle to the track.
Lane departure warning decision-making according in the step 6, to safety requirements, reaction time, car brakeing lamp factor setting threshold, when the real-time results that obtain do not satisfy preset threshold and require, triggers alarm according to the driver, reminds driver's driving of taking care.