Coder Social home page Coder Social logo

emwest07 / mines_parking_hack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ryanf55/mines_parking_hack

0.0 1.0 0.0 58.39 MB

Mines Data Analytix Hackathon Winning Project - Determining Open Parking Spots for CSM Students

C++ 45.69% MATLAB 54.31%

mines_parking_hack's Introduction

mines_parking_hack

The purpose of this project is a hackathon submission for the Mines Data Analytix Hackathon that took place on October 25-26,2019. This (disorganized) repository is a chronicle of our work within OpenCV to create an app to draw the parking lot spaces and the further processing within Matlab to identify which spots are occupied by cars. Due to the time constraints of the competition, we implemented a naive approch by segmenting the image and comparing to a previous frame to determine which spots have changed.

The c++ code, main.cpp, is an interface to read in a single image of a webcam and allow the user to draw the parking spot lines. Encapsulate the parking spots in closed contours (any order) by clicking to add points. You can undo up to one line with the 'u' key(undercase), and when complete press escape. It then saves a csv of the points of each line ending in x,y pairs by row.

The Matlab script uses a filter to generate

For the results of the competition, we obtained the first place prize for best overall hack, as well as best presentation and best overall hack.

The presentation for the project with underlying theory is uploaded to the Repo in PDF format as "MinesPark.pdf".

Below are notes we used for the project and exploration:

Theory of operation

  1. Establish where spots are by drawing lines. Detect spots by any 4 corner closed polygon. Save this to a file that can be applied to any image along with the source image that can be transformed to the original coordinates
  • spot1
    • <corner1x,corner1y>
    • <corner2x,corner2y>
    • <corner3x,corner3y>
    • <corner4x,corner4y>
  • spot2
    • <corner1x,corner1y>
    • <corner2x,corner2y>
    • <corner3x,corner3y>
    • <corner4x,corner4y>
  1. Any closed polygon will be a mask spot. Count the number of masks to get number of spots

  2. Compare two images by subtracing them and absolute valuing the difference. Any difference can be assumed a car leaves or enters. Compare the spot to close area adjacent to it to see if its a spot or not?

  3. Establish an output image of green/red depending if is occupied -> Done, but based on hard coded initial positions of the cars.

  4. Upload to sql database and create online stats of where spots are. Could be live projected normal image?

Blob References:

Vehicle Tracking

CNN Detection

mines_parking_hack's People

Contributors

ryanf55 avatar natkalin avatar

Watchers

James Cloos avatar

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.