Reputation: 2584
I'm working on an Android app that streams video with another party, and currently looking at brightening the image in low light scenes.
I noticed that on Google Duo app, the low light mode does it really well.
Is it achievable using just Camera2 API? The reason I am not using CameraX API is because my app is also utilising Vonage (formerly TokBox) SDK for two way video call and it's SDK sample code currently uses Camera2 API and haven't migrated to CameraX yet.
What I tried is to set CONTROL_AE_MODE (Auto Exposure) to CONTROL_AE_MODE_ON, this helps a bit but the image quality is no where as near as Google Duo app's. I'm looking to decrease the Camera FPS next but what else can I do to brighten the image?
Upvotes: 1
Views: 209
Reputation: 164
If you set CaptureRequest.CONTROL_AE_MODE
to CaptureRequest.CONTROL_AE_MODE_OFF
then you can control ISO CaptureRequest.SENSOR_SENSITIVITY
and exposure time CaptureRequest.SENSOR_EXPOSURE_TIME
manually.
You can read the available range of sensorSensitivity (ISO) like this val sensorSensitivityRange = cameraCharacteristics?.get(CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE) as Range<Int>?
as this will vary from device to device / camera to camera.
So in low-light mode you could control the brightness yourself, and in normal mode, you let the camera do it automatically.
More information here: https://developer.android.com/reference/android/hardware/camera2/CaptureRequest
Upvotes: 2