[PATCH 09/10] ipa: rkisp1: awb: Take the CCM into account for the AWB gains calculation
Stefan Klug
stefan.klug at ideasonboard.com
Mon Feb 17 11:01:50 CET 2025
Apparently AWB measurements are taken after the CCM. So the estimated
colour temperature and the corresponding CCM also lead to changed
rgbMeans. This is another source of oscillations. Fix that by applying
the inverse transform on the rgbMeans.
Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
---
src/ipa/rkisp1/algorithms/awb.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index 12934771c69c..66e6aecedc4c 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -305,6 +305,8 @@ void Awb::process(IPAContext &context,
rgbMeans = rgbMeans.max(0.0);
}
+ rgbMeans = frameContext.ccm.ccm.cast<double>().inverse() * rgbMeans;
+
/*
* The ISP computes the AWB means after applying the colour gains,
* divide by the gains that were used to get the raw means from the
--
2.43.0
More information about the libcamera-devel
mailing list