Skip to content

alperrkilic/Parking-Space-Counter-Project

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Parking Space Counter

A Parking Space Counter Project
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Images
  4. License
  5. Contact
  6. Acknowledgments

About The Project

Product Name Screen Shot

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.

(back to top)

Built With

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.

  • Python
  • openCV

(back to top)

Getting Started

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.

Prerequisites

To install the required files, please enter the following commands into your terminal:

  • pip
    pip install opencv-python 
    pip install cvzone
    pip install numpy

Installation

Installing the Parking Space Counter is quick and easy. Follow these simple steps to get started in just a few minutes!

  1. Create your virtual environment with Pycharm
  2. Clone the repository to your local machine:
    git clone https://github.com/alperrkilic/Parking-Space-Counter-Project
  3. Install the required dependencies:
    pip install opencv-python numpy cvzone
    Note: This project is built with Python 3.8, so make sure you have it installed on your machine.
  4. 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.

(back to top)

Images

Screen Shots

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

Screen Shots

Blurring the image after making it grayscale

Screen Shots

Converting image into a binary image with Thresholding

Screen Shots

After thresholding, to remove unwanted white pixels we are dilating the threshold image

Screen Shots

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.

Screen Shots

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.

Screen Shots

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.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Bayram Alper KILIÇ - @alperrkilic - [email protected]

Project Link: https://github.com/alperrkilic/Parking-Space-Counter-Project

(back to top)

Acknowledgments

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.

(back to top)

About

A Free Parking Space Finder Project with python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages