Anomaly detection acts as the major direction of intelligent traffic management, but current studies may not yield the best results in the field of public safety. This paper proposes a machine-learning based technique to detect vehicle anomalies from vehicle trajectory data captured by automatic number plate recognition (ANPR) system. Our scheme is capable of detecting vehicles with the behavior of wandering round and unusual activity at specific time. Firstly the spatial and temporal quantitative indicators of vehicle activity features are extracted from historical vehicle trajectory data. The vehicles with unusual spatial feature are found and their cumulative rotation angles around the centroid of the route are calculated to detect spatial wandering round behavior. The distance from the center of clusters created by K-means classification algorithm based on the temporal features vectors are computed to find outliers. We collecte the records from ANPR system with 315 cameras deployed in real-world for more than two months, and over 5.4 million vehicles are captured. The evaluation results based on the data set show the efficiency of the anomaly detection. More importantly, our scheme can significantly improve the detection robustness especially when the data collected by the ANRP system are noisy due to poor weather condition.