[Prev][Next][Index][Thread]

python quickcam module for Linux (fwd)





  I've updated (well.. rewritten) my quickcam module to snap jpeg images
now instead of gifs. You can download it and the required other stuff
(except for Python ;) at http://people.magnet.com/~davem/qcam - here's
the README:

  This python extension module allows one to snap jpeg images on
a Linux machine using a B/W Connectix quickcam. In order to compile
and use it, you must first have installed three packages:

   Python 1.4 (My favorite language)
       (http://www.python.org),
   libjpeg-6
       (ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6a.tar.gz)
   quickcam kernel module (by Thomas.Davis@mnscorp.com)
       (ftp://ftp.unm.dorm.net/pub/quickcam/qcam-module-0.1.tar.gz)

  Finally, just type "make" in this directory (note you might have
to do something for it to find "quickcam.h" which comes with
the kernel module.

  Now- to use it! Here's how to snap a 320x200 jpeg from your
quickcam:

[davem@roach web_qcam]$ python
Python 1.4 (Apr 23 1997)  [GCC 2.7.2.1]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import qcam
>>> x=qcam.qcam(320,200)
>>> l = x.snap()
>>> open('test.jpg','w').write(l)
>>>

  TaDa! Note that you can only take a 320x200 image at the moment!
The camera supports zooming and other cool stuff, but I haven't dealt
with that at the moment. So for now, you just get 320x200 unidirectional
parallel port support. Also the contrast,brightness, etc.. are all
hardcoded as well. YMMV on the image quality settings as they stand.

  Please let me know if you're interested in this! I won't work on it
any faster if noone cares ;) I also have a python jpeg-server-push program
that works with this to give you live images in a web page if anyone wants
it!

                                                Dave Mitchell
                                                davem@magnet.com