Vehicle Detection Using OpenCV and Python
DOI:
https://doi.org/10.63345/Keywords:
Vehicle Detection, OpenCV, Python, Gaussian Mixture Model, YOLOv4, Intelligent TransportationAbstract
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.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 The journal retains copyright of all published articles, ensuring that authors have control over their work while allowing wide dissenmination.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Articles are published under the Creative Commons Attribution NonCommercial 4.0 License (CC BY NC 4.0), allowing others to distribute, remix, adapt, and build upon the work for non-commercial purposes while crediting the original author.






