15.5. Webcam Operation with gqcam

gqcam is a webcam application that assists in taking snapshots or automatic picture series with webcams. To use gqcam, your webcam must be supported by Video4Linux. Many USB webcams are automatically recognized. Grayscale and color cameras can be used. TV cards that support Video4Linux can also be used as an image source. An overview of the supported USB devices is maintained at http://www.linux-usb.org. A graphical user interface is not compulsory because gqcam can also run from the command line.

15.5.1. Operation

Connect your camera to the USB port of your computer before starting gqcam. Then run gqcam. The current picture of your webcam is automatically shown in the upper part of the application window. The lower part has sliders for adjusting the brightness, white balance, contrast, tint, and color saturation as needed. The brightness is automatically preset. This feature can be set in General in File+Preferences. Filters features false color correction switches because some cameras swap the red and blue channels in transmission.

If you operate more than one webcam, use File+Open New Camera to switch to another camera. Select the new device from the dialog that opens. The first camera is attached to the device /dev/video0, the second is attached to /dev/video1, and so on.

15.5.2. Snapshots

To take a snapshot with a camera, click Snap Picture. Select a filename and picture format in the dialog that opens. Create a picture series with Camera+Set Timer. Set the capturing frequency in seconds or minutes along with the properties of the images in Set image information. An optional script to run after every capture event can be chosen with Run command after snap. This could, for example, be used to upload the captured image onto an FTP server.

15.5.3. Command Line

gqcam can also be run without its graphical user interface. This may be interesting, for instance, for automatic surveillance controlled by a cron job. This requires that all the necessary settings be passed to the application as parameters. Running gqcam -t JPEG -s -d webcam.jpg saves the current image captured by the camera with the filename webcam.jpg. The option -t defines the file format. Possible values are JPEG, PNG, and PPM. The command line switch -s activates the color correction. The filename for saving is passed with the option -d. If more than one webcam is operated, the name of the device must be passed. If no device is given, the default device /dev/video0 is used. To capture an image from the second camera, the option -v /dev/video1 must be added. List all options with gqcam --help.