Git Product home page Git Product logo

socketflask's Introduction

OpenCV-Flask-Socket-IO

Rendering webcam Image through python OPEN-CV (Deployed in heroku) Example site

1 : Raw_image from JS using main.js pushed to socket /test and geathered by app.py file to class VideoCamera.
2 : The raw image (bytes64) in stored in list with name to_process. 3 : If to_process list is not empty, process_one method grab the last raw image string from the list.
4 : process_one method store the output image in output_image_rgb list, in this method we perform our preprocessing with the image by converting bytes64 to cv readable array format.
5 : get_frame method get the latest output_image from the list. Here we are getting the base64 type image output
6 : Route '/video_feed' get the image through the generator and response with the bytes64 image.
7 : In index.html <img id="imageElement" src="{{ url_for('video_feed') }}" style=" height: 300px;"> get the image to display.


Deployment procedure

The project is designed to deploy as heroku application.

1 : Clone this repository using $ git clone https://github.com/neoaman/OpenCV-Flask-Socket-IO.git
2 : Go to the clonned directory $ cd OpenCV-Flask-Socket-IO
3 : Remove the .git file $ rm -r .git/
4 : Login to your Heroku account $ heroku login

  • Press Enter to open the browser.
  • Enter the Login credentials for your account.

5 : Create an application $ heroku create <your_application_name> (replace <your_application_name> as desired)
6 : Initiate a new .git $ git init
7 : Add the files to remote repository $ heroku git:remote add -a <your_application_name>
8 : Add the files to repository $ git add .
9 : Commit the changes $ git commit -am '<Your commit message>'
10 : Push the files to heroku $ git push heroku master

Now you can see your work on https://<your_application_name>.herokuapp.com

socketflask's People

Contributors

lucipengu avatar

Watchers

 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.