Giter Site home page Giter Site logo

vicnoah / cvloop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shoeffner/cvloop

0.0 0.0 0.0 1.48 MB

cvloop allows online video transformation and evaluation with OpenCV. Designed for jupyter notebooks.

License: MIT License

Makefile 4.87% Python 88.57% Jupyter Notebook 6.56%

cvloop's Introduction

cvloop

Provides cvloop, a way to show opencv video loops. Designed for jupyter notebooks.

Simple example: Show webcam feed.

from cvloop import cvloop
cvloop()

More complex example: Show webcam feed side by side with inverted image.

from cvloop import cvloop
cvloop(function=lambda frame: 255 - frame, side_by_side=True)

Complex example: Show video file with background extraction (See OpenCV Documentation; Video).

from cvloop import cvloop
import cv2

def mog2(frame):
    return mog2.fgbg.apply(frame)
mog2.fgbg = cv2.createBackgroundSubtractorMOG2()

cvloop('768x576.avi', function=mog2, side_by_side=True)

More examples: For more examples check out the examples notebook.

Install

You can simply install cvloop using pip (make sure to install matplotlib, numpy, OpenCV and Jupyter):

pip install cvloop

Or, if you are using conda and don't want to worry about requirements, just use conda-forge:

conda config --add channels conda-forge
conda install cvloop

Requirements

(Recommended versions, additionally tested versions in parentheses.)

  • Python 3.6
  • OpenCV 3.2
  • Jupyter 4.3.1
  • matplotlib 2.0.0
  • numpy 1.12.0

Development

To contribute, just fork the repository and create pull requests.

To publish, you need a couple of additional tools:
  • gpg to sign the packages
  • twine to upload them
  • shasum to calculate the checksum for conda-forge
  • hub to create the pull request for conda-forge

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.