From 92bb16b68edc820fde9a2f740f1ab14ed69b93d4 Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Thu, 23 Jan 2025 12:41:03 +0100 Subject: utils: tuning: rkisp1: Add lux module 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 --- utils/tuning/rkisp1.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py index 9f40fd8b..207b717a 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__': -- cgit v1.2.1