473,507 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python and webcam

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.

Feb 12 '06 #1
6 8064
In article <11**********************@z14g2000cwz.googlegroups .com>,
dfaber wrote:
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.


You can try this :

http://videocapture.sourceforge.net/
Feb 12 '06 #2
It is a Win32 Python Extension. I am looking for something that work
on Linux.

Feb 12 '06 #3
"dfaber" <de*******@gmail.com> wrote:
It is a Win32 Python Extension. I am looking for something that work
on Linux.


here's one:

http://antonym.org/libfg

(for more alternatives, google for "python webcam linux" or some
variation thereof)

</F>

Feb 12 '06 #4
Thank you for your help. I will look around for v4l modules too.

Feb 12 '06 #5

"dfaber" <de*******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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.

Feb 12 '06 #6
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?

Feb 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
8493
by: Mirco | last post by:
Hi, I'd like to know if is it possible to make python communicate with a webcam. Of course, I think it is possible... but I don't know if there is a specific module for this kind of work. Can...
1
3930
by: Kelowna | last post by:
Yes... Its a server os... i kno! i hav xp yea but tis system is for screwing with.. Im sure theres alot of ppl here tat kno tis stuff inside-out! im doing this for educational purposes so dont give...
4
11956
by: Joakim Rylander | last post by:
Hi all, I need to create a public booth where people can look at themselves in a webcam and snap a picture which will be seen on a webpage. The backend is easy, it's the webcam part that I have...
0
2209
by: Elp | last post by:
Hi, We have developped an client application in C#. Among other things, this application should display in 4 different windows (or 4 different panels in the same window), 4 webcam streams (web...
4
15160
by: Mathieu Chavoutier | last post by:
Hi. Is it possible to do a program that show the "film" that is currently on our webcam ? I do not have a Webcam for the moment, so, if you have advices to chose a Webcam compliant (with what...
3
3263
by: derek | last post by:
I m looking for help about python-sane, The follow sample code try to grab the image from the webcam through a /dev/video0 on linux, it works fine for the first 185 times, but it freeze the...
5
3235
by: Synt4x | last post by:
I'm using VideoCapture in windows to obtain images from my webcam. The thing is, if i want to show a live video from my webcam i have to make an infinite loop and request an image everytime: ...
2
3791
by: Synt4x | last post by:
I'm creating a webcam user interface (to control google earth through my webcam) and I still can't find a good example to how to control the mouse to "click and drag" (not just click and release)....
3
2739
by: DillonCzerny | last post by:
Hello Many times I see a lot of people post webcam videos on google video or youtube. I wonder how do they record it from those people’s webcam? I have a fake webcam and I want to record some...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.