About CONTROL_AWB_MODE and COLOR_CORRECTION_GAINS

159 views
Skip to first unread message

Hong Wang (LazyIonEs)

unread,
Aug 21, 2023, 9:05:41 PM8/21/23
to Android CameraX Discussion Group
I am using CameraX to use Camera2CameraControl to set CONTROL_AWB_MODE and COLOR_CORRECTION_MODE to CONTROL_AWB_MODE_OFF and COLOR_CORRECTION_MODE_TRANSFORM_MATRIX respectively. I checked the official document and found that I can customize the white balance parameters by setting COLOR_CORRECTION_GAINS, but I found the entry of COLOR_CORRECTION_GAINS It is RggbChannelVector, I want to ask kelvin to RggbChannelVector The conversion formula, because CONTROL_AWB_MODE has several other modes, and those modes correspond to a fixed kelvin, I think so, but I don't understand how kelvin can be converted to RggbChannelVector correctly, or is my logic If there is a problem, please correct me, thank you


val c2cc = Camera2CameraControl.from(camera.cameraControl)
c2cc.clearCaptureRequestOptions()
c2cc.captureRequestOptions = CaptureRequestOptions.Builder()
.setCaptureRequestOption(CaptureRequest.CONTROL_AWB_MODE, CaptureRequest.CONTROL_AWB_MODE_OFF)
.setCaptureRequestOption(CaptureRequest.COLOR_CORRECTION_MODE, CaptureRequest.COLOR_CORRECTION_MODE_TRANSFORM_MATRIX)
.setCaptureRequestOption(CaptureRequest.COLOR_CORRECTION_GAINS, ColorTemperatureConverter.colorTemperature(kelvin))
.build()

Hong Wang (LazyIonEs)

unread,
Aug 21, 2023, 10:11:26 PM8/21/23
to Android CameraX Discussion Group, Hong Wang
This is an article I saw on stackoverflow, his idea is basically the same as mine. Android Camera2 - Manual White Balance
Reply all
Reply to author
Forward
0 new messages