CV 1
CV 1
CHAPTER1
INTRODUCTION
With a growing vehicle population in a city, efficient parking management is now an
important demand. Traditional parking management systems are not equipped to deliver real-
time occupancy status information, and thus, they may lead to congestion, inefficiency, and
carbon dioxide emissions. In order to overcome the aforementioned limitations, computer
vision technology has been increasingly incorporated for parking management systems.
The purpose of this study is to introduce a computer vision-based parking space counting
system by employing OpenCV, an open-source computer vision library. The objective of the
system is to deliver real time feedback on the parking space occupancy by modalities used for
video capture using cameras. It does not require the much, sensor-driven, therefore, cheap, and
at the same time, scalable, installations in urban and smart cities.
1.1Background
Private vehicle ownership has outrun the supply of usable parking facilities in most urban areas.
This imbalance has led to issues such as:
Traffic jams are the result of drivers looking for parking places.
Computer vision, an area of artificial intelligence, remains a disruptive technology that has the
potential to pierce these limits. Computer vision algorithms obtained with visual information
from cameras can automatically detect and track parking spaces. Being one of the most widely
used image processing libraries, OpenCV offers an excellent platform for building such
applications with functions of object detection, motion tracking, and real-time video analysis,
etc.
- Scalability: In contrast to sensory system architecture, computer vision can collect the
tracking of multiple parking spots simultaneously from a single camera.
- Cost-Effectiveness: [With] the availability of commercial video camera technology and the
subsequent widespread deployment of commercially available CCTV equipment, the
requirement for specialist hardware should be reduced considerably.
- Real-Time Processing: Because of the power of the advanced algorithms, parking space
occupancy can be instantaneously detected, and updates are given at the right time.
- Adaptability: The system is easily transferable to a wide variety of parking conditions, e.g.
open parking lots, multi-storey parking garages, or roadside parking.
In this study, these capabilities are addressed by implementing a parking space counter based
on OpenCV and illustrating its practicality and utility for applications in the real world.
1.2Motivation
Reasonable traffic parking management is an urgent issue in modern megapolises to
resolve problems caused by the insufficiency of parking spaces including traffic jam, air
pollution and driver's home sickness. Currently, in most of these systems the expenditures for
installation and maintenance are very high since these systems are based on hardware sensors
or special devices (i.e. In addition, the accuracy may also depend on the ambient conditions,
e.g., sensor error or occlusion.
The reason behind this study is the requirement of a reliable, cheap, and extendible parking
space counter system. The goal is to use image processing and computer vision techniques
through OpenCV to deliver a robust solution, which is able to function in a multitude of.
1.3Objectives
1.6summary
Through this framework, the report guarantees a complete grasp of the study and its
results.
CHAPTER2
Literature Survey
In this chapter, an overview of the state of the art literature and techniques related to
the management of parking systems, on the one side, and the development of computer vision,
on the other side, is presented and the evolution of the OpenCV framework is discussed. In the
review, the state of the art is discussed, limitations are identified, and research gaps are
elaborated as a prelude to allow the positioning of the proposed solution within an appropriate
context.
Parking management systems have been designed for many years, as requirements for
city traffic management and land use expansion arose. The primary categories of parking
systems include:
Such systems are employing human controllers to manage and supervise parking lots. Though
they are relatively simple, they are rule based, easily wrong and time consuming for a large
task.
- Types of Sensors: Ultrasonic, infrared, and pressure sensors are used broadly for the detection
of the presence of a vehicle on a single parking bay.
- Advantages: Such systems are demonstrated to be adequate for single-slot and over-the-air
data harvest applications.
- Limitations: They are not of general value since they are too cumbersome and expensive in
terms of installable and mainatable costs. Additionally, sensor malfunctions can lead to
inaccuracies.
Video streams are used and traffic is counted using cameras and powerful algorithms and the
traffic is read and regulated for the parking lot.
The method is scalable, and the basis is on the use of the existing camera infrastructure, i.e., it
is feasible to simultaneously monitor multiple environments instead of a single one.
Internet of things (IoT) based systems vehicle parking is based on the physical environment,
the location information from RFID tag/sensor etc., on the Internet car parking location server.
Although, the systems are competitive but they also have a high capital commitment and design
are complex.
Computer vision has emerged as a novel tool for the automation of parking control.
Using visual data processing, these systems offer an objective, scalable, and affordable
alternative to traditional instruments.
- YOLO (You Only Look Once): A computationally simple real-time single-pass object
detection algorithm, which is very fast and has relatively good accuracy.
- Faster R-CNN: This highly accurate algorithm is used with a region proposal network for
object detection which is restrictive in terms of real-time applications due to the high
computational demand of the algorithm.
- SSD (Single Shot Multi Box Detector): It is capable of offering a good speed/accuracy
compromise and, as such, it can be exploited for parking.
- Edge Detection: In the case of vehicle and car park edge detection, for instance, the Canny
- Region Segmentation: Region the images to segment parking lots and cars.
- Transfer Learning: Vehicle-vehicle (vehicle), like VGGNet and ResNet, are exploited to
reduce training time and improve detection performance of vehicle.
The tool is strongly suggested during the development of computer vision applications,
since it offers almost any tool for object detection, tracking, and live video control. Its relevance
in parking management systems includes:
1.Feature Extraction:
The OpenCV framework offers highly efficient algorithms for feature extraction, such as edges,
contours, and key points, that are critical for vehicle detection and car parking spot recognition.
2. Object Tracking:
Vehicle tracking algorithms based on kalman filtering and optical flow algorithms are
implemented by OpenCV.
Deep learning frameworks are readily combined with OpenCV, which enables programmers to
Achieve advanced models (eg, YOLO or SSD) in their applications.
4. Performance Optimization:
Thanks to the support of the general purpose computing on programmable array logic unit
(GPGPU) and the optimized libraries, parking management system in real-time can be
processed so that it is the end-to-end optimal solution.
Although efforts been made, there remain many challenges left to be overcome in the
realizable practical reality of good parking management systems:
1. Environmental Variations:
It is common for systems to fail to meet expectations when operating in a low ambient light,
some occlusions, or extreme weather such as heavy rain or fog.
2. Occlusions:
Cars that are parallel, rear end to top end to each other, partially occluded by another entity can
fool the system, or, paradoxically, lead to a false detection.
Sensor-based, however, are also too costly to lay out over a large parking area.
Camera-based systems are computationally intensive and therefore not feasible to compute in
real time without a high-performance graphical processing unit (GPU).
4. Real-Time Accuracy:
RT detection systems must trade off speed, accuracy, and can be challenging with high
resolution video streams.
It is also and remains the case that the overwhelming majority of systems, and currently
so, that exist at all, are based on and continue to be based on conventional image processing or
deep learning. A hybrid approach combining both methods could enhance performance.
2. Inadequate Cost-Effectiveness:
A limited number of systems makes use of (e.g., CCTV camera) available hardware and
therefore can be provided at lower cost.
3. Limited Adaptability:
Systems on the market today are, at the least, quite stiff and have trouble acting well inside or
outside.
4. Underexplored Environmental Conditions:
Although testing in adverse conditions (e.g., night, stormy weather) is not recommended on
the basis of the current published work.
2.6 Summary
This chapter has discussed the development and progress in parking management
systems and with particular focus on the contributions by computer vision and the OpenCV
architecture. Environmental adaptability, scalability and cost effectiveness, continues to be
one of the innovations, which remain challenging. These findings also suggest the rationale
for the use of such a complex, multimodal computer-vision based, framework, embedding
state-of-the-art techniques and robust implementation strategies, which are aimed at, design
and validate.
CHAPTER3
Methodology
In this chapter, a detailed description of the modeling procedure applied to petrol station
counter system is given. It describes the system architecture, the tools and libraries used, the
algorithm, the workflow, assumptions, and limitations.
1. Input Module:
Retains live video feeds and/or pre-recorded video from CCTV and/or IP cameras.
Provides a broad range of video formats and resolutions so as to be able to be easily plugged
into an existing system
2. Pre-Processing Module:
- Enhances raw input frames for improved detection accuracy.
It handles illumination and noise variations (e.g., frame resizing, noise removal (e.g., Gaussian
blur), histogram equalization).
3. Detection Module:
Describes the application of high-performance object detection algorithms (e.g., YOLO) to the
detection of vehicles in the parking lot.
Applies pre-defined Regions of Interest (ROIs) to map the detected cars to the corresponding
parking spaces.
4. Counting and Status Module:
Log vehicle location and, if used, to park occupancy of each parking space.
Offers statistical data (e.g., number of available and unavailable rooms) that is live and
continuously updated.
5. Output Module:
Offers an introduction of the parking layout, with colored indication of the status (e.g., green
"free," red "oc".
Their outputs include the occupancy information encoded in a embedded format to dashboards
or third party systems through APIs for further processing.
1. Software Tools:
- OpenCV: The library core in the field of image processing, through which one can, for
instance, carry out edge detection, contour detection, and morphological transformation, etc.
- YOLO (You Only Look Once): A state-of-the-art object detection algorithm for real-time
vehicle detection.
- TensorFlow or PyTorch: Frameworks for loading and fine-tuning deep learning models.
- NumPy and Pandas: For data manipulation and analysis of parking occupancy trends.
2. Programming Environment:
- Python: The one selected because of the deep libraries and the ability of integration with
OpenCV and the toolkits of deep learning.
3. Hardware Requirements:
- Cameras: Basic CCTV/IP cameras that show the area of the parking lot in clear view.
- Computational Infrastructure: A GPU-based system with its existing strain of real-time video
stream decoding trade off will be presented.
3.3.1 Pre-Processing
- Frame Extraction: Extract individual frames from the video stream for analysis.
- Noise Reduction: Frames (and noise) are smoothed with Filters (e.g., GaussianBlur,
MedianFilter), and then frames (and noise) are further processed.
- ROI Definition: Specify the areas inside the frame to focus processing efforts on the relevant
ones.
Through YOLO algorithm, vehicles are detected in each frame, and the coordinate pairs of the
bounding boxes and the confidence scores are returned.
Detection model is pre-trained on big scenes, such as COCO, or post-trained on parking scene
specific datasets to achieve better accuracy.
- Dynamic Updates:
Combine and interpret data in order to extract knowledge, e.g., the time when the most srong
the system, or the average vacancy level).
1. Video Input:
The system constantly streams a video from each of the scene that is watched by the cameras
in the parking lot.
2. Frame Pre-Processing:
Upsampled frames are contoured, enhanced and cropped into ROIs and then processed by.
3. Object Detection:
Vehicle real-time tracking using the YOLO model and correspondence between vehicle
position and ROIs are also being validated.
4. Occupancy Analysis:
In each parking space, the occupancy status is tracked to identify whether the parking space is
either occupied or vacant.
A graphical user interface in real time displays the floor plan of a parking lot (and its occupancy
status) according to the current status.
4. Flexibility:
The system is also translatable to the use of the parking lot, indoor or outdoor.
3.7 Summary
This chapter presented the system architecture, tools, method, workflow and the system of the
proposed parking space counter system. By combining image processing power of OpenCV
and YOLO detection model, the system can provide an effective, accurate, and scalable
solution to real-time parking management. The following chapter describes the implementation
and the performance of the system.
Chapter 4
Results and Discussion
In this chapter experimental data related to the testing of an application for a parking
space/vehicular counter system in various condition/environment scenario are reported. In
addition, it also provides the performance of the system using specified metrics, it discusses its
advantages and disadvantages and general outcomes of these observations.
The system was configured and experimentally validated both in a controlled environment and
in a natural setting, and subsequent system performance was then compared under different
conditions. Testing conditions were set up to evaluate the robustness, validity, and resilience of
the system.
Cameras were then used to capture what each of the spaces in the parking lots looked like, and
they were free of charge.
The test consisted of both static and mobile cars to test the occupancy tracking.
A parking zone with unobstructed views under unfavorable weather conditions (i.e., sunny and
hazy days and rainy days).
Various traffic density conditions (i.e., low traffic, high traffic traffic flow rate).
- Processing Hardware:
Laptop and graphics card with Intel i7 processor and NVIDIA GTX 1660 GPU for real-time
analysis.
- Cloud computing resources for large-scale evaluations.
- Software Environment: - Software Environment:
Python 3.9 object detector implementation of YOLOv5 using OpenCV 4.x.
System performance was quantified by the following metrics in an attempt to obtain an overall
measure.
4.2.1 Accuracy
- Vehicle Detection Accuracy: Computed on the basis of percentage of being able to recognize
the correct number of cars in the field of view of the camera.
- Occupancy Status Accuracy: Validated the truth of carpark space (carpark empty or carpark).
Frames per second (FPS) were measured to check whether the system is capable of performing
online video processing.
4.2.4 Scalability
Flexibility of the system that allows it to process more and more camera streams and more
parking lots without a performance reduction.
- Nighttime Conditions: Detection accuracy, and occupancy accuracy both drop to 87% (85%
limited by lighting.
- Adverse Weather Conditions: Accuracy ranged from 70-80%, depending on the presence of
rain, fog, or heavy shadows.
12 frames per second at the base-level CPU, which needs to be supplied by using either the
GPU or optimized code in constrained environments.
- False Positives:
The highest rate of misclassification, that is, entity is misidentified as the car for the episodes
sudden shadows.
Manageable, nonchanging items (e.g., traffic cones) among the classifications of vehicles.
- False Negatives:
The high traffic flow and the presence of intersecting moving vehicles, in turn, resulted in some
false-negative classifications.
Intense misclassification subsequently resulted from a dense overcast (or snow) blotting the
traffic.
4.3.4 Scalability
The system could quantify as many as 100 parking lots with low latency using multi-threaded
processing approach.
4.4 Discussion
1. Cost Efficiency: The ability to use-as-is surveillance equipment cut the cost of
implementation much compared with use of a sensor-based system.
demonstrated to obtain an acceptable performance when applied in indoor and outdoor parking
garages.
3. Real-Time Updates: Due to the real-time nature of the parking space occupancy data, real-
time accessibility has been provided for the use of real-time parking management applications.
environments that could not be seen by the human eye on their own and required an external
2. Weather Dependency: Detection accuracy deteriorated due to the severe weather, such as
heavy rains, snow and dense fog.
3. Traffic Density: Vehicles showing in the same time or repeated appearances could also
decrease the accuracy, especially in large numbers.
4. Computation Load: Scalability was restricted by hardware, especially hardware, due to the
high-density park area or multi-camera systems.
Easy to expand, and cheaper, but it is camera and environmental parameter dependent.
to prevent traffic jams (instead of optimizing parking availability in the city airspace).
2. Cost-Effective Scalability: Potentially very useful for businesses and municipal governments
in their demand for an economical, flexible, and adaptable solution in the field of parking
management.
3. Future Potential: As the paradigm of Big Data ensures the inclusion of new data source
modalities (e.g., sensors of the Internet of Things), the system is engineered to be more robust
and general.
2. Environmental Sensitivity:
3. Large-Scale Deployment:
4.6 Summary
Results also present the practical nature of the proposed parking lot space-counter
system under experimental conditions, and suggest that the proposed system will find an
application role in the "real world. However, even in extreme conditions, it is an inexpensive,
scalable parking management solution. The system potential for future extension and
how the system may be improved to further resolve the current limitations and thus enable the
system to be used more broadly by a larger population of users is presented. In the following
chapter, the work will be completed by reporting the findings and future work, which will be
proposed.
Chapter5
5.1 Conclusion
The aim of the present research was to design a low-cost computer-vision (cv)-based parking
space (ps) counting system at low-cost OpenCV. The system could be successfully shown the
capability of making use of current surveillance infrastructure to track and control car parks in
real time.
Nevertheless, the response of the system given real-time parking lot occupancy data (and is a
vital information requirement for urban traffic control).
2. Economic Feasibility:
Using camera-based detection rather than sensor-based systems, the study managed to lower
the costs and thus, it became available in diverse applications.
Learned state-of-the-art object detection systems (e.g., YOLO) to the tradeoff between a
relatively good accuracy and efficiency of vehicular object detection and tracking.
4. Scalable Design:
Developed a system scalable from small parking lots to large venues and using more than one
camera and showing generalizability.
Finished the project using generic, readily available tools (OpenCV, Python), which researchers
and developers in the future have the capacity to annotate.
The system presented high accuracy in the controlled environment, especially in the stable
illumination environment and the occluding dense environment.
Problems also arose in adverse weather, poor visibility, and traffic jams, where detection
performance there also degraded.
Such real-time computing was achieved, but the computational cost made it clear that hardware
and software optimized for this must be developed.
5.2 Limitations
Even with limited success, this work also received several constraints, which provide some
directions for future development:
1. Environmental Sensitivity:
System performance degraded in both low light conditions, i.e., at night, and under occlusion
of the background.
Rain, fog and/or snow contributed to degradation of the system's performance in correctly
localizing vehicles, hence it brought a decrease in reliability.
The design realization at the moment is under the constraint that both the cameras are static
A group of parking area regions of interest (ROIs) manually delineated is time consuming,
particularly for a parking lot.
5. Scalability Challenges:
Efficient, however because the number of parking slots grows, there is a minor performance
penalty, due to the increased computational complexity.
These spurious detections occurred for occluded vehicles, via occlusion of other occluded
vehicles, and for occluded stationary objects that looked like vehicles.
In order to overcome the limitations and improve the performance of the system, the following
alternative changes and future works are proposed:
Methods for shadow removal, adaptive histogram equalization and hdr imaging have been
proposed to enhance performance in a range of illumination conditions.
2. Weather-Adaptive Models:
Training data for weather states from a wide variety of weather states (rain, fog, snow, etc.
Design an algorithm to automatically detect and delineate parking stalls using image
processing, which saves manual data acquisition time.
Develop distributed computing systems (DCS) or edge computing for real-time multi-camera
data processing at low latency.
1. IoT Integration:
Computer vision and IoT sensors (e.g., ultrasonic sensors) are merged and optimized for better
detection robustness and coverage.
2. Vehicle Identification:
Vehicle type recognition/license plate recognition (LPR) can be embedded to enhance the
system.
5.3.4 Broader Applications
Incorporate the system into mobile devices or information displays to provide real-time
information on the status of parking lot occupancy to driving automobiles.
Connect urban traffic systems in order to intelligently guide vehicles to areas made available
for use and thus help with traffic jams.
To extend the system to all possible settings where sufficient free parking spaces are not a
In order to improve the processing speed, reduce the computation load, adopt the
computationally weak object detection models (for example, YOLO-Nano or MobileNet).
In order to assure accurate mapping of occupancy information even at very high traffic rates,
state-of-the-art tracking algorithms (SORT or DeepSORT) are used to restore occupancy
information with high accuracy.
To be able to assess the performance and robustness of a system in a field of application, the
tests have to be carried out for a long time under different conditions.
5.4 Summary
The main contributions of the project in this chapter are discussed with a focus on how the
project could be integrated into an inexpensive, expandable solution to revolutionize the
paradigm of parking management. Although the system achieves good results, environmental,
scalability and computational efficiency problems still exist.
The presented future directions give an idea of how the issues described should be addressed,
either by increasing the accuracy, automating the setup and by reaching system flexibility.
When taken together, these improvements, the parking lot counter scales up to an advanced
adaptive system for the contemporary urban infrastructure that can be employed for smart city
and smart traffic management solutions.
REFERENCES