[Motmot] motmot.cam_iface + isight + snowleopard
Laurent Perrinet
laurent.perrinet at incm.cnrs-mrs.fr
Thu Apr 8 08:10:56 UTC 2010
Hi list!
I have achieved to install the libcamiface libraries + python interface on a macosx 10.6 without a problem / It allows me to grab a frame from my isight from within python in a few lines:
import motmot.cam_iface.cam_iface_ctypes as cam_iface
mode_num = 0
device_num = 0
num_buffers = 32
cam = cam_iface.Camera(device_num,num_buffers,mode_num)
cam.start_camera()
import numpy as np
frame = np.asarray(cam.grab_next_frame_blocking())
print 'grabbed frame with shape %s'%(frame.shape,)
import pylab
pylab.imshow(frame)
this works very well. I wondered: is it possible to set the size of the image to be grabbed before hand? I'm interested in grabing smaller images with higher fps.
Thanks,
Laurent
--
Laurent Perrinet - INCM (UMR6193)/CNRS
http://www.incm.cnrs-mrs.fr/LaurentPerrinet
More information about the Motmot
mailing list