@@ -218,6 +218,16 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,
auto &awb = context.activeState.awb;
frameContext.awb.gains = awb.automatic.gains;
frameContext.awb.temperatureK = awb.automatic.temperatureK;
+
+ const auto &gains = awbAlgo_->gainsFromColourTemperature(
+ awb.automatic.temperatureK);
+ if (gains) {
+ frameContext.awb.gains.r() = gains->r();
+ frameContext.awb.gains.g() = 1.0;
+ frameContext.awb.gains.b() = gains->b();
+ } else {
+ frameContext.awb.gains = awb.automatic.gains;
+ }
}
auto gainConfig = params->block<BlockType::AwbGain>();
Use the color gains for white balance if calibrated light sources are contained in the tuning file. The results are generally better especially when large uniformly colored objects are in the scene. Pure grey world model is still available by removing the color gains from the tuning file. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/ipa/rkisp1/algorithms/awb.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+)