Manual white balance using Camera2 API on Google Pixel phones

57 views Asked by At

I am accessing camera frames on Android using Camera2 API. All I want is to manually adjust the white balance of the images using COLOR_CORRECTION_GAINS. This is my setup:

captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_MANUAL)

captureRequestBuilder?.set(CaptureRequest.CONTROL_AWB_MODE, CaptureRequest.CONTROL_AWB_MODE_OFF)
val rggbChannelVector = RggbChannelVector(1.8f, 1.3f, 1.0f, 2.0f) 
captureRequestBuilder?.set(CaptureRequest.COLOR_CORRECTION_GAINS, rggbChannelVector)

On several Android devices I tested this works absolutely fine. Changing the values in the rggbChannelVector nicely adjusts the WB of the image. On Google Pixel phones it has zero effect, though.

The Camera2 documentation says the following about COLOR_CORRECTION_GAINS:

Full capability: Present on all camera devices that report being HARDWARE_LEVEL_FULL devices in the android.info.supportedHardwareLevel key

I checked that key on the Pixel devices and it returned the required "FULL" Level.

Am I missing something in my setup, or is it really not possible to set a manual WB on the Pixel devices!? Thanks.

0

There are 0 answers