libcamera/utils/tuning/config-example.yaml
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

54 lines
No EOL
1.2 KiB
YAML

general:
disable: []
plot: []
alsc:
do_alsc_colour: 1
luminance_strength: 0.5
awb:
# Algorithm can either be 'grey' or 'bayes'
algorithm: bayes
# Priors is only used for the bayes algorithm. They are defined in linear
# space. A good staring point is:
# - lux: 0
# ct: [ 2000, 3000, 13000 ]
# probability: [ 1.005, 1.0, 1.0 ]
# - lux: 800
# ct: [ 2000, 6000, 13000 ]
# probability: [ 1.0, 1.01, 1.01 ]
# - lux: 1500
# ct: [ 2000, 4000, 6000, 6500, 7000, 13000 ]
# probability: [ 1.0, 1.005, 1.032, 1.037, 1.01, 1.01 ]
priors:
- lux: 0
ct: [ 2000, 13000 ]
probability: [ 1.0, 1.0 ]
AwbMode:
AwbAuto:
lo: 2500
hi: 8000
AwbIncandescent:
lo: 2500
hi: 3000
AwbTungsten:
lo: 3000
hi: 3500
AwbFluorescent:
lo: 4000
hi: 4700
AwbIndoor:
lo: 3000
hi: 5000
AwbDaylight:
lo: 5500
hi: 6500
AwbCloudy:
lo: 6500
hi: 8000
# One custom mode can be defined if needed
#AwbCustom:
# lo: 2000
# hi: 1300
macbeth:
small: 1
show: 0
# blacklevel: 32