From 7d0004a410db6a52b8c212294ce267c14f8300ac Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 4 Sep 2022 02:25:30 +0300 Subject: ipa: rkisp1: awb: Log means, gains and temperature in debug message Extend the debug message in Awb::process() to log the means and color temperature in addition to the gains. This is useful for debugging the algorithm behaviour. While at it, set the showpoint flag to print a fixed number of digits after the decimal point, making logs more readable. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/ipa/rkisp1/algorithms/awb.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/ipa/rkisp1') diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index cde5b981..139c8239 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -9,6 +9,7 @@ #include #include +#include #include @@ -271,8 +272,12 @@ void Awb::process(IPAContext &context, activeState.awb.gains.automatic.blue = std::clamp(blueGain, 0.0, 1023.0 / 256); activeState.awb.gains.automatic.green = 1.0; - LOG(RkISP1Awb, Debug) << "Gain found for red: " << activeState.awb.gains.automatic.red - << " and for blue: " << activeState.awb.gains.automatic.blue; + LOG(RkISP1Awb, Debug) << std::showpoint + << "Means [" << redMean << ", " << greenMean << ", " << blueMean + << "], gains [" << activeState.awb.gains.automatic.red << ", " + << activeState.awb.gains.automatic.green << ", " + << activeState.awb.gains.automatic.blue << "], temp " + << frameContext.awb.temperatureK << "K"; } REGISTER_IPA_ALGORITHM(Awb, "Awb") -- cgit v1.2.1