Vehicle Counting Based on Road Lines
Salma Bouaich, Mohamed Adnane Mahraz, Jamal Riffi, Hamid Tairi · Pattern Recognition and Image Analysis · 2021
Abstract In a traffic system using data from a video surveillance camera (CCTV), vehicle detection is one of the essential tasks. It will lead us to collect traffic information in real-time to avoid traffic jams due to vehicle counting in circulation. The target problem here is to provide a semi-automatic system that allows parameters to be adjusted based on the camera position to estimate traffic flow. The aim of such a system is the efficient management and analysis of traffic. A traffic blockage is declared when the number of vehicles counted exceeds the usual number. In this paper, we have proposed an approach for vehicle counting in real time using virtual lines. Our technic contains several methods that help to achieve precise results. First, to automatically establish the virtual lines perpendicular to the road lanes, we extract the road lines using the Hough transformation. For the background subtraction, we relied on the supervised classification using k-nearest neighbors (KNN). Morphological operations are used to correctly determine the regions of objects, remove noise and fill holes. The vehicles are counted when the rectangle center of the detected vehicle crosses a virtual line. The results found show the efficiency and robustness of our system.