libcamera/utils/tuning
Stefan Klug d476f8358b libipa: awb_bayes: Change the probabilities from log space to linear space
The original code used to specify the probabilities in log space and
scaled for the RaspberryPi hardware with 192 AWB measurement points.
This is reasonable as the whole algorithm makes use of unitless numbers
to prefer some colour temperatures based on a lux level. These numbers
are then hand tuned with the specific device in mind.

This has two shortcomings:

1. The linear interpolation of PWLs in log space is mathematically
   incorrect. The outcome might still be ok, as both spaces (log and
linear) are monotonic, but it is still not "right".

2. Having unitless numbers gets more error prone when we try to
   harmonize the behavior over multiple platforms.

Change the algorithm to interpret the numbers as being in linear space.
This makes the interpolation mathematically correct at the expense of a
few log operations.

To account for that change, update the numbers in the tuning example
file with the linear counterparts scaled to one AWB zone measurement.

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>
2025-02-21 17:51:10 +01:00
..
libtuning libtuning: Add module for lux calibration 2025-02-21 17:51:09 +01:00
raspberrypi libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
config-example.yaml libipa: awb_bayes: Change the probabilities from log space to linear space 2025-02-21 17:51:10 +01:00
raspberrypi_alsc_only.py libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
README.rst utils: tuning: Add requirements file and update readme 2024-07-05 12:45:10 +02:00
requirements.txt libtuning: Migrate prints to python logging framework 2024-07-05 22:38:00 +02:00
rkisp1.py utils: tuning: rkisp1: Add lux module 2025-02-21 17:51:10 +01:00

.. SPDX-License-Identifier: CC-BY-SA-4.0

libcamera tuning tools
======================

.. Note:: The tuning tools are still very much work in progress. If in doubt,
    please ask on the mailing list.

.. todo::
    Write documentation

Installation of dependencies
----------------------------

::
    # Using a venv
    python3 -m venv venv
    . ./venv/bin/activate
    pip3 install -r requirements.txt