summaryrefslogtreecommitdiff
path: root/utils/tuning/rkisp1.py
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2024-06-13 16:03:29 +0200
committerStefan Klug <stefan.klug@ideasonboard.com>2024-07-05 22:38:20 +0200
commite0f41b7401eb8cc672d4fe62c219bd082c5830ed (patch)
treefe8240940563a7c9faaf3a2109890e46a50c6570 /utils/tuning/rkisp1.py
parent9eb26a8716d383ede40965d720e0f73339a6220a (diff)
tuning: rkisp1: Add some static modules
Add awb, blc, cproc, filter, and gamma to the tuning file. These don't need any configuration. At the moment there are no inter-module dependencies in the tuning process. We can therefore safely sort them alphabetically. As soon as the first dependency gets introduced (most likely lsc -> ccm) we will see how to solve that. The output order controls the order of processing in the IPA. It is now also in alphabetical order which happens to be no change for the modules that existed previously. For the others, there is no need for a specific order. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'utils/tuning/rkisp1.py')
-rwxr-xr-xutils/tuning/rkisp1.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/utils/tuning/rkisp1.py b/utils/tuning/rkisp1.py
index fae35783..0d279a39 100755
--- a/utils/tuning/rkisp1.py
+++ b/utils/tuning/rkisp1.py
@@ -15,11 +15,24 @@ from libtuning.generators import YamlOutput
from libtuning.modules.lsc import LSCRkISP1
from libtuning.modules.agc import AGCRkISP1
from libtuning.modules.ccm import CCMRkISP1
-
+from libtuning.modules.static import StaticModule
coloredlogs.install(level=logging.INFO, fmt='%(name)s %(levelname)s %(message)s')
+awb = StaticModule('Awb')
+blc = StaticModule('BlackLevelCorrection')
+color_processing = StaticModule('ColorProcessing')
+filter = StaticModule('Filter')
+gamma_out = StaticModule('GammaOutCorrection', {'gamma': 2.2})
+
tuner = lt.Tuner('RkISP1')
+tuner.add(AGCRkISP1(debug=[lt.Debug.Plot]))
+tuner.add(awb)
+tuner.add(blc)
+tuner.add(CCMRkISP1(debug=[lt.Debug.Plot]))
+tuner.add(color_processing)
+tuner.add(filter)
+tuner.add(gamma_out)
tuner.add(LSCRkISP1(
debug=[lt.Debug.Plot],
# This is for the actual LSC tuning, and is part of the base LSC
@@ -39,11 +52,11 @@ tuner.add(LSCRkISP1(
# values. This can also be a custom function.
smoothing_function=lt.smoothing.MedianBlur(3),
))
-tuner.add(AGCRkISP1(debug=[lt.Debug.Plot]))
-tuner.add(CCMRkISP1(debug=[lt.Debug.Plot]))
+
tuner.set_input_parser(YamlParser())
tuner.set_output_formatter(YamlOutput())
-tuner.set_output_order([AGCRkISP1, CCMRkISP1, LSCRkISP1])
+tuner.set_output_order([AGCRkISP1, awb, blc, CCMRkISP1, color_processing,
+ filter, gamma_out, LSCRkISP1])
if __name__ == '__main__':
sys.exit(tuner.run(sys.argv))