QCAM(1)

NAME
qcam, xqcam - get pictures from B&W Connectix QuickCam(tm)

SYNOPSIS

xqcam [ -pport ] [ -xwidth ] [ -yheight ] [ -ttop ] [ -lleft ] [ -sscale ] [ -Bbpp ] [ -bbrightness ] [ -ccontrast ] [ -wwhitebal ] [ -W ] [ -Eautoexposure-params ] [ -D ] [ -e ] [ -u ] [ -r ] [ -Swindow-scale ] [ -i ] [ -fconfig-file ] [ -ddump-file ] [ -H ] [ -V ] [ -h ]

DESCRIPTION
xqcam is a program that displays the output of a QuickCam on a system running X11.

qcam is a program that takes a single snapshot from a QuickCam, and writes the image to standard output in PGM format.

  OPTIONS

-pport
    Parallel port the QuickCam is attached to. The first printer port is 0x378, the second is 0x278. Specifying a port of 0 causes qcam to "autoprobe", attempting to find the QuickCam port automatically.

-xwidth -yheight -ttop -lleft
    The QuickCam CCD is 336 pixels wide by 243 pixels high. The above four parameters specify what part of this large rectangle will be read and displayed. The valid ranges for top and height are 1-243. The valid range for width is 1-336. The valid range for left is 2-336, with the additional requirement that left be even. The leftmost 12 pixels of the CCD are always black, so left is usually 14 or more.

-sscale
    scale can be 1, 2, or 4. It specifies what fraction of the QuickCam data should be discarded. scale of 1 indicates that all the data should be sent. scale of 2 indicates that half of the pixels on each line and half of the lines should be discarded, resulting in 1/4 as much data being transferred. scale of 4 likewise means a fourfold shrinking in each direction.

-Bbpp
    Bits per pixel. Valid values are 4 (giving sixteen shades of gray) and 6 (giving 64 shades of gray).

-bbrightness
    Exposure time. Useful values are 1-254, with low numbers indicating short exposures (for use in bright light) and high numbers indicating long exposures (dim light). brightness of 255 puts the Cam in "bulb mode", which is not useful with qcam and xqcam.

-ccontrast
    contrast is normally set at 104. Low numbers indicate low contrast. Valid values are 0-255.

-wwhitebal
    whitebal indicates what CCD voltage level corresponds with a black pixel. Low whitebals make a picture dark. Normally, the user doesn't adjust this parameter, but does it automatically with -W.

-W  Autoadjust white balance. The QuickCam can automatically figure out what CCD voltage value corresponds with black by looking at those twelve leftmost always-black pixels.

-Eautoexposure-parameters
    Automatically adjust exposure. -E takes from one to five parameters. They are, in order: mode target-lum tolerance-lum std-target-lum std-tolerance-lum mode is an integer. Modes 0 and 1 examine the average brightness of the picture, and adjust the brightness until the average pixel luminance is in range. Mode 0 looks at the whole picture; mode 1 looks at only the center ninth of the picture. Mode 2 adjusts contrast to get the standard deviation of the pixel luminance into range. Ranges are specified in the next four parameters; if they are not supplied, reasonable defaults are used. From getopt's point of view, -E takes one parameter. So if you're specifying more than one parameter, enclose the parameters in quotes.

-e  Perform edge detection. Very primitive at this point.

-D  Remove dark current speckling. With a high brightness, some of the pixels leak current even if they are not exposed to light. -D removes these bad pixels by replacing them with an average of their neighbors. To create the bad pixel map, run make.darkmask, which is included with qcam and xqcam.

-u  Force unidirectional port mode. qcam automatically detects and uses bidirectional parallel ports. If your port is being misdetected as bidir when it is really unidir, use this flag to force the correct mode.

-r  xqcam only. Release Cam lock with every scan. qcam and xqcam lock the Cam when they use it, to ensure that two processes don't both try to read data at the same time. -r forces xqcam to release the lock with each scan, so that another process can read a frame between successive xqcam scans.

-Swindow-scale
    xqcam only. Scale display window by a factor of window-scale. For instance, if you are scanning an area of 64x80 pixels, setting window-scale to 4 results in an xqcam window 256x320. By default, the pixels are simply duplicated to enlarge the window. If the -i flag is specified, the intermediate pixels are interpolated instead.

-i  xqcam only. If window-scale is set (to a number greater than one) with the -S flag, -i interpolates the intermediate pixels instead of duplicating them. This results in a less blocky picture.

-fconfig-file
    Read alternate configuration file. A self-explanatory configuration file is stored in /usr/local/etc/qcam.conf. Use -f if you want to read a different configuration file. This is most useful if you have two Cams.

-ddump-file
    qcam only. Dump Cam internal information to dump-file. This information is in a format suitable to be used as a qcam.conf file, or it can be added to the image with image processing tools.

-H  Add histogram. A bar graph of pixel values is added to the upper left corner of the scan.

-V  Verbose mode.

-h  Print usage information.

FILES
/usr/local/etc/qcam.conf    Configuration file

SEE ALSO
The QuickCam Third Party Developers web page at http://www.crynwr.com/qcpc.

BUGS
Autodetection is very brittle.

You can have multiple Cams and multiple config files, but only one dark mask file.

The new Color QuickCam is not handled with this software, although there are Color Cam drivers available from the web site.

The wide-angle lens of the QuickCam gives an ugly barrel distortion. Michael Herf has written warp(1) to fix this, but since warp(1) doesn't know what part of the CCD is in the image, it only works on images whose center is the center of the CCD.

AUTHORS
Scott Laird (original code), Brian Scearce (bidirectional and dark current modifications, xqcam window scaling, edge detection), Ed Orcutt (autoexposure modifications), Dave Plonka (locking code).