Summary of the invention
The embodiment of the present invention provides a kind of vehicle at night detection method of making a dash across the red light, and is applicable to the detection of night traffic crossing running red light for vehicle.
For solving above technical matters, the present invention adopts following technical scheme to realize: the described vehicle at night detection method of making a dash across the red light comprises the steps:
1) surveyed area be set and detect virtual coil;
2) obtain continuous frame of video;
3) signal of beaming back according to the red signal transponder detection that judges whether to make a dash across the red light;
4) detect the taillight situation in virtual coil; Judge whether to carry out obtaining of the first width picture violating the regulations according to the variation of taillight situation;
5) obtaining of the detection of the light for vehicle after stop line and follow-up picture violating the regulations;
6) by synthetic one of three red light violation pictures, and show feature part.
In technical scheme the 1st) item arrange surveyed area and detect virtual coil, comprise the steps:
1) surveyed area setting: the track of detecting as required determines that the scope of video image processing, i.e. surveyed area, front and back comprise the region of three lengths of wagon after stop line the first two length of wagon and stop line.Width comprises the lane width that all needs detect;
2) virtual coil setting: in surveyed area, before the stop line in the track of detecting at needs, virtual coil 1 is set, width is lane width, and length is the length of a dolly; After the stop line in track detecting at needs, zebra stripes section start arranges virtual coil 2, and width is lane width, as reserved the width of zebra stripes without zebra stripes after, virtual coil 2 is set, and length is the length of a dolly.
In technical scheme the 2nd) obtain continuous frame of video, comprise the steps:
Obtain continuous video flowing by crossing video camera, transfer to center processor through optical transmitter and receiver, switch, carry out Video processing by center processor.
In technical scheme the 3rd) comprise the steps:
The red signal at crossing is received by the red signal transponder that is installed on crossing, transfers to center processor through optical transmitter and receiver, switch, is processed by center processor, determines that the behavior of making a dash across the red light of corresponding track being carried out to vehicle detects.
In technical scheme the 4th) comprise the steps:
1) set up light for vehicle information recording table in virtual coil 1, comprising: in pairs the distance of taillight and with lane width ratio, three looks of taillight (r, g, average b).
2), if current monitoring track is red light phase, detect all light for vehicles in virtual coil 1.
3) whether inquiry has taillight pair in the tail-lamp information record sheet of the track of red light phase.
4) as in tail-lamp information record sheet without taillight, check in present frame whether have the taillight pair that meets vehicle condition.If any, by this taillight to adding in tail-lamp information record sheet; As nothing, this two field picture processing finishes, and is empty in tail-lamp information record sheet.
5) as having taillight in tail-lamp information record sheet, in look-up table taillight to whether with taillight corresponding in present frame to coupling, in this way, taillight in updating form, if not, judges that this vehicle has rolled virtual coil 1 away from, starts high definition camera and captures the first width picture.
In technical scheme the 5th) comprise the steps:
The detection of the light for vehicle in virtual coil 2, light for vehicle and right the mating of taillight disappearing in aforementioned virtual coil 1, as the match is successful, be judged as vehicle and enter this region, starts high definition camera and capture follow-up two width picture violating the regulations.
In technical scheme the 6th) comprise the steps:
The consistent judgement of corresponding vehicle in three width pictures, is judged as the vehicle making a dash across the red light and belongs to same vehicle, and by a synthetic three width pictures width, and show vehicle tail car plate feature.
Scheme of the present invention, by the extraction of virtual coil 1, the 2 interior light for vehicles in surveyed area, mate with the information in record sheet, whether cross stop line and continue to travel when the red light phase place in corresponding track to judge vehicle, and start high definition camera and capture, form complete evidence, realize the detection of night to running red light for vehicle behavior.
Embodiment
In order to solve the running red light for vehicle test problems at night traffic crossing, the inventive example provides a kind of vehicle at night make a dash across the red light detection method and device.The track of detecting according to need, arranges suitable surveyed area and virtual coil.The red signal of passing back according to crossing determines whether corresponding track to detect.In the virtual coil of surveyed area, carry out the right detection of light for vehicle.Start high definition camera according to dependency rule and capture vehicle peccancy picture.
Below in conjunction with the drawings and specific embodiments, the inventive method is elaborated.
The vehicle at night providing for the embodiment of the present invention as Fig. 1 overhaul flow chart that makes a dash across the red light, comprising:
Step 101, region division, comprises surveyed area and virtual coil setting.In the time making a dash across the red light detection, only need in image, specific scope carry out vehicle detection, do not need view picture video image to process, the scope of video image processing is determined in the track of detecting as required, be surveyed area, front and back comprise the region of three lengths of wagon after stop line the first two length of wagon and stop line.Width comprises the lane width that all needs detect.
Virtual coil arranges: in surveyed area, before the stop line in the track of detecting at needs, virtual coil 1 is set, width is lane width, and length is the length of a dolly; After the stop line in track detecting at needs, zebra stripes section start arranges virtual coil 2, and width is lane width, as reserved the width of zebra stripes without zebra stripes after, virtual coil 2 is set, and length is the length of a dolly.As Fig. 2.
Step 102, obtains continuous video, obtains continuous video flowing by the video camera at crossing, transfers to center processor through optical transmitter and receiver, switch, carries out Video processing by center processor.
Step 103, transfers to center processor by red light information through optical transmitter and receiver, switch by the red signal transponder that is installed on crossing, is processed by center processor, determines that the behavior of making a dash across the red light of corresponding track being carried out to vehicle detects.
Step 104, detects virtual coil 1, records associated vehicle tail-lamp information, judges whether to carry out the candid photograph of the first width picture violating the regulations.
As shown in Figure 3, described step 104 specifically comprises:
Step 301, detects virtual coil 1 compared with bright area.In the lower environment of night illumination degree, light for vehicle is the most remarkable information of vehicle, replaces the detection of vehicle with the detection of taillight.Taillight is luminous in darker environment, forms brighter region in video image.This step is calculated the gray scale that is positioned at frame of video pixel in frame of video:
G, r, g, b gray-scale value, red color component value, green component values, the blue component value of represent pixel respectively in formula.Appropriate threshold th is set, and the pixel color component that is greater than this threshold value remains unchanged, and the pixel color component that is less than this threshold value is taken as 0
Step 302 is selected partially red region in brighter region.Because light for vehicle is red, calculate every connection compared with the partially red degree rm of bright area:
I is that field color is redder compared with the pixel in bright area, and this value is larger.Select suitable threshold value rth, for region retain as light for vehicle, for region remove.
Step 303, matches to inclined to one side red sector territory, forms region pair.In virtual coil, only have and can be matched to and still keep at the volley the taillight of coupling to just belonging to same light for vehicle, the taillight that is less than a certain threshold value for standoff distance is merged into one, be the taillight of merging into that longitudinal separation is less than a certain distance threshold, what left and right distance was less than a certain distance threshold also merges into a taillight.Calculate the distance of the taillight on same level line, if its horizontal range and lane width ratio can be judged to be compact car, in-between car and large car accordingly.
Step 304, to region to extract feature, as vehicle characteristics.Need the feature of extracting to comprise: the partially red degree (rm1, rm2) in the each taillight of taillight centering region, the ratio R of taillight regional center distance and lane width.
As shown in Figure 4, after the rear described step of step 304, also need to carry out carrying out:
Step 401, inquiry tail-lamp information table.
Step 402, tail-lamp information table does not record tail-lamp information, and there is not vehicle in virtual coil 1 before this two field picture.
Step 403, if having taillight in current frame image to eigenwert, counts this in tail-lamp information table.If no, except next frame image.
Step 404, continues the processing of next frame image.
As shown in Figure 5, in the time that tail-lamp information table is not sky, carry out:
Step 501, at inquiry tail-lamp information table.
Step 502, tail-lamp information table is not empty, there is taillight pair in virtual coil 1 before this two field picture.
Step 503, mates to information current light for vehicle with the tail-lamp information in tail-lamp information table.
As shown in Figure 6, after step 503, carry out:
Step 601, mates to information current light for vehicle with the tail-lamp information in tail-lamp information table.
Step 602, the match is successful.According to taillight feature:: by the partially red degree (r in each taillight region
m1, r
m2), taillight regional center distance is synthesized a vector (r with the ratio R of lane width
m1, r
m2, R), carry out vectorial spacing calculating:
For the taillight of current frame image is to eigenwert, for the taillight in tail-lamp information table is to eigenwert.If be less than certain threshold value apart from d, the match is successful.
Step 603, with current light for vehicle to the tail-lamp information in information updating tail-lamp information table.
Step 604, continues the processing of next frame image.
After step 503, when taillight characteristic information does not mate, carry out step as shown in Figure 7:
Step 701, mates to information current light for vehicle with the tail-lamp information in tail-lamp information table.
Step 702, the account form of employing step 602, is less than certain threshold value apart from d, and in present frame, taillight does not mate with the tail-lamp information recording in tail-lamp information record sheet information.
Step 703, the vehicle in current frame image is new car, originally the car in virtual coil 1 rolls away from.
Step 704, captures the first width picture, and starts the detection of next frame virtual coil 2.
Step 105, this step is only just carried out after step 704 occurs, and the detection that has started virtual coil 2 is carried out afterwards.This step detects in virtual coil 2 whether occur vehicle, and by the mating of the information of vehicles of the information of vehicles of appearance and preservation in virtual coil 1, judges that whether this car is from virtual coil 1, if carry out the candid photograph of follow-up picture violating the regulations.
As shown in Fig. 8, described step 105 specifically comprises:
Step 801, detects virtual coil 2 compared with bright area.Detection method is identical with step 301, repeats no more herein.
Step 802 is selected partially red region in brighter region.Method is identical with step 302, repeats no more herein.
Step 803, matches to inclined to one side red sector territory, forms region pair.Method is identical with step 303, repeats no more herein.
Step 804, to region to extract feature, as vehicle characteristics.Method is identical with step 304, repeats no more herein.
Step 805, mate the vehicle characteristics of extraction with the vehicle characteristics in virtual coil 1, if the match is successful sends and capture second and third width image, detect if mate the unsuccessful next frame of proceeding.
Step 106, merges three width pictures to form evidence picture.
As shown in Fig. 9, described step 106 specifically comprises:
Step 901, carries out vehicle coupling to captured three width images.Calculate the vehicles peccancy information in the time of red light phase place in three width images, and mate, if meet coupling requirement, judge the image that this three width image is same vehicle.
Step 902, the match is successful synthetic three width images and vehicles peccancy close-up image be piece image, this image is as evidence image violating the regulations.