White balance setting is behaving abnormal for twilight mode in Samsung A53 device

152 views
Skip to first unread message

Mohammad Sajib Al Seraj

unread,
Jul 26, 2022, 10:25:21 AM7/26/22
to Android CameraX Discussion Group
Hello,

I have tried to set white balance twilight for several devices in range 3200K to 4200K. It is behaving normal for all devices except Samsung Galaxy A53 5G (Model number: SM-A536U1) device. When I set white balance in that range for A53 device, I found “pinkish” photo which was not expected. But I found expected result from Samsung camera pro mode with that range white balance in A53 device. Any idea why it is behaving abnormal?

Here is the code snippet.

if (wb > 3200 && wb <= 4200){
                Camera2CameraControl.from(camera.getCameraControl()).setCaptureRequestOptions(new CaptureRequestOptions.Builder()
                        .setCaptureRequestOption(CaptureRequest.CONTROL_AE_MODE, CameraMetadata.CONTROL_AE_MODE_OFF )
                        .setCaptureRequestOption(CaptureRequest.SENSOR_SENSITIVITY, iso)
                        .setCaptureRequestOption(CaptureRequest.CONTROL_AWB_MODE, CameraMetadata.CONTROL_AWB_MODE_TWILIGHT)
                        .setCaptureRequestOption(CaptureRequest.SENSOR_EXPOSURE_TIME, (long)(shutterSpeed*1000000000))
                        .build());
 }

From Android developer guide I found different mode (TWILIGHT, SHADE, INCADESCENT, FLUORESCENT, WARM_FLUORESCENT) for white balance setting, but I need the to set white balance by Kelvin value (example: 3200K, 5000K). Anyone know the temperature range against different modes?

Thanks
Mohammad

Jag Saund

unread,
Aug 15, 2022, 6:18:25 PM8/15/22
to Android CameraX Discussion Group, mals...@mtu.edu
Hi Mohammad,

The WHITE_BALANCE_* enums map to a wide range of color temperature values. These values are typically device specific. Therefore, performing a color temperature to white balance mode mapping won't yield accurate or predictable results consistently across devices.

Another thing to verify is that the device supports the requested white balance mode. You can do this by querying: https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics?hl=en#CONTROL_AWB_AVAILABLE_MODES

Hope this help!
Reply all
Reply to author
Forward
0 new messages