[PATCH v6 1/9] libcamera: controls: Update the ColourTemperature control to be writable
Stefan Klug
stefan.klug at ideasonboard.com
Thu Dec 19 18:57:18 CET 2024
For manual control it is helpful to be able to specify a fixed colour
temperature. It also provides an easy way to apply the temperature
specific CCMs and colour gains that are contained in the tuning files.
Document this and update the control dependencies.
Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
Changes in v6:
- Clarify interdependencies between ColourTemperature, ColourGains and
ColourCorrectionMatrix
Changes in v5:
- Improve documentation
---
src/libcamera/control_ids_core.yaml | 38 +++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml
index 073e0611d47c..1dfaee0c6327 100644
--- a/src/libcamera/control_ids_core.yaml
+++ b/src/libcamera/control_ids_core.yaml
@@ -298,7 +298,19 @@ controls:
description: |
Enable or disable the AWB.
+ When AWB is enabled, the algorithm estimates the colour temperature of
+ the scene and computes colour gains and the colour correction matrix
+ automatically. The computed colour temperature, gains and correction
+ matrix are reported in metadata. The corresponding controls are ignored
+ if set in a request.
+
+ When AWB is disabled, the colour temperature, gains and correction
+ matrix are not updated automatically and can be set manually in
+ requests.
+
+ \sa ColourCorrectionMatrix
\sa ColourGains
+ \sa ColourTemperature
# AwbMode needs further attention:
# - Auto-generate max enum value.
@@ -357,17 +369,34 @@ controls:
order.
ColourGains can only be applied in a Request when the AWB is disabled.
+ If ColourGains is set in a request but ColourTemperature is not, the
+ implementation shall calculate and set the ColourTemperature based on
+ the ColourGains.
\sa AwbEnable
+ \sa ColourTemperature
size: [2]
- ColourTemperature:
type: int32_t
direction: out
description: |
- Report the estimate of the colour temperature for the frame, in kelvin.
+ ColourTemperature of the frame, in kelvin.
+
+ ColourTemperature can only be applied in a Request when the AWB is
+ disabled.
- The ColourTemperature control can only be returned in metadata.
+ If ColourTemperature is set in a request but ColourGains is not, the
+ implementation shall calculate and set the ColourGains based on the
+ given ColourTemperature. If ColourTemperature is set (either directly,
+ or indirectly by setting ColourGains) but ColourCorrectionMatrix is not,
+ the ColourCorrectionMatrix is updated based on the ColourTemperature.
+
+ The ColourTemperature used to process the frame is reported in metadata.
+
+ \sa AwbEnable
+ \sa ColourCorrectionMatrix
+ \sa ColourGains
- Saturation:
type: float
@@ -429,6 +458,11 @@ controls:
stored in conventional reading order in an array of 9 floating point
values.
+ ColourCorrectionMatrix can only be applied in a Request when the AWB is
+ disabled.
+
+ \sa AwbEnable
+ \sa ColourTemperature
size: [3,3]
- ScalerCrop:
--
2.43.0
More information about the libcamera-devel
mailing list