Attachment 'pysight.py'

Download

   1 """
   2 pysight.py : Testing the python iSight wrapper.
   3 
   4 
   5 this depends on OpenCV, which intalls fine with MacPorts: {{{
   6 sudo port install opencv +python26 +tbb
   7 }}}
   8 
   9 Laurent Perrinet, 2010. Credits: see http://www.incm.cnrs-mrs.fr/LaurentPerrinet/SimpleCellDemo
  10 
  11 $Id: pysight.py 4250 2010-10-10 09:59:04Z perrinet $
  12 
  13 """
  14 import cv
  15 import time
  16 
  17 cv.NamedWindow("camera", 1)
  18 
  19 capture = cv.CaptureFromCAM(0)
  20 
  21 while True:
  22     img = cv.QueryFrame(capture)
  23     cv.ShowImage("camera", img)
  24     if cv.WaitKey(10) == 27:
  25         break

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2014-10-25 14:23:08, 0.6 KB) [[attachment:Makefile]]
  • [get | view] (2012-03-17 18:47:06, 28134.7 KB) [[attachment:SimpleReceptiveField.app.zip]]
  • [get | view] (2014-10-25 14:27:28, 7.8 KB) [[attachment:SimpleReceptiveField.py]]
  • [get | view] (2014-10-25 14:27:28, 4.6 KB) [[attachment:SimpleReceptiveField.zip]]
  • [get | view] (2014-10-25 14:27:29, 0.5 KB) [[attachment:pysight.py]]
  • [get | view] (2010-04-19 08:21:19, 321.4 KB) [[attachment:screenshot.png]]
  • [get | view] (2014-10-25 14:27:36, 1.7 KB) [[attachment:setup.py]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.

welcome: please sign in