An Efficient Approach for Anomaly Detection in Traffic Videos