WebCam Go image grabber (wcggrabber) is an image grabber for linux that can use the UYVY palette of the Creative WebCam Go. It is based on vgrabber by Phil Blundell and can capture a single image (frame) from a video4linux device. Output image format is Netpbm PPM rawbits (RGB with 8 bits per colour), with an unknown gamma function (see ppm docs). The YUV to RGB conversion is done with code from yuv2ppm.c by Scott Scriven.
This program ist licensed under the terms of the GPL.
wcggrabber -h to get a short description of its options:
WebCam Go image grabber (wcggrabber) version 1.7.0 Copyright (C) 2005-2009 by Erik Auerswald <firstname.lastname@example.org> Usage: wcggrabber [OPTION]... without any options an image is written to stdout using current device settings Options: -h|--help print this help -V|--version print program version number -v|--verbose verbose program execution -q|--quiet quiet program execution -i|--info-only query capabilities of video device and exit -s|--set-only set device parameters and exit -f|--file|-o|--out-file=FILE write output to FILE (- for stdout) -d|--device=DEVICE specify video4linux DEVICE -S|--size=WIDTHxHEIGHT set image WIDTH and HEIGHT -S|--size=KEYWORD set image size described by KEYWORD (--size=help for list) -M|--max-size set maximum supported image size (obsolete) -I|--min-size set minimum supported image size (obsolete) -b|--brightness=BRIGHTNESS set BRIGHTNESS -H|--hue=HUE set HUE -c|--colour=COLOUR set COLOUR -C|--contrast=CONTRAST set CONTRAST -w|--whiteness=WHITENESS set WHITENESS (monochrome only) -p|--palette=PALETTE set capture image PALETTE (--palette=help for list) -D|--depth=DEPTH set capture image DEPTH -n|--channel=NUMBER set source channel NUMBER -a|--auto-bright use vgrabber's automatic RGB brightness adjust -t|--max-tries=NUMBER maximum NUMBER of tries for RGB brightness adjust -R|--rgb-map=MAP mapping of red, green, and blue values MAP = RGB | RBG | GRB | GBR | BGR | BRG -g|--swap-gb swap green and blue bytes in output (obsolete) -r|--swap-rb swap red and blue bytes in output (obsolete) -l|--ignore-lsb ignore LSB in RGB555 mode -m|--ignore-msb ignore MSB in RGB555 mode -W|--write-raw write raw v4l output instead of PPM -Y|--lum-only write a greyscale image using only Y value (YUV palettes only) -A|--wait-after-open=SECONDS wait SECONDS after opening the v4l device -z|--discard-frames=NUMBER grab and discard NUMBER image frames before grabbing the output frame Defaults: write output to "stdout" use v4l device "/dev/video0" for input ignore most significant bit (MSB) when using RGB555 palette maximum number of tries for brightness adjustment is 100
When invoked without any arguments, wcggrabber captures an image from the default input device /dev/video0 and writes it to stdout. If necessary, the palette to use is probed (if the camera is monochrome, 8, 6, and 4 bit greyscale is tried, otherwise RGB24, RGB32, RGB565, RGB555, UYVY, YUYV, YUV422, YUV420, YUV422P, YUV411P, YUV420P, and YUV410P).
To query or change the current settings of a video4linux device without capturing an image use option -i resp. -s.
Option -a activates automatic brightness adjustment as found in vgrabber. It's intended for RGB capturing palettes only and has a limited number of tries (vgrabber has no limit on the number of adjustments). The limit defaults to 100 and can be changed using option -t NUMBER.
When setting the palette the right capture depth is guessed, it can be overridden by using the -D DEPTH option after the -p PALETTE option.
You can read the manual page online.
Source code to wcggrabber 1.7.0.
Gentoo ebuild for wcggrabber 1.7.0 (thanks to Klaus Klaus Denker).
Source code to wcggrabber 1.6.4.
Source code to wcggrabber 1.6.3.
Source code to wcggrabber 1.6.2.
Source code to wcggrabber 1.6.1.
Source code to wcggrabber 1.6.
Source code to wcggrabber 1.5.
Source code to wcggrabber 1.4.1.
Source code to wcggrabber 1.4.
Source code to wcggrabber 1.3.2.
Source code to wcggrabber 1.3.1.
Source code to wcggrabber 1.3.
Source code to wcggrabber 1.2.
Source code to wcggrabber 1.1.9.
Source code to wcggrabber 1.1.8.
Source code to wcggrabber 1.1.7.
Source code to wcggrabber 1.1.6.
Source code to wcggrabber 1.1.5.
Source code to wcggrabber 1.1.4.
Source code to wcggrabber 1.1.3.
Source code to wcggrabber 1.1.2.
Source code to wcggrabber 1.1.1.
Source code to wcggrabber 1.1.
Source code to wcggrabber 1.0.
The Winbond W996CF JPEG Dual Mode Camera Chip used in the Creative WebCam Go supports only the UYVY palette. Since most image grabbers for linux don't work with this palette, I've written wcggrabber. To use other software, a third party kernel module that does the necessary colorspace conversion can be used.
The kernel module w9968cf-vpp (maintained outside of the linux kernel) can be used to circumvent the palette limitations of the Creative WebCam Go and use different capturing software.
MPlayer can be used to watch the video stream and to capture images with the screenshot filter or one of the image video output drivers. MEncoder can be used to capture the video stream.
The program tvtime can be
used to watch the video and take screenshots. The number of video buffers
provided by the Winbond W996CF JPEG Dual Mode Camera Chip driver
should be increased to at least 5
modprobe w9968cf max_buffers=5). The tested version 0.9.15
has some display problems.
The program xawtv can be used to watch the video, but not to record the stream or capture an image. Tested versions 3.94 and 3.95.
I've written a patch for vgrabbj version 0.9.6 to support the UYVY palette. The patch has been added to the CVS repository at the vgrabbj sourceforge project page.
Since wcggrabber uses the obsolete video4linux version 1 API,
it does not work with video4linux version 2 device drivers. While
some v4l2 drivers implement a v4l1 compatibility interface, some
do not. Of those with v4l1 compatibility, not all provide the
read(2) system call used by wcggrabber.
To overcome this limitation
Hans de Goede
can be used:
You might need to adjust the above command to reflect the actual path to
v4l1compat.so on your system.
The V4l-DVB Wiki.
libv4l by Hans de Goede.
The video4linux wiki (to be merged in the V4L-DVB Wiki, see above).
vgrabber.c by Phil Blundell on his Video4Linux page.
yuv2ppm.c by Scott Scriven from the YUV to RGB conversion page of FOURCC.org.
Something about YUV formats.
Something about RGB Bayer Color.
The lurker's guide to video.
The w9968cf-vpp kernel module by Luca Risolia can be found as part of the full-featured driver for Winbond W996CF JPEG Dual Mode Camera Chip on www.linux-projects.org.
The Netpbm package of graphics software can be used to manipulate the output of wcggraber.
MPlayer and MEncoder.
vgrabbj by Jens Gecius (devel (at) gecius (dot) de).
xawtv by Gerd Knorr.
The Webcam Project.
K-Team uses wcggrabber on their robots. See their FTP server for a patched version of wcggrabber 1.6.2 to work on ARM. An equivalent change is incorporated into wcggrabber 1.6.3.
back to my homepage.