python and webcam

D

dfaber

Hi,
I have Logitech webcam and I need to grab images on Fedora Core 4 (not
my favorite distro). Are there any python modules available for doing
this? Any hints or suggestions would be welcome.

Thanks.
 
T

Terry Reedy

dfaber said:
Hi,
I have Logitech webcam and I need to grab images on Fedora Core 4 (not
my favorite distro). Are there any python modules available for doing
this? Any hints or suggestions would be welcome.

If is one of their ball cameras (or other shape)b with a USB connection,
then I would expect that you access it through the TWAIN protocol. (I
don't know how to do that from python, but wish I did!). If it is a truly
web-ready camera with a built-in server and ethernet connection, then you
access it via an http request to its inet address.
 
D

dfaber

Hi again,
I've tried a the Sane interface from PIL and I get the following
error, when I run the demo_pil.py from the Sane directory.
------------------------------------------------------------
SANE version: (16777231, 1, 0, 15)
Available devices= [('v4l:/dev/video0', 'Noname', 'Logitech QuickCam
Pro 3000', 'virtual device')]
Traceback (most recent call last):
File "/PyWebcam/demo_pil.py", line 17, in ?
s.br_x=320. ; s.br_y=240.
File "/usr/lib/python2.4/site-packages/sane.py", line 150, in
__setattr__
raise AttributeError, 'Inactive option: '+key
AttributeError: Inactive option: br_x
------------------------------------------------------------

Next, I looked at v4l support for python with absolutely no
documentation. I tried to build the modules and I get the following
error:
------------------------------------------------------------
python setup.py build
running build
running build_ext
building 'v4l' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables -D_GN U_SOURCE -fPIC -fPIC
-I/usr/include/python2.4 -c v4l.c -o build/temp.linux-i686- 2.4/v4l.o
v4l.c: In function 'v4l_getImage':
v4l.c:890: warning: pointer targets in assignment differ in signedness
v4l.c: In function 'initv4l':
v4l.c:1585: error: 'VIDEO_AUDIO_BALANCE' undeclared (first use in
this function)
v4l.c:1585: error: (Each undeclared identifier is reported only once
v4l.c:1585: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1
------------------------------------------------------------

I also looked at libfg http://antonym.org/libfg and I get the following
errors again:
-------------------------------
python setup.py build
running build
running build_ext
building 'fg' extension
gcc -pthread -shared build/temp.linux-i686-2.4/fgmodule.o -L. -lfg -o
build/lib.linux-i686-2.4/fg.so
/usr/bin/ld: cannot find -lfg
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I google-ed extensively have so far found only these three packages.
Any ideas why I get these error messages?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top