Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
/ cvloop Public archive

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

License

Notifications You must be signed in to change notification settings

shoeffner/cvloop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3ddd311 · Feb 7, 2019

History

67 Commits
Feb 7, 2019
Oct 30, 2017
Oct 30, 2017
Oct 30, 2017
May 29, 2017
May 29, 2017
Nov 22, 2017
May 29, 2017
Jan 1, 2018
May 18, 2017
May 18, 2017
Oct 30, 2017
May 29, 2017
Jan 26, 2017
Nov 25, 2016
May 29, 2017

Repository files navigation

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