From patchwork Thu Sep 8 01:41:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17337 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 60400C3272 for ; Thu, 8 Sep 2022 01:42:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 101A462108; Thu, 8 Sep 2022 03:42:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1662601379; bh=Eq/b+TndUsp7IzNW5h5xamI3p+PT21otPxoaCrymkIQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Ok5oooLg8T2x5po0qmzw1VIdPAx+FxAr1uEWK4zWpCcRUOcMDGIt5awD6xYseY/Hh PtGSLzQ4EuCIaeaYqabRAlRQk6JAfiebCYg7SpQEXonj8GToO+LjefqQnKk5pEnuZT zTwXf2gsjTVxsWbevkWFk7JHzV+YWYQ3D5cpqMYkHM/tB96kCttPQ7ZwQ2ynD0bnuT nF6hNFjnbO3yc3F1e++W9l47vQsR5ow5+nYJMWSznxa+q2EJ0u8eGpjYXg6QyeShyO cDNU917kTj6h7Ly2QFv32WNia8fNWYZdAtjeqA5bdv2RHjkiiinaeWzlixS7CyxbSe OIuZY5X0caI1A== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1762A62101 for ; Thu, 8 Sep 2022 03:42:57 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DHCZ0m9N"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 924DA6CC for ; Thu, 8 Sep 2022 03:42:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1662601376; bh=Eq/b+TndUsp7IzNW5h5xamI3p+PT21otPxoaCrymkIQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DHCZ0m9NXvAboDN8Y/gFd7o1LqAmOLgHTt6/BW+/G+3b0BMn2GBpG4j8akFSivGQh XKE5S9VdvfLu6PuzGroYe2Ijy13N5c+F6c/2JD+zWpRqmQBOsCwEULeFX6Gh859Wd1 RWs+TaJDAibqoP1elxV+EpT5p+n/grIHlHeibF/I= To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Sep 2022 04:41:56 +0300 Message-Id: <20220908014200.28728-29-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220908014200.28728-1-laurent.pinchart@ideasonboard.com> References: <20220908014200.28728-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 28/32] ipa: rkisp1: awb: Log means, gains and temperature in debug message X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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(-) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 2ff67ed98221..ed91e9277a16 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")