Python interface to libcamiface
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
motmot
.gitignore
LICENSE.txt
README.rst
setup.py
stdeb.cfg

README.rst

:mod:`cam_iface` -- Python wrapper of libcamiface

This is a ctypes wrapper of :ref:`libcamiface`. It requires libcamiface 0.5.9 or higher.

Installation

The usual:

python setup.py install

License

pycamiface is licensed under the BSD license. See the LICENSE.txt file for the full description.

Example usage

A very simple example of usage is in the file demo/very_simple.py. This file contains the following:

# Also the example in ../README.rst -- so keep in sync
import pkg_resources
import motmot.cam_iface.cam_iface_ctypes as cam_iface
import numpy as np

mode_num = 0
device_num = 0
num_buffers = 32

cam = cam_iface.Camera(device_num,num_buffers,mode_num)
cam.start_camera()
frame = np.asarray(cam.grab_next_frame_blocking())
print 'grabbed frame with shape %s'%(frame.shape,)