Journal of Computer and Communications
Vol.03 No.11(2015), Article ID:61270,6 pages
10.4236/jcc.2015.311003
Analysis of Abnormal Vehicle Behavior Based on Trajectory Fitting
Enyuan Jiang, Xuejun Wang
College of Communication Engineering, Jilin University, Changchun, China



Received August 2015

ABSTRACT
In order to analysis the abnormal vehicle behavior by trajectory fitting effectively, the whole process is divided into three steps: target detection and tracking, vehicle trajectory analysis, vehicle behavior detection. Firstly, a three-frame-differencing method is used to achieve initial target location and an improved tracking algorithm based on Kalman predictor is proposed; then, an adaptive segmented linear fitting algorithm is proposed to achieve vehicle trajectory fitting; finally, two parameters including the rate of velocity variation and the rate of direction variation are used to establish vehicle abnormal behavior detection model. Experiment result shows that the three high dangerous vehicle behaviors in road surveillance videos can be detected effectively: sharp brake, sharp turn, and sharp turn brake.
Keywords:
Target Detection, Target Tracking, Trajectory Fitting, Vehicle Behavior Detection

1. Introduction
Nowadays traffic surveillance systems are widely used on highways and city roads. And the traditional manual surveillance watching cannot meet the needs of analyzing the huge amount of video data. Using the “intelligent” computer to discover the abnormal behavior in surveillance video becomes more important and gets more attention [1]-[3].
Recently, many scholars have done their own research works in this field. Zhao, Y.T., Li, X.Y. and Luo, D.H. [4] used the vehicle's tracking trajectory to separate the vehicles behavior into four elements: forward, backward, stop, left or right and then a vehicle behavior model is built based on them. Wang, W.G. and Ma, R. G. [5] proposed a weighed support vector machine (SVM) method based on the importance of the samples to solve the low detection problem caused by imbalanced samples. Liu, Q.C., Lu, J. and Chen, S.Y. [6] proposed a traffic incident detection method based on the random forest. Amin, M.S., Reaz, M. B. I. and Nasir, S. S. [7] proposed an incident detection and location method by fusing vehicle acceleration and GPS data.
To analysis abnormal vehicles behavior effectively, the whole process is divided into three steps in this paper: Firstly, a three-frame-differencing method and the improved tracking algorithm based on Kalman predictor are proposed to track vehicle. Then, an adaptive segmented linear fitting algorithm based on the least square method is proposed to achieve vehicle trajectory fitting which can reduce the amount of computation. Finally, two parameters including the rate of velocity variation and the rate of direction variation are used to establish vehicle abnormal behavior detection model. So the three highly dangerous vehicle behavior including sharp brake, sharp turn and sharp turn brake in surveillance video can be detected effectively.
2. Target Detection and Tracking
Vehicle motion parameters will affect the detection of the abnormal vehicle behavior directly. The Kalman and the Camshift algorithm [8] can improve the tracking result, but it needs to initialize the search window manually and the computation is complex. Aiming at this shortage, we make a further improvement as below.
2.1. Three-Frame-Differencing
In traditional Camshift algorithm [9], we must manually locate the initial position of a target, this artificial selection may introduce extra background color information and affect the tracking results. The three-frame-dif- ferencing method can locate the initial position automatically, and let this position as the initial window in the later Camshift algorithm.
This method is as follows: suppose
,
and
are three consecutive frames, and respectively calculate the difference between
and
and between
and
to get the difference images
and
. Then the binary images
and
is obtained
through a proper threshold T and use logic “and” operation to get a binary image
. From the binary image
the contour can be extracted, and the initial window in Camshift algorithm is obtained. The process of three-frame-differencing is shown in Figure 1.
2.2. Improved Tracking Algorithm Based on Kalman Predictor
Kalman predictor [10] is an optimal estimation based on least error covariance, and the actual motion parameters are modified by the estimated value of future motion state. It can improve the tracking result in Camshift algorithm effectively when the target moves fast or it is partially occluded. The formula of occlusion judging is as follows.
Figure 1. Diagram of three-frame-differencing.
(1)
is Bhattacharyya distance, 



When the occlusion occurs, the tracking result in Camshift algorithm is not credible, so the result of kalman predictor are outputted. When the occlusion ends, the result of camshaft are outputted. The improved algorithm using the Kalman predictor improves the tracking accuracy effectively. It is shown in Figure 2.
3. Analysis of Tracking Trajectory
After target detection and tracking, analysis of tracking trajectory is necessary. The traditional fitting trajectory is curve-fitting, but it requires a large number of complex operations and the following process is more complex. Here, an adaptive segmented linear fitting method based on least square is adopted. According to the principle of overall minimum fitting error, the best segmentation fitting points are automatically determined, so the speed and accuracy can be improved. When the trajectory appears curvilinear, the linear fitting method can not be closely matched the trajectory. Therefore, the tracking points are grouped and fitted in each group, that is the idea of the segmented linear fitting.
The function of a line is


Define error:

The ordered track point is divided into k group:
Figure 2. Process of improved tracking algorithm.

The overall fitting error is related to the number of groups 



Define overall fitting error:

when


Define difference of errors:








4. Detection of Abnormal Vehicle Behavior
Usually, sharp brake, sharp turn, and sharp turn brake are dangerous events in driving [11]. The detection of abnormal vehicle behavior can control the transportation system effectively. Here, we pay more attention to the variation of velocity and direction in a short time, so these two parameters are used to establish abnormal vehicle behavior detection model.
Define the intersection point of two adjacent fitting lines as the inflection point of trajectory:



Define the rate of direction variation:

Define the rate of velocity variation:




time interval of two inflection points, D is the rate of direction variation at the inflection point

When a vehicle brakes, the rate of velocity variation increases rapidly. When a vehicle takes a sharp turn, the rate of direction variation increases rapidly. when a vehicle takes a sharp turn brake, the rate of velocity variation and direction variation increase rapidly. Specifically as follows Table 1.
5. Results and Analyses
Test results are shown in Figures 3-5, the result of target tracking is (a), the result of linear fitting is (b), Figure 3 is two scenes of sharp brake, n is the number of inflection points that satisfy 







Experiment result shows that the three high dangerous vehicle behaviors in the road surveillance videos can be detected effectively: sharp brake, sharp turn, and sharp turn brake.
6. Conclusion
In this paper, an abnormal vehicle behavior detection method based on trajectory fitting is proposed. Firstly, a three-frame-differencing method and the improved tracking algorithm based on Kalman predictor are proposed. Then, an adaptive segmented linear fitting algorithm based on the least square is proposed. Finally, two parameters including the rate of velocity variation and the rate of direction variation are adopted to establish abnormal

Figure 3. Sharp brake.

Figure 4. Sharp turn.

Figure 5. Sharp turn brake.
Table 1. Vehicle abnormal behavior analysis.
vehicle behavior detection model. Experiment result shows that the three high dangerous vehicle behaviors can be detected effectively: sharp brake, sharp turn, and sharp turn brake.
Cite this paper
Enyuan Jiang,Xuejun Wang, (2015) Analysis of Abnormal Vehicle Behavior Based on Trajectory Fitting. Journal of Computer and Communications,03,13-18. doi: 10.4236/jcc.2015.311003
References
- 1. Versavel, J. (1999) Road Safety through Video Detection. 1999 IEEE/IEEJ/JSAI International Conference on Intelligent Transportation Systems, 753-757. http://dx.doi.org/10.1109/itsc.1999.821155
- 2. Qimei, L.B.C. (2006) Vehicle Activity Analysis from Freeway Traffic Video. Chinese Journal of Scientific Instrument, S3. (In Chinese) http://en.cnki.com.cn/Article_en/CJFDTOTAL-YQXB2006S3139.htm
- 3. Zhao, X.M., Hui, F., Shi, X., Ma, J.Y. and Yang, L. (2014) Concept, Architecture and Challenging Technologies of Ubiquitous Traffic Information Service System. Journal of Traffic and Transportation Engineering, 105-115. (In Chinese) http://www.cnki.com.cn/Article/CJFDTotal-JYGC201404015.htm
- 4. Zhao, Y.T., Li, X.Y. and Luo, D.H. (2011) Study on the Methods of Automatic Incident Detection Based on the Video Vehicle Trajectory Model. Acta Scientiarum Naturalium Universitatis Sunyatseni, 56-60. (In Chinese) http://www.cnki.com.cn/Article/CJFDTotal-ZSDZ201104012.htm
- 5. Wang, W.G. and Ma, R.G. (2013) Weighed Support Vector Machine for Traffic Incident Detection. Journal of Chang’an University (Natural Science Edition), 6, 014. (In Chinese) http://www.cnki.com.cn/Article/CJFDTotal-XAGL201306014.htm
- 6. Liu, Q.C., Lu, J. and Chen, S.Y. (2014) Design and Analysis of Traffic Incident Detection Based on Random Forest. Journal of Southeast University (English Edition), 1, 88-95. http://en.cnki.com.cn/Article_en/CJFDTotal-DNDY201401017.htm
- 7. Amin, M.S., Reaz, M.B.I. and Nasir, S.S. (2014) Integrated Vehicle Accident Detection and Location System. TELKOMNIKA (Telecommunication Computing Electronics and Control), 12, 73-78. http://jogjapress.com/index.php/TELKOMNIKA/article/view/1787 http://dx.doi.org/10.12928/telkomnika.v12i1.13
- 8. Yan, J.H., Chen, S.H. and Ai, S.F. (2014) Target Tracking with Improved CAMShift Based on Kalman Predictor. Journal of Chinese Inertial Technology, 4, 021. (In Chinese) http://www.cnki.com.cn/Article/CJFDTotal-ZGXJ201404021.htm
- 9. Bradski, G.R. (1998) Computer Vision Face Tracking for Use in a Perceptual User Interface. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.14.7673
- 10. Liu, R.M., Li, X.L., Han, L. and Meng, J. (2013) Track Infrared Point Targets Based on Projection Coefficient Templates and Non-Linear Correlation Combined with Kalman Prediction. Infrared Physics & Technology, 57, 68-75. http://www.sciencedirect.com/science/article/pii/S1350449512001193 http://dx.doi.org/10.1016/j.infrared.2012.12.011
- 11. Zhang, X.Y. and Da, Q.D. (2001) Technology of Highway Automatic Incident Detection. Systems Engineering-Theory & Practice, 21, 118-124. (In Chinese) http://www.cnki.com.cn/Article/CJFDTotal-XTLL200106021.htm













