Traffic extreme situations detection in video sequences based on integral optical flow