In this paper, the lane and vehicle detection with distance estimation algorithm is proposed by using a CCD camera mounted behind the windshield of our experimental car, TAIWAN iTS-1. The gray level and gradient value are applied for the lane marking detection. The lane marking information is utilized in vehicle detection algorithm. The front vehicles are recognized by comparing the gray level value and Sobel edge pixels. Then, the image coordinate model is utilized for the distance estimation with the located approaching vehicles. The verified effective distance is 50m in front of the host vehicle. This approach has been successfully implemented on the DSP system which is designed by us for the real-time detection. This system will be integrated into the lane departure warning and collision avoidance system with the visual and audio alerts to warn the careless drivers.