This thesis presents the techniques of computer vision and image processing used for the detection of highway lanes and vehicles. This system acquires the road scene images from a forward-looking vehicle-mounted camera. After processing and analyzing these images, the system offers the information that the driver needs to improve the traffic safety. It displays lane edge trace to extracting road edge and lane information for smart intelligent navigation of vehicles. Using two linear functions, we describe left and right lane lines, and then apply the least-square-error method to filter these edge-point segments to approximate the lane boundary. Through the use of the two linear functions, we can determine road front width whether there is any lane departure. On the other hand, after filtering the detection of front vehicle taillights, we determine whether the car is too close to the front vehicles by the relationship between the width of front vehicle taillight pairs and the distance from front vehicles.