[libcamera-devel] [PATCH 0/7] utils: tuning: Add a new tuning infrastructure
Paul Elder
paul.elder at ideasonboard.com
Thu Oct 6 14:00:58 CEST 2022
This patch series adds a new tuning infrastructure called libtuning,
inspired by ctt.
The design modularizes common components of tuning tools such that
new tuning scripts for new platforms can be created easily, as show in
patches 5/7 to 7/7.
The common "core" components include file management, argument
parsing, image loading and validation, and macbeth chart detection, as
well as miscellaneous (but tedious) math utilities. It connects
everything together such that a platform's tuning script can very easily
customize tuning modules in a variety of ways, even including the format
of the input configuration file and the output tuning file. These are
all implemented in patch 1/7, as they are all interconnected.
The input configuration file and output tuning file could have different
formats as well, hence why these have their own classes. For now, only
the raspberrypi's formats are implemented, in patches 3/7 and 4/7
respectively.
The main point of libtuning is that tuning modules can be used for
different platforms while only changing the configuration of the tuning
modules. A simple example is the lens shading table size. Patch 2/7
implements an ALSC tuning module based on ctt's ALSC, with all the
values that were hardcoded for raspberrypi to take values that can be
configured by platform-specific tuning scripts.
(I haven't actually tested/ran this yet, as I'm missing calibration
images)
Paul Elder (7):
utils: tuning: libtuning: Implement the core of libtuning
utils: libtuning: modules: Add ALSC module
utils: libtuning: parsers: Add raspberrypi parser
utils: libtuning: generators: Add raspberrypi output
utils: tuning: Add alsc-only libtuning raspberrypi tuning script
[DNI] utils: tuning: Add full libtuning raspberrypi tuning script
[DNI] utils: tuning: Add tuning script for rkisp1
utils/tuning/libtuning/__init__.py | 9 +
utils/tuning/libtuning/average_functions.py | 21 +
utils/tuning/libtuning/generators/__init__.py | 1 +
.../tuning/libtuning/generators/generator.py | 12 +
.../generators/raspberrypi_output.py | 115 +++
utils/tuning/libtuning/gradient.py | 111 +++
utils/tuning/libtuning/image.py | 272 ++++++++
utils/tuning/libtuning/libtuning.py | 191 +++++
utils/tuning/libtuning/macbeth.py | 654 ++++++++++++++++++
utils/tuning/libtuning/macbeth_ref.pgm | 5 +
utils/tuning/libtuning/modules/__init__.py | 1 +
utils/tuning/libtuning/modules/alsc.py | 321 +++++++++
utils/tuning/libtuning/modules/module.py | 41 ++
utils/tuning/libtuning/parsers/__init__.py | 1 +
utils/tuning/libtuning/parsers/parser.py | 18 +
.../libtuning/parsers/raspberrypi_parser.py | 82 +++
utils/tuning/libtuning/smoothing.py | 21 +
utils/tuning/libtuning/utils.py | 198 ++++++
utils/tuning/raspberrypi.py | 39 ++
utils/tuning/raspberrypi/__init__.py | 0
utils/tuning/raspberrypi/alsc.py | 18 +
utils/tuning/raspberrypi_alsc_only.py | 18 +
utils/tuning/rkisp1.py | 69 ++
23 files changed, 2218 insertions(+)
create mode 100644 utils/tuning/libtuning/__init__.py
create mode 100644 utils/tuning/libtuning/average_functions.py
create mode 100644 utils/tuning/libtuning/generators/__init__.py
create mode 100644 utils/tuning/libtuning/generators/generator.py
create mode 100644 utils/tuning/libtuning/generators/raspberrypi_output.py
create mode 100644 utils/tuning/libtuning/gradient.py
create mode 100644 utils/tuning/libtuning/image.py
create mode 100644 utils/tuning/libtuning/libtuning.py
create mode 100644 utils/tuning/libtuning/macbeth.py
create mode 100644 utils/tuning/libtuning/macbeth_ref.pgm
create mode 100644 utils/tuning/libtuning/modules/__init__.py
create mode 100644 utils/tuning/libtuning/modules/alsc.py
create mode 100644 utils/tuning/libtuning/modules/module.py
create mode 100644 utils/tuning/libtuning/parsers/__init__.py
create mode 100644 utils/tuning/libtuning/parsers/parser.py
create mode 100644 utils/tuning/libtuning/parsers/raspberrypi_parser.py
create mode 100644 utils/tuning/libtuning/smoothing.py
create mode 100644 utils/tuning/libtuning/utils.py
create mode 100644 utils/tuning/raspberrypi.py
create mode 100644 utils/tuning/raspberrypi/__init__.py
create mode 100644 utils/tuning/raspberrypi/alsc.py
create mode 100755 utils/tuning/raspberrypi_alsc_only.py
create mode 100644 utils/tuning/rkisp1.py
--
2.30.2
More information about the libcamera-devel
mailing list