This paper presents an effective traffic surveillance system for detecting and tracking moving vehicles in nighttime traffic scenes. The proposed method identifies vehicles by detecting and locating vehicle headlights and taillights using image segmentation and pattern analysis techniques. First, a fast bright-object segmentation process based on automatic multilevel histogram thresholding is applied to effectively extract bright objects of interest. This automatic multilevel thresholding approach provides a robust and adaptable detection system that operates well under various nighttime illumination conditions. The extracted bright objects are then processed by a spatial clustering and tracking procedure that locates and analyzes the spatial and temporal features of vehicle light patterns, and identifies and classifies moving cars and motorbikes in traffic scenes. The proposed real-time vision system has also been implemented and evaluated on a TI DM642 DSP-based embedded platform. The system is set up on elevated platforms to perform traffic surveillance on real highways and urban roads. Experimental results demonstrate that the proposed traffic surveillance approach is feasible and effective for vehicle detection and identification in various nighttime environments.