[v3,1/3] libcamera: Add gamma control id
diff mbox series

Message ID 20240603140806.90045-2-stefan.klug@ideasonboard.com
State Superseded
Headers show
Series
  • libcamera: Add gamma control for rkisp1
Related show

Commit Message

Stefan Klug June 3, 2024, 2:06 p.m. UTC
A camera gamma of roughly 2.2 is necessary to produce correct output
images on a standard monitor. Add a control for that.

Further information is available here:
https://en.wikipedia.org/wiki/SRGB
https://www.cambridgeincolour.com/tutorials/gamma-correction.htm

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
v2 -> v3:
- no changes

v1 -> v2:
- small change in description

 src/libcamera/control_ids_core.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml
index bf1f1a83..303b0d32 100644
--- a/src/libcamera/control_ids_core.yaml
+++ b/src/libcamera/control_ids_core.yaml
@@ -243,6 +243,13 @@  controls:
         Specify a fixed contrast parameter. Normal contrast is given by the
         value 1.0; larger values produce images with more contrast.
 
+  - Gamma:
+      type: float
+      description:  |
+        Specify a fixed gamma value. Default must be 2.2 which closely mimics 
+        sRGB gamma. Note that this is camera gamma, so it is applied as 
+        1.0/gamma
+
   - Lux:
       type: float
       description: |