Real Time Vehicle Detection, Tracking and Counting Using Raspberry Pi
Real Time Vehicle Detection, Tracking and Counting Using Raspberry Pi
ABSTRACT:Population explosion leads to increase monitored area. The need of traffic surveillance
in the number of physical objects means number of system is to provide construction engineers and
vehicles on road. This result, the number of road other associates to plan in an economical way and
accidents increases due to a very heavy traffic flow. proper decisions were taken based on density of the
Here traffic flow is monitored by using computer vehicles and the statistics obtained by the low cost
vision paradigm, where images provide a betterment electronic devices. It also provides solution to major
on the road view. In order to detect vehicles, problems such as vehicle accidents, vehicles theft
monitor and estimate traffic flow using low cost detection, managing parking area and other security
electronic devices, this research work utilizes threats.
camera module of raspberry-pi along with The main cause for the interest in traffic
Raspberry Pi 3. It aims to develop a remote access management activity is to utilize the computer
using raspberry-pi to detect, track and count vision techniques in real real-time conditions.
vehicles only when some variations occur in the The major challenge that caused hindrance
monitored area. The proposed system captures video to our work is vehicle segmentation in various
stream for providing video like vehicles in the atmospheric conditions such as night, snowy or
monitored area to compute the information and dusty wealth conditions.
transfer the compressed video stream for providing As a solution to it we have used a different
video based solution that is mainly implemented in pre-processing unit based on Histogram
Open CV by Python Programming. The proposed Equalization to improve the resolution of video and
method is considered as an economical solution for morphological operation to add or remove pixels in
industries in hich cost-effective solution are the boundaries of objects, where video depends on
developed for traffic management. shape and size of the structuring elements before
KEYWORDS: Computer Vision; Traffic flow; processing towards the next stage.
OpenCV; Vehicle Detection; Vehicle Tracking; It is also observed that the vehicles moving
Vehicle Count. towards same point either in lighter or darker region
or vice-versa might have the same colour as
I. INTRODUCTION background for detecting vehicle remains move
It is observed that, the major hindrance on challenging and this leads to fault in count of
road is due to heavy traffic flow during peak hours vehicles. So, as a solution to it we have employed
especially when people commute to work. The total background subtraction technique to register the
number of vehicles or object exceeds its capacity by vehicle ID if it crosses the given threshold.
causing a blockage for emergency vehicles such ass
fire fighter and rescue vehicles. In order to develop II. PROPOSED SYSTEM
an efficient, reliable, cleaner and safer mode of This System uses a well-known platform
transportation, it is necessary to make the road called Linux server for surveillance and recording
transportation system automated as much as video using Raspberry-Pi.
possible. The approach uses of Raspberry Pi to record a video
The primary focus is dedicated towards the when something moves inside the monitored area.
detection and tracking of vehicles, where it finally The proposed system efficiently manages to
keeps the count of vehicles in the particular distinguish the vehicles from the surrounding
DOI: 10.35629/5252-030817941800 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 1794
International Journal of Advances in Engineering and Management (IJAEM)
Volume 3, Issue 8 Aug 2021, pp: 1794-1800 www.ijaem.net ISSN: 2395-5252
environmental variability and improves the low Then the implementation of background subtraction
resolution videos through Histogram equalization algorithm helps to detects objects and track them
technique in order to maintain uniformity of videos based on the particle filter algorithm. Tracked
in terms of resolution and also in removal of noise vehicles are counted based on the threshold given to
from videos. different sized vehicles based on the area.
III. SYSTEMDESIGN
Figure 2: Raspberry-Pi
This paper makes use of as shown in figure 2 It establishes a connection between camera and
network.
1. Raspberry-Pi 3
Raspberry-Pi 3 is 52 RAM with 1.2GHz. Remote access of Raspberry-Pi
2. Raspberry-Pi camera module To operate under Raspberry-Pi, it is necessary to
Raspberry-Pi has a connector to plug in a install all the recent features and drivers for updated
camera module to capture the video. OS with a correct access to an internet connection.
3. Power supply
Raspberry-Pi uses 400mA of current that plugs the Commands to be followed in Raspberry-Pi
micro USB. $ sudo apt-get update
4. Micro SD Card This command updates the OS with recent features
Raspberry-Pi uses SD Card to store and install and drivers.
libraries and run OS for this device. Minimum $ sudo raspi-config
64GB or higher is required. Raspi-config opens the configuration tool that is
5. Wi-Fi USB adaptor written and maintained by Raspbian OS.
DOI: 10.35629/5252-030817941800 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 1795
International Journal of Advances in Engineering and Management (IJAEM)
Volume 3, Issue 8 Aug 2021, pp: 1794-1800 www.ijaem.net ISSN: 2395-5252
DOI: 10.35629/5252-030817941800 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 1796
International Journal of Advances in Engineering and Management (IJAEM)
Volume 3, Issue 8 Aug 2021, pp: 1794-1800 www.ijaem.net ISSN: 2395-5252
DOI: 10.35629/5252-030817941800 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 1797
International Journal of Advances in Engineering and Management (IJAEM)
Volume 3, Issue 8 Aug 2021, pp: 1794-1800 www.ijaem.net ISSN: 2395-5252
DOI: 10.35629/5252-030817941800 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 1798
International Journal of Advances in Engineering and Management (IJAEM)
Volume 3, Issue 8 Aug 2021, pp: 1794-1800 www.ijaem.net ISSN: 2395-5252
TABLE 1
Proposed system count with accuracy rate
A B C D E F G H
60 1 3 4 4 4 100% 100
%
300 2 7 9 9 9 100% 100
%
450 1 6 17 18 18 94.1 100
1 % %
140 1 2 38 40 42 95% 95.2
1 7 1 %
181 3 4 82 85 81 96.3 95.3
2 4 8 % %
251 6 4 11 11 11 97.2 98.4
2 7 5 2 5 3 % %
DOI: 10.35629/5252-030817941800 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 1799
International Journal of Advances in Engineering and Management (IJAEM)
Volume 3, Issue 8 Aug 2021, pp: 1794-1800 www.ijaem.net ISSN: 2395-5252
detection of vehicles.
Alarm system might be incorporated as an
additional future enhancement.
REFERENCES
[1]. Li, D., Liang, B., & Zhang, W. (2014). Real-
time moving vehicle detection, tracking and
counting system implemented with OpenCV.
2014 4th IEEE International Conference on
Information Science and Technology.
[2]. Sorwar, T., Azad, S. B., Hussain, S. R., &
Mahmood, A. I. (2017). Real -time Vehicle
monitoring for traffic surveillance and
adaptive change detection using
Humanitarian Technology Conference (R10-
HTC).
[3]. Yang, H., & Qu, S. (2017). Real time vehicle
detection and counting in complex traffic
scenes using background subtraction model
with low-rank decomposition Intelligent
Transport Systems.
[4]. Soleh, M.,Jati, G., Sasongko, A. T., Jatmiko,
W., &Hilman, M. H.(2017). A real time
vehicle counting based on adaptive tracking
approach for highway videos.
[5]. Aqel, S., Hmimid, A., Sabri, M. A., &Aarab,
a. (2017) road traffic: Vehicle detection and
classification. 2017 Intelligent System and
Computer Vision (ISCV).
[6]. https://www.researchgate.net/publication/281
039935_Real-time moving vehicle
detection_tracking
_and_counting_system_implemented_with_O
penCV.
[7]. Foresti, G. L., &snidaro, L, (2005). Vehicle
Detection and Tracking for Traffic
Monitoring. Lecture Notes in Computer
Science.
DOI: 10.35629/5252-030817941800 Impact Factor value 7.429 | ISO 9001: 2008 Certified Journal Page 1800