The objective of this paper is to compare the performance of three background-modeling algorithms in segmenting and detecting vehicles in highway traffic videos. All algorithms are available in OpenCV and were all coded in Python. We analyzed seven videos, totaling 2 hours of recording. To compare the algorithms, we created 35 ground-truth images, five from each video, and we used three different metrics: accuracy rate, precision rate, and processing time. By using accuracy and precision, we aim to identify how well the algorithms perform in detection and segmentation, while using the processing time to evaluate the impact on the computational system. Results indicate that all three algorithms had more than 90% of precision rate, while obtaining an average of 80% on accuracy. The algorithm with the lowest impact on processing time allowed the computation of 60 frames per second.