PwcWrapper Class Reference

Class PwcWrapper
Implements functions to enhance the OpenCV camera driver
by the Philips Web Camera specific functions.
More...

#include <pwc-wrapper.h>

Collaboration diagram for PwcWrapper:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PwcWrapper (CvCapture *camera_device)
 ~PwcWrapper ()
int GetFrameRate ()
void SetFrameRate (int fps)
void SaveUserSettingsToEEPROM ()
void RestoreUserSettingsFromEEPROM ()
void ResetEEPROM ()
int GetCompressionMode ()
void SetCompressionMode (int newmode)
int GetAutomaticGainControl ()
void SetAutomaticGainControl (int newagc)
void SetShutterSpeed (int speed)
void SetWhitebalance (int mode, int red, int blue)
void SetAutomaticWhiteBalanceSpeed (int speed, int delay)
void SetCameraLED (int on_time, int off_time)
void SetElectronicSharpness (int newvalue)
void SetBacklightCompensationMode (int newmode)
void SetAntiFlickerMode (int newmode)
void SetDynamicNoiseReductionMode (int newmode)
void PrintRealImageSize ()

Detailed Description

Class PwcWrapper
Implements functions to enhance the OpenCV camera driver
by the Philips Web Camera specific functions.

Author:
Andreas Geiger

Karlsruhe Institute of Technology

Version:
1.0
Date:
25.10.2007


Constructor & Destructor Documentation

PwcWrapper::PwcWrapper ( CvCapture *  camera_device  )  [inline]

Constructor. The opened OpenCV capturing device (where an attached Philips SPC 900 NC is assumed) has to be passed.

PwcWrapper::~PwcWrapper (  )  [inline]

Deconstructor.


Member Function Documentation

int PwcWrapper::GetFrameRate (  ) 

Get frame rate (should be between 5 and 30).

void PwcWrapper::SetFrameRate ( int  fps  ) 

Set frame rate (should be between 5 and 30).

void PwcWrapper::SaveUserSettingsToEEPROM (  ) 

Save settings to camera interal memory (Attention: works only about 10.000x). When the camera is plugged off and in again the parameters will be those which have been saved during this process. Note that not all parameters will be stored!

void PwcWrapper::RestoreUserSettingsFromEEPROM (  ) 

Restore settings from camera interal memory.

void PwcWrapper::ResetEEPROM (  ) 

Reset EEPROM to default values. (Attention: works only about 10.000x).

int PwcWrapper::GetCompressionMode (  ) 

Get compression ratio of the videostream transported by USB. 0 means no compression, 3 means high compression. Each value in between is valid, too.

void PwcWrapper::SetCompressionMode ( int  newmode  ) 

Set compression ratio of the videostream transported by USB. 0 means no compression, 3 means high compression. Each value in between is valid, too.

int PwcWrapper::GetAutomaticGainControl (  ) 

Get the value which once was set by PwcWrapper::SetAutomaticGainControl.

void PwcWrapper::SetAutomaticGainControl ( int  newagc  ) 

Philips webcams have features like auto-exposure and some additional circuitry to accomodate for changing light conditions. One of these features is an AGC circuit that amplifies or attenuates the signal that comes from the CCD/CMOS sensor. Normally this circuit is in auto mode, but you can set it to a fixed value if you like. The range is 0..65535. 0 means low gain, and 65535 sets it to highest gain possible. If you supply a negative number (i.e. -1), the AGC is set to automatic mode.

void PwcWrapper::SetShutterSpeed ( int  speed  ) 

Set the shutter speed of a Philips capturing device. The range is: 0..65535. Setting shutter speed and agc to -1 means automatic adjustment.

void PwcWrapper::SetWhitebalance ( int  mode,
int  red,
int  blue 
)

The white balance is the ability to correct for different lighting conditions (outdoor, indoor, artificial lighting, etc), by adjusting the gains for the red and blue pixels (green is never affected). Mode can be one of the following: PWC_WB_AUTO, PWC_WB_MANUAL, PWC_WB_INDOOR, PWC_WB_OUTDOOR, PWC_WB_FL. The last mode means "fluorescent lighting". Only in manual mode the red and blue parameters can be used to adjust the gain manually. The range is 0..65535.

void PwcWrapper::SetAutomaticWhiteBalanceSpeed ( int  speed,
int  delay 
)

Sets speed and delay which determine how fast the camera reacts to changes in lighting when it is in automatic mode. The range is 1..65535. 0 leaves the settings untouched. The higher the value speed, the slower is the reaction.

void PwcWrapper::SetCameraLED ( int  on_time,
int  off_time 
)

Controlling the leds is only supported by the ToUCam series. It doesn't work with the leds of the SPC 900 NC.

void PwcWrapper::SetElectronicSharpness ( int  newvalue  ) 

You can electronically blur or sharpen frames coming from the web cam a little bit. 0 means blurring, 65535 means sharpening.

void PwcWrapper::SetBacklightCompensationMode ( int  newmode  ) 

Compensate for a very bright background (where the object in the foreground is too dark). 0 means on, every other value means off.

void PwcWrapper::SetAntiFlickerMode ( int  newmode  ) 

Due to the different frequencies of the webcam, monitor refresh rate and the electrical power supply, the intensity of the image may 'pulsate' which is quite annoying to watch. The Philips cams have a way to suppress this. This function turns that feature on or off. A value of 0 turns if off, any other value means that it is switched on.

void PwcWrapper::SetDynamicNoiseReductionMode ( int  newmode  ) 

0 means no noise reduction filtering, 3 means highest noise reduction filtering switched on. Any value in between is valid, too.

void PwcWrapper::PrintRealImageSize (  ) 

Plots the real frame size to the console to check if frame size has been changed correctly, etc...


The documentation for this class was generated from the following files:
Generated on Thu Oct 25 12:38:54 2007 for webcam by  doxygen 1.5.1