CAMERA_I2CAutoWhiteBalance*

Syntax

#include <twl/camera.h>

CAMERAResult CAMERA_I2CAutoWhiteBalance(CAMERASelect camera, BOOL on);
CAMERAResult CAMERA_I2CAutoWhiteBalanceAsync(CAMERASelect camera, BOOL on, CAMERACallback callback, void *arg);

Arguments

camera Camera to configure (CAMERA_SELECT_IN, CAMERA_SELECT_OUT, or CAMERA_SELECT_BOTH).
on If TRUE, the auto-adjustment feature is enabled. If FALSE, it is disabled.
callback Function that is called when asynchronous processing has completed.
arg Arguments when the callback function is invoked.

Return Values

Returns CAMERA_RESULT_SUCCESS if configuration was successful.

Description

Enables or disables the auto-adjustment feature for the camera's white balance when it is set to "auto" with CAMERA_WHITE_BALANCE_NORMAL. The exposure value is unstable immediately after the camera is started with the CAMERA_I2CActivate function. A value of INVALID_COMMAND is returned if CAMERA_WHITE_BALANCE_NORMAL is not set. Even if the auto-adjustment feature has been disabled by this function, you can reset the value and enable the auto-adjustment feature by calling the CAMERA_I2CWhiteBalance function using CAMERA_WHITE_BALANCE_NORMAL. Unlike CAMERA_I2CAutoWhiteBalance, the CAMERA_I2CAutoWhiteBalanceAsync function returns control immediately and runs asynchronously. Use the callback parameter to confirm that processing has completed.

Note:
If camera settings are changed using any of the CAMERA_I2C* functions, the changes may be delayed for approximately one frame before they are applied. If camera settings are changed during image capture, the changes may not be applied to the image as quickly as the application expects.

Occasional Shifting of Captured Images
The captured image may shift if this function is called during image capture.
Before calling this function, first stop the image capture with CAMERA_StopCapture. Then call this function. After this function completes execution, restart the image capture with CAMERA_StartCapture.

See Also

CAMERASelect
CAMERACallback
CAMERAResult

Revision History

2010/06/14 Revised the description about the timing to enable the auto-adjustment feature.
2009/11/11 Added a description about the occasional shifting of capture images.
2009/03/25 Added information about changing camera settings during capture operations.
2008/10/30 Added that CAMERA_SELECT_BOTH can also be specified.
2008/08/22 Initial version.


CONFIDENTIAL