A Parking Space Counter Project
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
The Parking Space Counter project is designed to help parking lot operators or drivers quickly and easily determine the number of available parking spaces in a lot. By using computer vision techniques to analyze video footage of the lot, the system can accurately count the number of open spaces and make this information available in real-time. This project can be easily applied to any parking space with just a camera and a computer, helping people find available parking spots quickly and easily.
Here's why:
- Saves time and reduces frustration: Finding a free parking space can be a challenge, especially in busy areas. With the Parking Space Counter, you can quickly and easily locate available parking spots without having to drive around and waste time searching.
- Increases efficiency and maximizes space utilization: By accurately counting the number of available parking spaces, the Parking Space Counter allows parking lot operators to make more informed decisions about space utilization. This can help increase efficiency, reduce congestion, and ultimately make the parking experience better for everyone involved.
In conclusion, the Parking Space Counter is a powerful tool that utilizes computer vision techniques to accurately count the number of available parking spaces in a given lot. With its customizable parameters and easy-to-use interface, the system is ideal for anyone looking to manage or navigate a busy parking lot. By using this tool, drivers can save time and reduce frustration, while parking lot operators can increase efficiency and maximize space utilization. Whether you're managing a large commercial lot or just looking for a free parking spot in a busy area, the Parking Space Counter is the solution you've been looking for.
The Parking Space Counter is a project that uses OpenCV and Python to count the number of available parking spaces in a given parking lot.
The Parking Space Counter is a project that uses OpenCV and Python to count the number of available parking spaces in a given parking lot. In this project, parking spaces are counted according to the pixels that are counted from a dilated image. If the number of pixels are above 900, then the space is considered to be not available. However, if the number of pixels are below 900, then the space is considered to be an empty parking space.
Additionally, this project includes a script called ParkingSpacePicker.py, which allows you to manually add a parking space to the list of spaces to be checked.
To install the required files, please enter the following commands into your terminal:
- pip
pip install opencv-python
pip install cvzone
pip install numpy
Installing the Parking Space Counter is quick and easy. Follow these simple steps to get started in just a few minutes!
- Create your virtual environment with Pycharm
- Clone the repository to your local machine:
git clone https://github.com/alperrkilic/Parking-Space-Counter-Project
- Install the required dependencies:
Note: This project is built with Python 3.8, so make sure you have it installed on your machine.
pip install opencv-python numpy cvzone
- Open the project in Visual Studio Code or your preferred code editor.
That's it! You're now ready to use the Parking Space Counter project.
Places that are considered as parking spaces manually selected with ParkingSpacePicker.py
After selecting the parking spaces, storing them into CarParkPos file and splitting each frame that are selected with ParkingSpacePicker.py
Blurring the image after making it grayscale
Converting image into a binary image with Thresholding
After thresholding, to remove unwanted white pixels we are dilating the threshold image
To adjust the thickness, we're generating the median image
After dilation and median images, it's evident whether there's a car in a parking spot or not.
Now, on our original dilated image, we can count the white pixels and display their numbers on the image. If a parking space is empty, the number of white pixels is expected to be less than 900. However, if the number of white pixels is more than 900, it is an indication that there is a car present in the parking space.
Finally, we count the number of available parking spaces and draw rectangles around each parking spot. If a parking space is available, we mark it with a green color, and if it is occupied, we mark it with a red color.
See the main.py for the detailed explanations on the code.
Distributed under the MIT License. See LICENSE.txt
for more information.
Bayram Alper KILIÇ - @alperrkilic - [email protected]
Project Link: https://github.com/alperrkilic/Parking-Space-Counter-Project
Creating a project like the Parking Space Counter requires a lot of research, experimentation, and dedication. I would like to take this opportunity to acknowledge and thank the many individuals, channels, and websites that helped me along the way. Without their guidance and support, this project would not have been possible. In particular, I would like to recommend the following channels and websites for their invaluable resources and contributions to the field of computer vision and image processing.