From patchwork Thu Jan 23 11:41:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 22628 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 ADA57C3317 for ; Thu, 23 Jan 2025 11:42:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 68B3868576; Thu, 23 Jan 2025 12:42:51 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="oFnw9cOm"; dkim-atps=neutral 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 86E4D6856F for ; Thu, 23 Jan 2025 12:42:49 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:c0a:33cd:b453:5d3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 17D53F91; Thu, 23 Jan 2025 12:41:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1737632506; bh=WLlK/akDfgfPIhxQ93UTYBGHsk+MFtxGzlYat4o/WMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oFnw9cOmJR4s7iJ7F+N6UKS5mu6T6btC4GUOzbfpVierNPLz1AaOWpcbL6E9vvSFV itPo/lEEDmnruJ2hhKjmn5E5Ma01ACRBreNTRhH4xfsaQUzX7+0yOsUi1AdHrUt9AE 7Yg2GYF/d3tCFAwu2vqpRkJE/dIbEhSXrfTwMhNM= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 13/17] utils: tuning: rkisp1: Add lux module Date: Thu, 23 Jan 2025 12:41:03 +0100 Message-ID: <20250123114204.79321-14-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250123114204.79321-1-stefan.klug@ideasonboard.com> References: <20250123114204.79321-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Now that the lux module is available, add it to the rkisp1 tuner. While at it, sort the imports correctly. Signed-off-by: Stefan Klug Reviewed-by: Paul Elder Reviewed-by: Daniel Scally --- Changes in v2: - Added this patch --- utils/tuning/rkisp1.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py index 9f40fd8bd63b..207b717a029c 100755 --- a/utils/tuning/rkisp1.py +++ b/utils/tuning/rkisp1.py @@ -6,18 +6,19 @@ # # Tuning script for rkisp1 -import coloredlogs import logging import sys +import coloredlogs import libtuning as lt -from libtuning.parsers import YamlParser from libtuning.generators import YamlOutput -from libtuning.modules.lsc import LSCRkISP1 from libtuning.modules.agc import AGCRkISP1 from libtuning.modules.awb import AWBRkISP1 from libtuning.modules.ccm import CCMRkISP1 +from libtuning.modules.lsc import LSCRkISP1 +from libtuning.modules.lux import LuxRkISP1 from libtuning.modules.static import StaticModule +from libtuning.parsers import YamlParser coloredlogs.install(level=logging.INFO, fmt='%(name)s %(levelname)s %(message)s') @@ -45,12 +46,15 @@ lsc = LSCRkISP1(debug=[lt.Debug.Plot], # This is the function that will be used to smooth the color ratio # values. This can also be a custom function. smoothing_function=lt.smoothing.MedianBlur(3),) +lux = LuxRkISP1(debug=[lt.Debug.Plot]) tuner = lt.Tuner('RkISP1') -tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc]) +tuner.add([agc, awb, blc, ccm, color_processing, filter, gamma_out, lsc, lux]) tuner.set_input_parser(YamlParser()) tuner.set_output_formatter(YamlOutput()) -tuner.set_output_order([agc, awb, blc, ccm, color_processing, + +# Bayesian AWB uses the lux value, so insert the lux algorithm before AWB. +tuner.set_output_order([agc, lux, awb, blc, ccm, color_processing, filter, gamma_out, lsc]) if __name__ == '__main__':