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

Re: grabbing from USB-Webcam (2nd)



On Sat, 2003-11-29 at 02:06, Markus Hansen wrote:

> Does someone have an idea, how to grab an image from a webcam
> and store the image in a variable in C++?
> I want to do some Vision-Control on an industrial robot,
> therefore I have to grab images from the webcam at regular intervals.
> I do want to code this in C++.
> 
> Has someone have an idea or can send me a link to someone,
> who is grabbing images from webcams?

I wrote a library called libfg [0] for image capture that will do what
you want.  It is written in C and uses the Video4Linux API, so will work
with TV tuner cards, video capture cards, and even USB cameras.  It has
been tested on a variety of cards (mostly bttv based) and a few
cameras.  It should work with Firewire cameras using the V4L loopback
interface, but I haven't tried it yet.

It was written for our Robocup [1] team [2] and is also used in a few
other projects [3].  It provides a simple interface for controlling
capture parameters, and transparently handles double-buffering.  It has
been used in several realtime applications, and provides a simple fast
way for image capture.

If you are doing industrial control, I suggest you look at something
better than a webcam for image acquisition.  Both the frame rate and the
image quality is typically not very good.  I suggest you have a look at
a decent analog camera (with a real lens) or (even better) a Firewire
camera.

There are a variety of image processing libraries you can choose from
also.  Check out VXL [4], OpenCV [5] and Gandalf [6].  They are all
FS/OSS, and you can interface libfg with them all.

Have fun, and Good luck!

  :: Gavin

[0] http://antonym.org/libfg
[1] http://www.robocup.org/
[2] http://www.cs.mu.oz.au/robocup/2003/F180/html/
[3] http://playerstage.sourceforge.net/
[4] http://vxl.sourceforge.net/
[5] http://www.intel.com/research/mrl/research/opencv/
[6] http://gandalf-library.sourceforge.net/


-- 
Gavin Baker // gavinb*antonym_org // Linux|Python|Esperanto|MIDI|Cheese



Reply to: