camera_set_whitebalance_regions()

Configure the white balance regions on the camera

Synopsis:

camera_error_t camera_set_whitebalance_regions(camera_handle_t handle,
                                               int numregions,
                                               camera_region_t *regions)

Arguments:

handle
The handle returned by a call to the camera_open() function.
numregions
The number of regions to apply, which is the number of elements in the regions array.
regions
A pointer to an array of white balance regions to apply. The region co-ordinates are interpreted relative to a viewfinder buffer with (0, 0) representing the top-left corner of the frame, and (width-1, height-1) representing the bottom-right corner. If CAMERA_IMGPROP_ROTATION is applied to the viewfinder, then the co-ordinate frame of reference is also rotated accordingly.

Library:

libcamapi

Description:

When white balance regions are defined, the auto white balance algorithm gives priority to objects in the defined areas of the scene.

Only call this function if the CAMERA_FEATURE_REGIONWHITEBALANCE feature is available. Use the camera_can_feature() function to determine whether this feature is available.

The maximum number of white balance regions that you can configure is returned by the numsupported argument of the camera_get_whitebalance_regions() function.

After setting the regions, you must call the camera_set_whitebalance_mode() function to commit the changes.

The viewfinder must be running before using this function.

Returns:

CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.