Accident-prevention system that detects objects on the road while driving