In this study, we present a novel approach leveraging the segment anything model (SAM) for the efficient detection and tracking of vehicles in urban traffic surveillance systems by utilizing uncalibrated low-resolution highway cameras. This research addresses the critical need for accurate vehicle monitoring in intelligent transportation systems (ITS) and smart city infrastructure. Traditional methods often struggle with the variability and complexity of urban environments, leading to suboptimal performance. Our approach harnesses the power of SAM, an advanced deep learning-based image segmentation algorithm, to significantly enhance the detection accuracy and tracking robustness. Through extensive testing and evaluation on two datasets of 511 highway cameras from Quebec, Canada and NVIDIA AI City Challenge Track 1, our algorithm achieved exceptional performance metrics including a precision of 89.68%, a recall of 97.87%, and an F1-score of 93.60%. These results represent a substantial improvement over existing state-of-the-art methods such as the YOLO version 8 algorithm, single shot detector (SSD), region-based convolutional neural network (RCNN). This advancement not only highlights the potential of SAM in real-time vehicle detection and tracking applications, but also underscores its capability to handle the diverse and dynamic conditions of urban traffic scenes. The implementation of this technology can lead to improved traffic management, reduced congestion, and enhanced urban mobility, making it a valuable tool for modern smart cities. The outcomes of this research pave the way for future advancements in remote sensing and photogrammetry, particularly in the realm of urban traffic surveillance and management.