[0/2] CameraSensorHelper measurement tool and guide
mbox series

Message ID 20260808125915.974559-1-john.cronin@opcenter.com
Headers show
Series
  • CameraSensorHelper measurement tool and guide
Related show

Message

John Cronin Aug. 8, 2026, 12:59 p.m. UTC
Hi,

Following up on the imx471 helper series that Jacopo applied:

  https://lists.libcamera.org/pipermail/libcamera-devel/2026-August/060718.html

Jacopo asked whether the measurement script used for imx471 could live
in utils/ with a few lines under Documentation/guides. This series does
that in a sensor-agnostic form.

This is a clean resend with git-send-email (previous offer was a git-am
gist only, because Gmail had mangled format-patch).

  utils/measure-analogue-gain.py
    -> installed as libcamera-measure-analogue-gain
  Documentation/guides/camera-sensor-helper.rst

The tool locks exposure (and optional digital gain) via v4l2-ctl, steps
V4L2_CID_ANALOGUE_GAIN, captures raw frames with the libcamera cam
utility, and reports mean/percentile stats plus a fit of
G = k/(k-code). Flags cover width/height/stride/bit-depth and sensor
name so other sensors can reuse it.

The guide covers helper + properties placement, the measurement
procedure, and points at the utility.

Tested locally on ThinkPad X9-15 Gen 1 / imx471 (same method as the
earlier measurement write-up):

  https://gist.github.com/johncronin3/15d9eacbf64f91ecc600fe583686325f

Happy to rework naming, install path, or docs structure if preferred.

Thanks,
John Cronin

John Cronin (2):
  utils: Add measure-analogue-gain helper
  Documentation: Add Camera Sensor Helper guide

 Documentation/guides/camera-sensor-helper.rst | 146 ++++++
 Documentation/index.rst                       |   1 +
 Documentation/meson.build                     |   1 +
 utils/measure-analogue-gain.py                | 466 ++++++++++++++++++
 utils/meson.build                             |   7 +
 5 files changed, 621 insertions(+)
 create mode 100644 Documentation/guides/camera-sensor-helper.rst
 create mode 100755 utils/measure-analogue-gain.py