A computer vision based vehicle detection and counting system