[{"id":20343,"web_url":"https://patchwork.libcamera.org/comment/20343/","msgid":"<YXDMnr0yXrEBUxCu@pendragon.ideasonboard.com>","date":"2021-10-21T02:12:46","subject":"Re: [libcamera-devel] [PATCH v2 04/13] ipa: ipu3: awb: Change\n\tminimal green threshold value","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jean-Michel,\n\nThank you for the patch.\n\nOn Wed, Oct 20, 2021 at 05:45:58PM +0200, Jean-Michel Hautbois wrote:\n> When zones are used for the grey world algorithm, they are only\n> considered if their average green value is at least 32/255 to exclude\n> zones that are too dark and don't provide relevant colour information\n> (on the opposite side of the spectrum, saturated regions are excluded by\n> the ImgU statistics engine).\n> \n> The algorithm requires a minimal number of zones that meet this criteria\n> in order to run. Now that we correct the black level, the 32/255 minimal\n> value is a bit high and prevents the algorithm for running in low-light\n> conditions. Lower the value to 16/255 to fix it.\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/algorithms/awb.cpp | 8 +++++++-\n>  1 file changed, 7 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> index 62c72cce..1ffb431b 100644\n> --- a/src/ipa/ipu3/algorithms/awb.cpp\n> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n> @@ -17,7 +17,13 @@ namespace ipa::ipu3::algorithms {\n>  \n>  LOG_DEFINE_CATEGORY(IPU3Awb)\n>  \n> -static constexpr uint32_t kMinGreenLevelInZone = 32;\n> +/*\n> + * When zones are used for the grey world algorithm, they are only considered if\n> + * their average green value is at least 16/255 to exclude zones that are too\n\n * their average green value is at least 16/255 (after black level subtraction)\n * to exclude zones that are too ...\n\n> + * dark and don't provide relevant colour information (on the opposite side of\n> + * the spectrum, saturated regions are excluded by the ImgU statistics engine).\n> + */\n> +static constexpr uint32_t kMinGreenLevelInZone = 16;\n>  \n>  /* Minimum proportion of cells counted within a zone for it to be relevant */\n>  static constexpr double kMinRelevantCellsRatio = 0.8;","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 8667CBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Oct 2021 02:13:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 00F7268F5B;\n\tThu, 21 Oct 2021 04:13:08 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E055760124\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Oct 2021 04:13:06 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 53D6493;\n\tThu, 21 Oct 2021 04:13:06 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Vw2lB9rb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634782386;\n\tbh=PsFeB2BQ8U1xg6ne0a9MJzhx4MirQQmxd838FosTBWc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Vw2lB9rb03de5yHVnNnF9Doo2vVZuN+w4dOLyyC61p7Tow9j8rw5LNUE2dYZKR6o8\n\tv7i6z/BU1Ry/yoF6cM/IIEA1ZBoW5hjAdLy5i9wO1KQHwsg8uSJdmdVKGdn6gatLGz\n\tOZpBTqMn5VJFgnofeFMNe3qMYD3RgY4HzPiTfzu8=","Date":"Thu, 21 Oct 2021 05:12:46 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<YXDMnr0yXrEBUxCu@pendragon.ideasonboard.com>","References":"<20211020154607.180161-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211020154607.180161-5-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211020154607.180161-5-jeanmichel.hautbois@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 04/13] ipa: ipu3: awb: Change\n\tminimal green threshold value","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]