Vehicle Detection Using OpenCV and Python

Authors

  • Zhao Lei Independent Researcher Yanta District, Xi’an, China (CN) – 710061 Author

DOI:

https://doi.org/10.63345/

Keywords:

Vehicle Detection, OpenCV, Python, Gaussian Mixture Model, YOLOv4, Intelligent Transportation

Abstract

Vehicle detection is a cornerstone technology in modern intelligent transportation systems (ITS), enabling automated traffic monitoring, congestion analysis, and autonomous navigation. This study presents an exhaustive exploration of two complementary detection paradigms built with OpenCV and Python: a classical, background-subtraction pipeline grounded in Gaussian Mixture Models (GMM) and a contemporary, deep-learning–based detector leveraging the YOLOv4 architecture. The GMM pipeline models pixel-level intensity distributions over time, dynamically differentiating foreground objects from a learned background, followed by morphological filtering and contour analysis to generate candidate vehicle regions. In contrast, the YOLOv4 approach treats detection as a single-stage regression problem, dividing each frame into grid cells that simultaneously predict bounding boxes and class probabilities, achieving real-time performance with high accuracy. Both pipelines were implemented end-to-end in Python using OpenCV’s built-in functions and evaluated on two benchmark datasets—UA-DETRAC and KITTI—under diverse environmental conditions, including fluctuating illumination, weather variability, and occlusions.

Published

2026-07-07

How to Cite

Lei, Zhao. “Vehicle Detection Using OpenCV and Python”. International Journal of Advanced Research in Computer Science and Engineering 2, no. 3 (July 7, 2026): Jul (17–24). Accessed July 9, 2026. https://ijarcse.org/index.php/ijarcse/article/view/156.

Similar Articles

1-10 of 74

You may also start an advanced similarity search for this article.