Modifying camera parameters
The camera has a list of parameters which can be modified.
Parameter | Min value | Max value | Camera ID name | ID value |
---|---|---|---|---|
Brightness | 0 | 255 | kCameraBrightnessID | 0 |
Contrast | 0 | 127 | kCameraContrastID | 1 |
Saturation | 0 | 255 | kCameraSaturationID | 2 |
Hue | -180 | 180 | kCameraHueID | 3 |
Red Chroma | 0 | 255 | kCameraRedChromaID | 4 |
Blue Chroma | 0 | 255 | kCameraBlueChromaID | 5 |
Gain | 0 | 255 | kCameraGainID | 6 |
Horizontal Flip | 0 | 1 | kCameraHFlipID | 7 |
Vertical Flip | 0 | 1 | kCameraVFlipID | 8 |
Correction Lens X (has no effect) | 0 | 255 | kCameraLensXID | 9 |
Correction Lens Y (has no effect) | 0 | 255 | kCameraLensYID | 10 |
Auto Exposition | 0 | 1 | kCameraAutoExpositionID | 11 |
Auto White Balance | 0 | 1 | kCameraAutoWhiteBalanceID | 12 |
Auto Gain | 0 | 1 | kCameraAutoGainID | 13 |
Camera Resolution | kQVGA | kVGA | kCameraResolutionID | 14 |
Frames Per Second (among 5, 10, 15, 30 ) - not yet functionnal | 5 | 30 | kCameraFrameRateID | 15 |
Exposure (time in ms = value x 33/510) | 0 | number of lines of the sensor (480 + 30 covered lines = 510) | kCameraExposureID | 17 |
Camera Select | 0 (top cam.) | 1 (bottom cam.) | kCameraSelectID | 18 |
Reset camera registers (RESERVED) | NA | NA | kCameraSetDefaultParamsID | 19 |
Exposure Correction (= value/3 - switch automatically in AEC average based algorithm) | -6 | 6 | kCameraExposureCorrectionID | 21 |
Auto Exposure Control Algorithm | 0 (average based algorithm) | 1 (histogram based algorithm) | kCameraAecAlgorithmID | 22 |
Fast switch (both cameras must run in the same mode) | NA | NA | kCameraFastSwitchID | 23 |
Camera Sharpness | 0 | 31 | kCameraSharpnessID | 24 |
There are methods to get and to change those parameters. Here is an example:
// First, get a proxy on the video input module if you haven't already done it. ALPtr<ALProxy> cameraProxy = getParentBroker()->getProxy( "ALVideoDevice" ); // Now you are able to get the value of any parameter. int BrightnessValue = ( cameraProxy->call<int>( "getParam", kCameraBrightnessID ) ); //You can change any parameter's value with the following method. cameraProxy->callVoid( "setParam", kCameraHueID, -130);