Giter Site home page Giter Site logo

ninja2k3 / smart-parking-monitoring Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 59.95 MB

Webapp made with flask and mongoDB, features real time monitoring of parking slot with ESP32 and ultrasonic sensors along with image processing applied to parking lot video.

License: MIT License

Python 97.86% CSS 0.03% HTML 0.18% C 0.36% C++ 1.28% Batchfile 0.01% Assembly 0.02% Cython 0.11% JavaScript 0.05% PowerShell 0.10%

smart-parking-monitoring's Introduction

Smart-parking-monitoring (MCES EL)

Kushal J - 1RV21CS072 Niranjan S - 1RV21CS103 Mohammad Afzal - 1RV21CS91 Nandan Kumar HR - 1RV21CS97

Software approach with openCV : Webapp made with flask and mongoDB, features real time monitoring of parking slots with ESP32 sensor and image processing with openCV. Sensor data is transmitted to firebase realtime database.

For detection of vehicles in parking spots, open source repository PARKING SPACE DETECTION IN OPENCV by olgarose was referred. The user had created a method of detecting cars with computer vision. Firstly a local video file and a screenshot of one of its frames are passed as input. User is allowed to declare coordinates on the image for parking lot by letting them use their mouse as a brush. The approach for this was using an openCV window where the mouse can give inputs. The stored coordinates were converted to yaml data which was then parsed to form quadrilaterals around the given coordinates for the specified parking area. Filters like Gaussian blur and canny detection allow for monitoring for the presence of vehicles in the declared parking spot by marking them with green. Output is again displayed in an openCV window.

To make this work with our preferred tech stack we made a few changes : We understood the code structure and the functions used, we used the coordinates generator strictly to give input and we are treating this a seperate software only available to the admin of our website. feeder.py file allows us to generate coordinates for monitoring. In the motiondetecter.py file we had to accomodate streaming the monitoring video footage to our website and not through an openCV window. We accomplished this by using the imencode file inbuilt in openCV. We encoded each frame of the video in '.jpg' format, added it to a buffer and streamed bytewise to our server in a way that our flask server could convniently stream the video file without delay. Lot of modifications had to be done in the coordinatesgenerator and motiondetector files. Motion detector function was set to be called on the click of a button in our website. 'coordinates_1.y' in the project is an example for a file which stores the coordinates. We can pass the preferred coordinates file as an argument to our function. We changed the code to store the marked coordinates until we explicitly decide to change it again by running the feeder.py file.

Hardware approach with ESP32 and ultrasonic sensors:

The file named "EL.ino" holds the code fed to the sensor module to connect to a local network, access our firebase server and then feed the sensor data from it onto firebase.

In summary,

run feeder.py in api folder to pick coordinates

run the flask server

register and login to site

click on the park button to view monitored video footage

smart-parking-monitoring's People

Contributors

kingkushal16 avatar ninja2k3 avatar

Watchers

 avatar

Forkers

kingkushal16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.