summaryrefslogtreecommitdiff
path: root/utils/tuning/libtuning/modules/lux/rkisp1.py
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2025-01-23 12:41:02 +0100
committerStefan Klug <stefan.klug@ideasonboard.com>2025-02-21 17:51:09 +0100
commita783a90dec2ef40e6c0c9eaa298b320dd592412a (patch)
treed2a5d3c7864de3659fa08cc16631b902b16aeba4 /utils/tuning/libtuning/modules/lux/rkisp1.py
parentbab4db2d6de118e765238150e1f393463e40de9e (diff)
libtuning: Add module for lux calibration
For the lux algorithm, reference values get calculated based on a tuning image taken at a known lux level. The reference data contains the mean Y of the image, lux level, exposure time, gain and aperture. This module calculates these values for insertion into the tuning file. 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/libtuning/modules/lux/rkisp1.py')
-rw-r--r--utils/tuning/libtuning/modules/lux/rkisp1.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/tuning/libtuning/modules/lux/rkisp1.py b/utils/tuning/libtuning/modules/lux/rkisp1.py
new file mode 100644
index 00000000..62d3f94c
--- /dev/null
+++ b/utils/tuning/libtuning/modules/lux/rkisp1.py
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2024, Ideas on Board
+#
+# Lux module for tuning rkisp1
+
+from .lux import Lux
+
+
+class LuxRkISP1(Lux):
+ hr_name = 'Lux (RkISP1)'
+ out_name = 'Lux'
+
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+
+ # We don't need anything from the config file.
+ def validate_config(self, config: dict) -> bool:
+ return True
+
+ def process(self, config: dict, images: list, outputs: dict) -> dict:
+ return self.calculate_lux_reference_values(images)