A kind of retrograde detection method of vehicle on expressway and autoalarmTechnical field
The present invention relates to the vehicle abnormality behavioral analysis technology of field of intelligent video surveillance, more particularly to a kind of highwayThe retrograde detection method of upper vehicle and autoalarm.
Background technology
With the development of China's traffic transporting technology, the traffic administration operation way of poorly efficient traffic surveillance and control system and agingThe needs of the traffic technique of fast development can not much be met, and then as the bottleneck of restriction China's traffic transporting technology development.Intelligent Video Surveillance Technology is that vehicular traffic is inverse as a kind of simple, convenient, efficient, inexpensive, touchless monitoring technologyThe behaviors such as row, blocking cause traffic accident to have preferable prevention effect.Intelligent Video Surveillance Technology is modernizingTraffic, transport, security protection, police reconnaissance, prison monitoring, the safeguard protection of valuables, alarm, magnitude of traffic flow monitoring, office fieldNo worker monitor, the field such as remote monitoring of computer room is widely used.
Intelligent Video Surveillance Technology mainly has the advantage that:
1st, integrated cost is low.Only need one-time investment, it becomes possible to allow people to be solved from uninteresting, barren artificial monitoringTake off, nursed without special messenger, it is only necessary to when occurring abnormal alarm in monitoring, responded.In cost of labor increasinglyToday of height enterprise, undoubtedly save a large number of input and daily expenses.
2nd, testing result is objective, reliable.Under the mode manually monitored, monitored picture is stared at for a long time, and supervisor is easyFatigue, it is numb to picture, and intelligent monitoring can exclude the interference of this respect, once detecting has unusual condition in picture, you canAlarm is sent in real time, to be convenient for people to timely respond to.
3rd, it is easy to use.As long as the place for having network can just monitor, reception alarm signal, support remotely and local real-timeSignal receives, and supports the live signal of multiple spot, various ways to receive.
4th, monitoring video is stored on big capacity hard disk by intelligent monitoring technology, can easily be called, and is stored and is transported,Can be as the evidence of traffic violations.
The content of the invention
For above-mentioned technical problem, the present invention proposes that a kind of retrograde detection method of vehicle on expressway fills with automatic alarmPut.
In order to solve the above-mentioned technical problem, technical scheme is as follows:
A kind of vehicle on expressway drives in the wrong direction autoalarm, including image capture module, vehicle drive in the wrong direction detection module,Alarm flashing lamp, data transmission device, computer;
Described image acquisition module, alarm flashing lamp, data transmission device are connected with the retrograde detection module of vehicle, the meterCalculation machine is connected with data transmission device.
Further, the frame of video that the retrograde detection module of the vehicle gathers to image capture module detects;It is describedAlarm flashing lamp is used to receive the signal that the retrograde detection module of the vehicle is sent, and reminds vehicular traffic;The data transfer dressPut the video requency frame data for transmitting the retrograde detection module of the vehicle;
The computer is used to show, store the video requency frame data transmitted by the data transmission device.
Further, in addition to warning device, the warning device are controlled for sending alarm signal by computer.
A kind of vehicle on expressway drives in the wrong direction detection method, comprises the following steps:
4.1) the retrograde detection module of vehicle establishes rule of driving in the wrong direction:It is determined that need detecting the polygonal region of vehicle, vehicle justThe direction often travelled and the maximum angle for allowing vehicle to allow deviation normally travel direction;
4.2) moving vehicle is detected:The background constructing mixed Gaussian background mould of the frame of video collected to image capture moduleType;By current frame image and background image subtraction, when difference is more than certain value, it is believed that be motion pixel, motion pixel is returnedClass obtains moving vehicle;
4.3) track of vehicle and morphological analysis:
A) vehicle of present frame is traveled through, obtains profile, center of gravity, histogram and the Fourier spectrum feature of vehicle;
B) position being likely to occur according to vehicle in the position of frame, calculating vehicle in previous frame, finds a frame of videoIn all vehicles existing for these positions;
If vehicle c) can not be found, and the location of present frame vehicle is the position that vehicle enters detection zone,Then think that the normal vehicle operation is appeared in detection scene, assign globally unique label, add in normal tracking queue, continueThe detection of next vehicle, go to step a);
If vehicle d) can not be found, and present frame vehicle present position is the position that vehicle leaves detection zone, thenThink that the vehicle may drive in the wrong direction into scene, assign globally unique label, addition may drive in the wrong direction in vehicle platoon, go to stepa);
If vehicle e) can not be found, and not at the edge of polygonal region, then it is assumed that vehicle be blocked or and itsHe merges vehicle, puts it into queue undetermined, does not change its label, waits next frame to compare, goes to step a);
If f) finding one or more cars, the similarity of histogram similarity and Fourier spectrum feature is calculated,The similarity threshold of histogram similarity and Fourier spectrum feature is set, if there is no histogram similarity and Fourier's frequencySpectrum signature similarity is more than the vehicle of threshold value, then it is assumed that does not match, by the logical process for not finding vehicle, goes to stepa);
G) if one or more cars it is eligible, then select most like vehicle, be added into tracking queue,And imparting and label consistent before, their relative position is calculated, is driven in the wrong direction if present frame vehicle is in relative to previous framePosition, it is believed that the car there may be retrograde.
Further, also comprise the following steps after step g):The metamorphosis of the retrograde detection module analysis vehicle of vehicle,If the lasting tracking frame number of the vehicle is less than N frames, then it is assumed that historical track information is also not enough to confirm, goes to step a), such asFruit persistently tracks frame number and is more than or equal to N frames, randomly selects M frames and is judged, more than X frames or X frames (X≤M≤N) locates as long as havingIn retrograde position, then it is assumed that Current vehicle, which exists, to drive in the wrong direction, and the retrograde detection module of vehicle sends signal to the alarm flashing lamp, carriesAwake vehicular traffic.
The beneficial effects of the present invention are:The present invention is not only carried out to improve the accuracy rate for detection of driving in the wrong direction to previous frameDetection, also in nearest N frames, randomly select M frames and carry out comprehensive descision, exist only more than X frames or X frames and drive in the wrong direction, just judgeIt is retrograde, sends retrograde alarm.The present invention combines the histogram feature of vehicle and Fourier spectrum feature carries out more vehicle match,Improve the accuracy rate of matching.The present invention combine vehicle it is retrograde during the change in location that occurs and caused by the camera depth of fieldMetamorphosis judges to drive in the wrong direction, and can preferably eliminate the accuracy rate for due to influence caused by noise, improving detection.The present inventionLocal alarm and remote alarm are combined, when driving in the wrong direction, flashing lamp alarm is sent, reminds car to slow down, prevent from touchingHit, while alarm is sent to long-range assistant policeman, to timely respond to, and retrograde picture is stored, as punishing justification.
Brief description of the drawings
Fig. 1 is overview flow chart of the present invention;
Fig. 2 is track of vehicle of the present invention and morphological analysis flow chart;
Fig. 3 is the retrograde detection autoalarm structure chart of vehicle of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described further.
It is a kind of retrograde autoalarm of vehicle on expressway as shown in Figure 3, vehicle on expressway drives in the wrong direction automaticWarning device includes:The retrograde detection module of image capture module, vehicle, alarm flashing lamp, data transmission device, computer and reportAlert loudspeaker.Image capture module, alarm flashing lamp, data transmission device are connected with the retrograde detection module of vehicle, the calculatingMachine is connected with data transmission device, and alarm speaker is connected with computer.Above-mentioned image capture module and vehicle, which drive in the wrong direction, detects mouldBlock can be integrated in camera internal.This alarm flashing lamp connects the camera after integrated.When detecting that vehicle drives in the wrong direction, sendSignal gives alarm flashing lamp, sends retrograde alarm, for reminding vehicular traffic, front has vehicle and driven in the wrong direction;Camera passes through dataTransmitting device, the video requency frame data of retrograde picture is transferred to computer, and region of driving in the wrong direction is marked with red block, in picture upper rightAngle provides retrograde alarm signal.Computer receives the retrograde picture of vehicle in the video requency frame data of the data transmission device transmissionFace, and show, store the retrograde picture of vehicle;And alarm signal is sent by alarm speaker, prompt assistant policeman to be driven in the wrong direction,Take appropriate measures.
Embodiment one:
As depicted in figs. 1 and 2, the retrograde detection method of a kind of vehicle on expressway, it is formed and function declaration is as follows:
(1) the retrograde detection module of vehicle establishes the retrograde rule of vehicle:
Determine vehicle detection quadrilateral area, determine in quadrangle detection zone the direction of normal vehicle operation andIt is determined that vehicle is allowed to allow the maximum angle for deviateing normally travel direction.
(2) moving vehicle is detected:
The frame of video collected according to image capture module is background constructing mixture Gaussian background model;
By current frame image and background image subtraction, when difference is more than certain value, it is believed that be motion pixel;By motor imageElement, which is sorted out, obtains moving vehicle.
(3) track of vehicle and morphological analysis:
A) vehicle of present frame is traveled through, obtains profile, center of gravity, histogram and the Fourier spectrum feature of vehicle;Because carSpeed be it is limited, while camera collection frequency be 25 frames/s, so the distance that vehicle moves between adjacent two frameWithin the specific limits;
B) position being likely to occur according to vehicle in the position of present frame, calculating vehicle in previous frame, finds previous frameIn all vehicles existing for these positions;
If vehicle c) can not be found, and the location of present frame vehicle is the position that vehicle enters detection zone,Then think that the normal vehicle operation is appeared in detection scene, the car and its corresponding feature are added in tracking queue, and is assignedGlobally unique label is given, continues the detection of next vehicle, goes to a);
If vehicle d) can not be found, and present frame vehicle present position is the position that vehicle leaves detection zone, thenThink that the vehicle may drive in the wrong direction into scene, the car and its corresponding feature are added in the vehicle platoon that may drive in the wrong direction, and is assignedGlobally unique label, goes to a);
If vehicle e) can not be found, and not at the edge in region, then it is assumed that vehicle be blocked or with other vehiclesMerge, put it into queue undetermined, do not change its label, wait next frame to compare, go to a);
If f) finding one or more cars, using Pasteur's distance come the histogram between the vehicle that calculates and findThe similarity of similarity and Fourier spectrum feature, set the similarity threshold of histogram similarity and Fourier spectrum feature as0.2,0.2 vehicle is less than if there is no the Pasteur of histogram similarity and Fourier spectrum characteristic similarity distance, then is recognizedNot match, by the logical process for not finding vehicle, go to a);G) if one or more cars it is eligible, thenMost like vehicle is selected, is added into tracking queue, and imparting and label consistent before, calculate their relative positionPut, if present frame vehicle is in retrograde position relative to previous frame, it is believed that the car there may be it is retrograde, meanwhile, analyze carMetamorphosis because the change of the depth of field in scene be present, the change of vehicle form, which can also be used as to strengthen driving in the wrong direction, sentenceDisconnected foundation, compare the size of vehicle, if it is to be sailed near toward long journey to drive in the wrong direction, then it is assumed that during vehicle drives in the wrong direction, there is gradual changeSmall trend, if it is from remote toward nearly traveling to drive in the wrong direction, then it is assumed that during vehicle drives in the wrong direction, there is the trend become larger;In order to carryThe accuracy rate of high detection, reduce wrong report and judge, it is necessary to obtain more trace informations and strengthen driving in the wrong direction, for example, if the car continuesTracking frame number is less than 10 frames, then it is assumed that historical track information is also not enough to confirm, goes to a), if persistently track frame number more than etc.In 10 frames, randomly select 5 frames and judged, more than 3 frames or 3 frames be in retrograde position as long as having, then it is assumed that Current vehicle is depositedDriving in the wrong direction, the retrograde detection module of vehicle sends signal to the alarm flashing lamp, reminds vehicular traffic;And video requency frame data is led toCross data transmission device and transmit to computer and be used to store and show, when running into retrograde situation, and sent by alarm speakerAlarm signal, prompt assistant policeman to be driven in the wrong direction, take appropriate measures.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the artMember, without departing from the inventive concept of the premise, can also make some improvements and modifications, these improvements and modifications also should be regarded asIn the scope of the present invention.