From bab4db2d6de118e765238150e1f393463e40de9e Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Thu, 23 Jan 2025 12:41:01 +0100 Subject: ipa: rkisp1: awb: Apply gains based on default colour temperature on start The colour gains are initialized with a default value of 1. Improve that by querying the auto white balance algorithm for the gains for a default colour temperature. This is still not based on measurements, but it is still better than the current implementation. If the algorithm doesn't implement mapping from colour temperature to gains, it will internally fallback to 1.0. Signed-off-by: Stefan Klug Reviewed-by: Paul Elder Reviewed-by: Daniel Scally --- src/ipa/rkisp1/algorithms/awb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ipa/rkisp1/algorithms/awb.cpp') diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 2b2c50dc..51c49ba9 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -125,7 +125,8 @@ int Awb::configure(IPAContext &context, const IPACameraSensorInfo &configInfo) { context.activeState.awb.gains.manual = RGB{ 1.0 }; - context.activeState.awb.gains.automatic = RGB{ 1.0 }; + context.activeState.awb.gains.automatic = + awbAlgo_->gainsFromColourTemperature(kDefaultColourTemperature); context.activeState.awb.autoEnabled = true; context.activeState.awb.temperatureK = kDefaultColourTemperature; -- cgit v1.2.1