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 the research and development of increasing domestic and international research institution and automobile, 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 through imageing sensor; Obtain the necessary vehicle movement parameter of decision making algorithm such as the speed of a motor vehicle, Vehicular turn state etc. through 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 traffic lane line Study of Recognition Method 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 said.
In the lane departure warning system, the suitable early warning moment of confirming of the key of the decision-making of deviation distance reports to the police to the driver, when guaranteeing in good time and accurate the warning, reduces unnecessary mistake police.Present deviation decision-making mainly contains several kinds: 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, and sensing equipment is expensive, model is complicated, algorithm parameter is many, calculation of complex.Relatively sensors such as radar, laser, ultrasound wave, infrared ray carry out the perception road environment, that visual sensing system can obtain is higher, more accurately, abundanter road structure environmental information.In real life, the driver can obtain the environmental information more than 80% through vision, for example traffic sign, traffic signals, lane line, road shape, vehicle, barrier etc.On the other hand, the vision sensor cost, 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 present invention provides a kind of deviation range observation and method for early warning based on monocular vision; The video image that this method utilizes the image processing techniques processing collected to arrive; Accomplish 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 scheme of the present invention is following
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, said 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, said external parameter comprises the angle of pitch φ and the deflection
of video acquisition device
Video camera is installed on the vehicle; Be parked in then on two parallel tracks; Utilize detected straight line to calculate the angle of pitch φ of video camera; Deflection
(sees 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 difference boundary operator
to make rim detection at last 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 type 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: to step 3-1 gained all pixel values in the binary image of rim detection be 1 point (x, y), (ρ θ) representes that (wherein ρ representes pole axis with H pass through the peak point that the Hough conversion obtains; θ representes polar angle), H (ρ, θ) local peaking of each unit and adjacent peakedness ratio be in the parameter space; When comparative result satisfy H (ρ, θ) >=during H (ρ ± 1, θ ± 1); 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 ' (ρ, the 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 θ, (ρ confirms 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 deviation distance of slope calculating vehicle in the track of lane line.
Image to collecting in the vehicle ' process carries out real-time detection by frame, according to the lane line parameter that obtains in the step 4, calculates the slope k of left and right two lane lines in track, current vehicle place
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.Vertical demension measurement formula as shown in Figure 4, as to utilize 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, what need special instruction is:
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; Like 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.External parameter for video camera; Do not consider the side rake angle of video camera; Can it be made as zero, therefore only need demarcation angle of pitch φ, deflection
to get final product.
4, in the step 3, according to the testing result of Hough conversion, peak set H ' (ρ, the point of having chosen 10 maximums in θ) is as candidate's lane line parameter; 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 video image that the present invention utilizes the image processing techniques processing collected to arrive; Based on the Hough conversion accomplish 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 through 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 instance of an indefiniteness, further practical 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, on highway, gathers video image.Used experimental facilities is all the common apparatus on the market, and some current techiques such as IMAQ, the image transformation etc. of use no longer are described in detail.
Embodiment of the present invention is following:
1. the demarcation of camera parameters and installation carried out the demarcation (inner parameter that this instance 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 confirmed the parameter of straight line according to step 3, step 4.
3. utilize the deviation distance of slope calculating vehicle in the track of lane line, 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.