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()