Design of Vehicle Flow Recognition and Speed Detection System Based on Raspberry PI
摘要
In recent years, as traffic volumes continue to grow, the real-time identification, counting, and speed measurement of traffic flow have become increasingly critical for effective traffic control. This paper presents the design of a lightweight monitoring system capable of real-time traffic flow identification and vehicle speed detection, leveraging Raspberry Pi and a camera. The system captures traffic video using a Raspberry Pi camera and introduces a method that combines difference and RGB spectral ratio shading detection models to enhance foreground extraction of moving vehicles. By tracking the motion of the vehicle's center of mass, the system achieves vehicle tracking, counting, classification, and speed measurement functionalities. Experimental results demonstrate that the system can accurately obtain real-time vehicle counts, vehicle types, and speed values, and can efficiently transmit this traffic data to the traffic control department for the implementation of effective traffic guidance strategies. Moreover, the system exhibits high accuracy in traffic counting, achieving more than 91% accuracy according to evaluation using the UA-DETRAC dataset algorithm.