An Automated Nighttime Vehicle Counting and Detection System for Traffic Surveillance