TwiceAsNice
2019-02-18
|
Class PwcWrapper
More...
#include <pwc-wrapper.h>
Public Member Functions | |
PwcWrapper (CvCapture *camera_device) | |
Constructor. More... | |
~PwcWrapper () | |
Deconstructor. More... | |
int | GetFrameRate () |
Get frame rate (should be between 5 and 30). More... | |
void | SetFrameRate (int fps) |
Set frame rate (should be between 5 and 30). More... | |
void | SaveUserSettingsToEEPROM () |
Save settings to camera interal memory (Attention: works only about 10.000x). More... | |
void | RestoreUserSettingsFromEEPROM () |
Restore settings from camera interal memory. More... | |
void | ResetEEPROM () |
Reset EEPROM to default values. More... | |
int | GetCompressionMode () |
Get compression ratio of the videostream transported by USB. More... | |
void | SetCompressionMode (int newmode) |
Set compression ratio of the videostream transported by USB. More... | |
int | GetAutomaticGainControl () |
Get the value which once was set by PwcWrapper::SetAutomaticGainControl. More... | |
void | SetAutomaticGainControl (int newagc) |
Philips webcams have features like auto-exposure and some additional circuitry to accomodate for changing light conditions. More... | |
void | SetShutterSpeed (int speed) |
Set the shutter speed of a Philips capturing device. More... | |
void | 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). More... | |
void | 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. More... | |
void | SetCameraLED (int on_time, int off_time) |
Controlling the leds is only supported by the ToUCam series. More... | |
void | SetElectronicSharpness (int newvalue) |
You can electronically blur or sharpen frames coming from the web cam a little bit. More... | |
void | SetBacklightCompensationMode (int newmode) |
Compensate for a very bright background (where the object in the foreground is too dark). More... | |
void | 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. More... | |
void | SetDynamicNoiseReductionMode (int newmode) |
0 means no noise reduction filtering, 3 means highest noise reduction filtering switched on. More... | |
void | PrintRealImageSize () |
Plots the real frame size to the console to check if frame size has been changed correctly, etc... More... | |
Private Attributes | |
CvCaptureCAM_V4L * | cam |
The capturing device (must be set on class construction). More... | |
Class PwcWrapper
Implements functions to enhance the OpenCV camera driver
by the Philips Web Camera specific functions.
|
inline |
Constructor.
The opened OpenCV capturing device (where an attached Philips SPC 900 NC is assumed) has to be passed.
|
inline |
Deconstructor.
int PwcWrapper::GetAutomaticGainControl | ( | ) |
Get the value which once was set by PwcWrapper::SetAutomaticGainControl.
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.
int PwcWrapper::GetFrameRate | ( | ) |
Get frame rate (should be between 5 and 30).
void PwcWrapper::PrintRealImageSize | ( | ) |
Plots the real frame size to the console to check if frame size has been changed correctly, etc...
void PwcWrapper::ResetEEPROM | ( | ) |
Reset EEPROM to default values.
(Attention: works only about 10.000x).
void PwcWrapper::RestoreUserSettingsFromEEPROM | ( | ) |
Restore settings from camera interal memory.
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::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::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::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::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::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::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.
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::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::SetFrameRate | ( | int | fps | ) |
Set frame rate (should be between 5 and 30).
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.
|
private |
The capturing device (must be set on class construction).