Giter Site home page Giter Site logo

opencv-wrappers's Introduction

Wrappers for OpenCV

A collection of object-oriented wrappers in Python wrappers for OpenCV.

Motivation

OpenCV provides an enormous amount of useful utilities and functions related to computer vision, from matrix operations to face recognition. It comes with a set of bindings for Python generated by SWIG, but unfortunately these aren’t very Object Oriented, and can be tricky to use (users have to remember to release resources by hand, etc).

This is a still very incomplete set of objects that wrap common concepts in OpenCV into objects: Camera, Image, Window and so on. There are definitely tons of bugs, so beware. This project has been set up only as a way of representing the knowledge the authors have gathered about OpenCV and is not intended to be a complete set of OO wrappers for the library – but contributions of any kind are definitely welcome.

Installation

Make sure you have OpenCV and the Python bindings for it. If you have everything installed correctly, you should be able to run this successfully:

python -c 'import opencv; import opencv.highgui'

If this command generates any output, you need to have a look at your installation of OpenCV and the Python bindings. Make sure you’re using the correct version of Python, and that it is compatible with the bindings.

Example


# Outputs the video coming from the first webcam found into the main window.
# See also @camera-display.py@.

from wrappers import *

camera = Camera(CV_CAP_ANY)
window = Window()

while True:
  window.show(camera.frame())
  if escape_pressed():
    window.destroy()
    break

opencv-wrappers's People

Contributors

cv avatar frankmt avatar

Watchers

 avatar  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.