IDS peak AFL v1.7.0
Loading...
Searching...
No Matches
Auto whitebalance

Topics

 Skip frames
 
 Region of interest
 
 Mode
 
 Callbacks
 

Functions

PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverages (peak_afl_controller_handle controller, uint8_t *averageRed, uint8_t *averageGreen, uint8_t *averageBlue)
 Get the last auto average for a controller.
 

Detailed Description

Auto white balance

Depending on the light source, light can have different color temperatures so that the images may have a color cast. At low color temperatures (e.g. light from incandescent lamps), the white content shifts towards a red hue. At high color temperatures (e.g. light from fluorescent lamps), the white content shifts a blue hue.

The white balance control feature uses the RGB gain settings of the camera to correct the white level. This is achieved by adjusting the gain controls until the red or blue channel matches the average brightness of the green channel.

Enabling and automatically disabling the control function

For ongoing adaptations the Continuous mode has to be used so that it responds to deviations from the target value. To disable the control functionality automatically once the target value has been reached, (approximately) use the Once mode.

Configuring the control functions

Skip frames

The Skip frames setting defines how many frames should be skipped. This parameter strongly influences the control speed. Choosing small values can destabilize the automatic control.

Note
For higher frame rates, a larger value should be used for the Skip frames parameter. This reduces the number of automatic adjustments done by the camera.

Region of interest (ROI)

If a smaller part of the image should be processed, a region of interest (ROI) can be set.

Note
If a ROI does not fit into the processed image dimension the processing callback is called with corresponding error status.


Note
The ROI for automatic control is set to the full size of the processed image by default.


Note
To reset a ROI all values must be set to 0.

Callback

It is possible to be informed for specific events via callbacks. The following callbacks are available:

Note
The Finished callback will only be called when the controller runs in Once mode.

Examples

Note
For the automatic host control to work, the frames must be transferred to the manager. To reduce and simplify the sample code, the examples do not check the return values.
peak_afl_AutoFeatureManager_Create(&hManager, nodemapHandle);
// create a whitebalance controller within our manager
peak_afl_controller_handle hController = 0;
// run in continuous mode
// submit the images
while(acquisitionRunning)
{
peak_afl_AutoFeatureManager_Process(hManager, imageHandle);
}

Function Documentation

◆ peak_afl_AutoController_GetLastAutoAverages()

PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverages ( peak_afl_controller_handle controller,
uint8_t * averageRed,
uint8_t * averageGreen,
uint8_t * averageBlue )

Get the last auto average for a controller.

Used by Controllers processing a color image.

Parameters
[in]controllercontroller handle
[out]averageRedautofeature average red channel
[out]averageGreenautofeature average green channel
[out]averageBlueautofeature average blue channel
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_INVALID_PARAMETER The argument is invalid.
PEAK_AFL_STATUS_NOT_SUPPORTED The function is not supported.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.0