A kind of abnormal traffic state testing method based on vehicle movement vector field analysis
Technical field
The invention belongs to field of video detection, be specifically related to a kind of abnormal traffic state testing method based on vehicle movement vector field analysis.
Background technology
Countless traffic hazards are had to occur every year, one of frequent accidents Producing reason when wherein driving against traffic regulations.Therefore, utilize video monitoring to detect fast and accurately traffic events, become the problem that more and more people is concerned about.The target of intelligent video monitoring system monitors and understands occurent event in scene, and report to the police to anomalous event according to the requirement preset; According to namely will event to the state residing for moving target or position prediction, reduce the generation of hazard event.First be exactly that can real-time learning, the action trail pattern of understanding proper motion target, detects abnormal movement objective orbit on this basis.
Be upper up till now, defined a series of vehicle identification and classification methods utilizing the sensor such as infrared ray, radar to be means.These Method And Principles are simple, and clear physics conception is clear and definite, and implement and be easier to, but it is more complicated also to there is hardware system, the adaptive capacity to environment of system is poor, has the defects such as failure rate is higher, inconvenient maintenance, are difficult in actual use promote.Method means based on video method of difference of having powerful connections extracts moving vehicle, but under complex environment, the extraction of background, upgrade is a difficult problem always, also have impact on the quality extracting moving target to a great extent.
Summary of the invention
For shortcomings and deficiencies of the prior art, the object of the invention is to, there is provided a kind of based on vehicle movement vector field traffic incidents detection method, the method builds on the basis of vehicle movement track following, detect the abnormal track of vehicle within the scope of the road of video camera shooting, thus reach the object detecting abnormal traffic situation.
In order to realize above-mentioned task, the present invention adopts following technical scheme to be achieved:
Based on an abnormal traffic state testing method for vehicle movement vector field analysis, the method is carried out according to following steps:
Step one, obtain the video sequence image of video camera shooting, utilize block-based frame-to-frame differences method to detect moving region to a wherein two field picture, extract image characteristic point by existing Moravec angle point grid operator with the form of piecemeal, thus find out the unique point of moving region;
Step 2, adopts all direction search method and SAD block matching criterion, carries out search coupling at next frame to the unique point extracted, find new suitable unique point, the unique point of frame before and after connecting, frame vehicle movement orbit segment before and after being formed, and then the driving trace of moving vehicle is drawn by movement locus section;
Step 3, records the driving trace of all moving vehicles from all video sequence images of input;
Step 4, after recording the track that in video sequence, all moving vehicles travel, using the movement locus section of all composition vehicle movement tracks as the two-dimensional vector relative to screen, the direction of direction as this vector of the unique point of a rear frame is pointed to by the unique point of former frame, the vector formed by each orbit segment, as the vector of this orbit segment starting point, finally forms vehicle movement vector field;
Step 5, in conjunction with normal vehicle motion vector field, moving vehicle track under video monitoring is identified, the vehicle movement orbit segment that before and after monitoring video is every, two two field pictures are formed, this section of movement locus is regarded as the two-dimensional vector of relative screen, the block vector corresponding to normal vehicle motion vector field contrasts, if deviation exceedes threshold value A, and occur that the number of image frames of abnormal orbit segment exceedes threshold value B continuously, then this section of movement locus is abnormal orbit segment, otherwise this section of movement locus is normal trace section, wherein:
The span of described threshold value A is 25 ~ 40, and the value of described threshold value B is 5.
Of the present inventionly by vehicle movement vector field, traffic to be detected, compared with prior art, walked around complex background environmental restraint, can carry out detecting in real time, reliably to moving vehicles all in range of video.And be easy to realization, accuracy is higher, have broad application prospects.
Accompanying drawing explanation
Fig. 1 is the track following image of the 559th frame moving vehicle, 0,1,2 and 3 the 0th article of trajectory, the 1st article of trajectory, the 2nd article of trajectory and the 3rd article of trajectories representing pursuit movement vehicle respectively in figure.
After Fig. 2 is through 250 frames, the vehicle movement vector field that all tracks are formed.
After Fig. 3 is through 500 frames, the vehicle movement vector field that all tracks are formed.
After Fig. 4 is through 1000 frames, the vehicle movement vector field that all tracks are formed.
Fig. 5 (a), Fig. 5 (b) and Fig. 5 (c) represent from the 3780th frame to the modified line driving trace line of the tracking vehicle of the 3870th frame, and be tracking vehicle in black box in figure, in trajectory, black line is normal trace section, and white wire is abnormal orbit segment.
Fig. 6 (a), Fig. 6 (b) and Fig. 6 (c) represent the trajectory after contrasting from the 3780th frame to the modified line driving trace of the tracking vehicle of the 3870th frame and normal vehicle motion vector field, be tracking vehicle in black box in figure, in trajectory, black line is normal trace section, and white wire is abnormal orbit segment.
Below in conjunction with drawings and Examples, content of the present invention is described in further detail.
Embodiment
The present embodiment provides a kind of abnormal traffic state testing method based on vehicle movement vector field analysis, utilizes video to detect and the correlation technique of image procossing, the normal vehicle motion vector field calculated, thus realizes moving vehicle track and detect.Specifically follow these steps to carry out:
Step one, obtain the video sequence image of video camera shooting, utilize block-based frame-to-frame differences method to detect moving region to a wherein two field picture, extract image characteristic point by existing Moravec angle point grid operator with the form of piecemeal, thus find out the unique point of moving region;
Step 2, adopts all direction search method and SAD block matching criterion, carries out search coupling at next frame to the unique point extracted, find new suitable unique point, the unique point of frame before and after connecting, frame vehicle movement orbit segment before and after being formed, and then the driving trace of moving vehicle is drawn by movement locus section;
Step 3, records the driving trace of all moving vehicles from all video sequence images of input;
Step 4, after recording the track that in video sequence, all moving vehicles travel, using the movement locus section of all composition vehicle movement tracks as the two-dimensional vector relative to screen, the direction of direction as this vector of the unique point of a rear frame is pointed to by the unique point of former frame, the vector formed by each orbit segment, as the vector of this orbit segment starting point, finally forms vehicle movement vector field;
Step 5, in conjunction with normal vehicle motion vector field, moving vehicle track under video monitoring is identified, the vehicle movement orbit segment that before and after monitoring video is every, two two field pictures are formed, this section of movement locus is regarded as the two-dimensional vector of relative screen, the block vector corresponding to normal vehicle motion vector field contrasts, if deviation exceedes threshold value A, and occur that the number of image frames of abnormal orbit segment exceedes threshold value B continuously, then this section of movement locus is abnormal orbit segment, otherwise this section of movement locus is normal trace section, wherein:
The span of described threshold value A is 25 ~ 40, and the value of described threshold value B is 5.
Below provide specific embodiments of the invention, it should be noted that the present invention is not limited to following specific embodiment, all equivalents done on technical scheme basis all fall into protection scope of the present invention.
Embodiment:
Video sampling frequency in embodiment is 30 frames/second, and image size is 720 × 288.Successively the image in video sequence is processed according to method of the present invention.As shown in Figure 1, be the track following image of the 559th frame moving vehicle, 0,1,2 and 3 the 0th article of trajectory, the 1st article of trajectory, the 2nd article of trajectory and the 3rd article of trajectories representing pursuit movement vehicle respectively in figure,
In the video sequence known, after have passed through 250 frames, the vehicle movement vector field that all tracks are formed as shown in Figure 2; After 500 frames, the vehicle movement vector field that all tracks are formed as shown in Figure 3; After have passed through 1000 frames, by all trajectory clustering recorded, matching, draws in the road of this video capture, the normal running movement vector field of moving vehicle, as shown in Figure 4.At the 3780th frame of video in 3870 frames, occurred the moving vehicle of a modified line, its movement locus is as accompanying drawing 5(a), shown in Fig. 5 (b), Fig. 5 (c).The motion vector of moving vehicle and normal vehicle movement vector field are contrasted, as accompanying drawing 6(a), shown in Fig. 6 (b), Fig. 6 (c), judge that vehicle modified line travels.