python and webcam

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dfaber

    #1

    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.

  • Philippe  Bouige

    #2
    Re: python and webcam

    In article <1139773485.698 970.195320@z14g 2000cwz.googleg roups.com>,
    dfaber wrote:
    [color=blue]
    > 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.[/color]

    You can try this :


    Comment

    • dfaber

      #3
      Re: python and webcam

      It is a Win32 Python Extension. I am looking for something that work
      on Linux.

      Comment

      • Fredrik Lundh

        #4
        Re: python and webcam

        "dfaber" <deusfaber@gmai l.com> wrote:
        [color=blue]
        > It is a Win32 Python Extension. I am looking for something that work
        > on Linux.[/color]

        here's one:

        Articles on C++ programming, Software Engineering and technology.


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

        </F>



        Comment

        • dfaber

          #5
          Re: python and webcam

          Thank you for your help. I will look around for v4l modules too.

          Comment

          • Terry Reedy

            #6
            Re: python and webcam


            "dfaber" <deusfaber@gmai l.com> wrote in message
            news:1139773485 .698970.195320@ z14g2000cwz.goo glegroups.com.. .[color=blue]
            > 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.[/color]

            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.



            Comment

            • dfaber

              #7
              Re: python and webcam

              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_SOURC E=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_BA LANCE' 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?

              Comment

              Working...