A system implemented in a vehicle to detect a lead vehicle includes a
camera which captures an image of the rear of the lead vehicle and an
image processing system that receives image data from the camera. The
image processing system is implemented with an algorithm that includes a
preprocessing layer, an image segmentation layer, and a detection layer
to analyze the image data to determine the relative distance between the
vehicle and the lead vehicle.