github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

cv / opencv-wrappers

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 8
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A collection of object-oriented Python wrappers for OpenCV — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Merge branch 'master' of git://github.com/cv/opencv-wrappers 
frankmt (author)
Fri May 16 08:33:57 -0700 2008
commit  082488bad62dd2f89e42eee3744dcd19cf378a0b
tree    13318b5c6bb360aabe67867e640c5151884d1039
parent  776c381cec6b54cd325e7c50ccad27048920b2ae parent  3f882bd3847227a4867a5f791ee12f96c23933a2
opencv-wrappers /
name age
history
message
file .gitignore Loading commit data...
file README.textile
file camera-display.py
file color_filtering.py
file finger-tracking.py
file wrappers.py
README.textile

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
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server