Lane detection is an important application of driver assistance. In this paper, a new technique for detecting lane markers that is able to cope with many complex conditions is presented. Some of these conditions include dynamic illumination, scattered shadows, and the presence of neighboring vehicles to name a few. The input image is first pre-processed with a perspective removal transformation followed by a color space conversion. Then, the core elements of the proposed technique consisting of template matching, lane region merging, elliptical projections, and parametric tracking are explained. A formal error metric used in performance evaluation is also introduced. Finally, quantitative analyses show that the developed system performs well in real-world driving conditions with variations in illumination, traffic, and road surface quality.