Vehicle Detection and Counting Final
Vehicle Detection and Counting Final
An Industrial Training Project report for the evaluation and partial fulfillment of the
requirement for the award of the degree
B. TECH. (IT)
Co-Supervisor: -
Mrs. Sumedha Dangi
Submitted By: -
Sakshi Rawal (19/BIT/037)
1
SCHOOL OF INFORMATION AND
COMMUNICATION TECHNOLOGY
This is to certify that the above statement made by the candidates is correct to the best
of my knowledge and belief. However, responsibility for any plagiarism related issue
solely stands with the students.
2
Acknowledgement
We have taken efforts in this project. However, it would not have been possible without
the kind support and help of many individuals and organizations. I would like to extend
my sincere thanks to all of them.
We are highly indebted to Mrs. Sumedha Dangi for their guidance and constant supervision
as well as for providing necessary information regarding the project & also for their support
in completing the project.
We would like to thank Dean of ICT Prof. S. K. Sharma and HOD of IT, Dr. Neeta Singh
whose support helped me to complete my work. I would like to express my gratitude
towards my friends & family members ‘kind cooperation and encouragement which helped
me in completion of this seminar.
3
Abstract
In this paper the main focus is on detecting of vehicle and counting, particularly in traffic control.
Vehicle detecting and also counting are becomes growing important in a area of highway
regulators. However, because of the various structure of vehicles, their detections remain
challenging which directly influence in accuracy of a vehicle count. This paper address a video-
based techniques for vehicle recognition and counting based on OpenCV technologies. The
proposed technique uses the background subtraction method to discover forefront objects in video
sequel. Several OpenCV techniques, including of an thresholding, the adaptive morphology
operations, and hole filling are later applied in the series of detecting moving vehicles more
accurately. At last, vehicle counting is done by utilizing virtual identification zones.
4
Contents
Declaration 2
Acknowledgment 3
Abstract 4
Chapter 1: Introduction 7
1.1 About company 7
1.2 Technology Learned
1.3 Introduction to project 7-9
1.4 Challenges 10
1.5 Motivation 11
1.6 Project Objective 11
Chapter 3: Applications 13
Conclusion 16
References 17
5
Training Certificate: -
6
CHAPTER-1. Introduction:
1.1 Introduction to the company
NTPC is India’s largest energy conglomerate with roots planted way back in 1975 toaccelerate
power development in India. Since then, it has established itself as the dominant power major
with presence in the entire value chain of the power generation business. From fossil fuels it
has forayed into generating electricity via hydro, nuclear and renewable energy sources. This
foray will play a major role in lowering its carbon footprint by reducing greenhouse gas
emissions. To strengthen its core business, the corporation has diversified into the fields of
consultancy, power trading, training of power professionals, rural electrification,ash utilization
and coal mining as well.
INFORMATION TECHNOLOGY
NTPC has integrated Information Technology as a strategic tool in its management systems.
Services covered under Information Technology include the following:
• Management Information Systems
• Consultancy for development of Local Area Network /Wide Area Network
• Consultancy for Satellite Communication Network
• Computerization of O&M and Material management manuals
1.2Technology Learned: -
• Python
• Machine Learning (OpenCV)
7
Vehicle detection and counting systems can vary, but in general, they tend to operate as
follows:
8
1.3.6 Vehicle Detection
Vehicle detection is a technique used in computer vision and image processing. Multiple
consecutive frames from a video are compared by various methods to determine if any moving
object is detected. Moving objects detection has been used for wide range of applications like
video surveillance, activity recognition, road condition monitoring, airport safety, monitoring
of protection along marine border.
9
Flowchart:
1.4 Challenges
Camera Motions: when there is a motion in camera’s field of view, like the videos
captured by unstable or vibrating cameras, processing the video will be a challenging
issue. The result of this phenomenon is
usually represented as motion blur in video scene which affects both detection and
tracking steps harder.
10
Different shapes of vehicles : Since there are different vehicle categories, if the
detection system is based on classification of vehicles by their visual features like
headlight and bumpers, some vehicles
may be misclassified. This challenge is the most common in supervised technique vehicle
detection
Low Light Conditions: in nights and other low light situations like tunnels, cars can’t be
simply detected by their visual features and the only part of them that can be recognized
are headlight/taillight lamps. So other parts that do not produce light or exposed to light
from a very close distance will appear to have dark color. This lack of visual features can
affect detection and tracking processes. The other challenge
here is to pair detected lamps to be considered as an individual car. Image binary
conversion using an adequate threshold value can deal with such situations. At night
videos, vehicle headlights/taillight and bad illumination that may cause strong noise can
also lead to many difficulties for the detection task.
1.5 Motivation
The main motivation of this project stems back from when we were assigned to a project
by our mentor at NTPC Dadri to count and detect number of vehicles visiting the plant.
That can help in parking management of the plant.
The objectives of vehicle detection and counting system is to detect and count the number
of vehicles .Vehicle detection and statistics in highway monitoring video scenes are of
considerable significance to intelligent traffic management and control of the highway.
With the popular installation of traffic surveillance cameras, a vast database of traffic video
footage has been obtained for analysis.
11
CHAPTER-2 Project Requirement
TECHNOLOGIES USED
The key technologies that constitute the application are:
● Python
● OpenCV
SOFTWARE USED
The software used to setup and run the application are:
● Visual Studio Code
● Python 3.11 Interpreter
HARDWARE REQUIRED
The hardware specifications required to run the application are:
● A machine running any popular 64-bit desktop operating system
● At least 8 GB of RAM on the machine
EXTENSIONS USED
The extensions used to run the application are:
● Python Extension for VS Code
LIBRARIES USED
The Python libraries used in this project are listed below:
● OpenCV-python
● NumPy
12
CHAPTER-3 Applications
1. vehicle speed measurement
2. identification of traffic accidents
3. traffic flow prediction
4. Parking management
13
CHAPTER-4 Benefits and Limitations
Limitations:
Capture errors: Varying intensity of light during day affects the appearance of background
scene and can cause false positive detections of vehicles, which means considering non-vehicle
objects as vehicles in a video sequence. Fast transition from cloudy to bright sunlight is a
common phenomenon which can result in sudden illumination changes.
Positional errors: Tracking may be difficult when conditions introduce uncertainty into the
positions of anatomical locations within the image. This may also occur when attempting to
track a movement froma suboptimal viewpoint.
Limitations of recording devices: Use of devices with low sampling rates may be unable to
capture accurate movement of vehicles.The aperture and shutter speed of recording devices can
also impact image quality and introduce blurring, which can impact the quality of the tracking
achieved through pose estimation.
Benefits:
A vehicle detection and counting system could be beneficial for the traffic police because
everything they can monitor from one place only likes how many vehicles have crossed
this toll and which vehicle.
Moving vehicle detection, tracking, and counting are very critical for traffic flow
monitoring, planning, and controlling. Video-based solution, comparing to other
techniques, does not disturb traffic flow and is easily installed. By analyzing the traffic
video sequence recorded from a video camera, this paper presents a video-based solution
applied with adaptive subtracted background technology in combination with virtual
detector and blob tracking technologies.
14
CHAPTER-5 Future Scope &Applications
1. Helps traffic police: A vehicle detection and counting system could be beneficial for
the traffic police because everything they can monitor from one place only likes how
many vehicles have crossed this toll and which vehicle.
2. Maintaining records: It is challenging for some individuals to record all the vehicles
with them because the cars are passing by in real-time. It’s not like that one is watching
the video, and they can pause it and have a note of it, so to remove this limitation, this
application can be very well-versed to attain the time-saving quality and be automated.
15
CONCLUSION
This paper has clearly explained about the vehicle counting detection system to identify
and counting the number of vehicles from the video sequence captured from static cameras.
Firstly, by using adaptive background subtraction with virtual detector, secondly
foreground masking, find contour method, motion analysis and edge detection techniques
have been used. Open computer vision techniques like threshold calculation and blob
analysis, hole filling, morphological operations, are applied to remove objects and to
remove noises from the video frames for smoother boundaries. Thirdly, by using contour
methods to identify the vehicles and counting the number of vehicles in the video sequence
captured from static cameras. Once the vehicle has reached the region of interest count
would begin as mentioned in the above method.
16
References
• geeksforgeeks
https://www.geeksforgeeks.org/
17