Trajectory-based anomalous event detection