Philips webcam

From ImageWiki

Jump to: navigation, search

At DIKU we have various kinds of webcams, most of which uses the pwc driver on GNU/Linux. The IT staff (EDB-afdelingen) have some Philips PCVC740K webcams. These cameras are often called 'egg-cams' (danish: �ggekameraer) since they actually look like chicken eggs. Mounted on the Scorpion robots is a very wide-angle Logitech Quickcam Pro 3000 webcam. Both of these camera models uses the pwc driver.

One advantage of using cameras supported by the pwc driver is that it is possible tune some of the cameras internal parameters, such as 'gain', 'white-balance', 'compression rate', etc.

Changing parameters on the command line

On the command line the program setpwc can be used to tune camera parameters. Type

setpwc -h

on the command line to see how to use the program. If you don't have the program installed, you can get it from http://www.vanheusden.com/setpwc/.
Note: This program only works on GNU/Linux.

Changing parameters in C++

Using the setpwc source code a simple C++ class has been developed. This class allows you to tune camera parameters directly in C++. The source code for this class can be found in the "Robot Eksperimentarium" SVN in src (the files are called pwc.h and pwc.cc) . There is currently no documentation for the class, so you should just read the header file to see how the class works. But here's a small example of usage to get you started. The following program sets the camera gain to 0. One final comment is that the class is designed to be used with OpenCV.

#include "highgui.h"
#include "pwc.h"
int main()
{
    CvCapture *cam = cvCaptureFromCAM(-1);
    pwc tune_cam(cam);
    tune_cam.set_gain(0);

    cvReleaseCapture(&cam);
    return 0;
}


Links

The pwc driver webpage
The setpwc webpage

Personal tools