Skip to content

IDS cameras ​

caelum can drive IDS industrial cameras (uEye+ USB3 Vision / GigE Vision) through IDS's own SDK, IDS peak, with the ids_peak backend. It was written for the U3-34L0XCP-C — a compact USB3 camera with the 12.4 MP, square Sony IMX676 — and what follows was measured on that camera.

Experimental

The backend's logic is covered by tests against a simulated SDK that behaves the way the camera was measured to. It has not yet run for nights on real hardware the way the picamera2 backend has — check the first frames, and use the test tool before starting the service.

U3-34L0XCP-C-HQ Rev.1.2
SensorSony IMX676, colour (RGGB), rolling shutter, 2.0 µm pixels
Frame3504 × 3536 px, 12 bit raw
Exposure55 µs – 120 s (two sensor modes, see below)
Analogue gain1× – 31.6×
InterfaceUSB 3 (USB3 Vision)
On-camera processingNone: no ISP, no auto-exposure, auto-gain or auto white balance

Installation ​

Three things are needed besides caelum itself, on a Raspberry Pi 4 (64-bit Raspberry Pi OS) as on a PC:

1. The IDS peak SDK ​

Download IDS peak for your architecture from the downloads section of ids-imaging.com — for a Raspberry Pi the ARM 64-bit build, for a PC amd64 — and install it, either the .deb packages or the archive unpacked under /opt (the file names below are the ARM archive's; adjust them to what you downloaded):

bash
sudo tar -xzf ids-peak_*_arm64.tar.gz -C /opt
bash
sudo ln -sfn /opt/ids-peak_*_arm64 /opt/ids-peak

caelum only uses the SDK's GenTL producer (ids_u3vgentl.cti, the driver that talks to the camera). It is found on its own in the usual places (/usr/lib/*/ids-peak/cti, /opt/ids-peak*/lib/*/ids-peak/cti); for anywhere else, set GENICAM_GENTL64_PATH to the directory holding the .cti files in /etc/caelum/caelum.env.

2. USB access and USB memory ​

Both scripts come with the SDK and are run once, as root:

bash
sudo /opt/ids-peak/share/ids-peak/scripts/ids_install_udev_rule.sh
bash
sudo /opt/ids-peak/share/ids-peak/scripts/ids_set_usb_mem_size.sh 1000

Replug the camera afterwards. Without the udev rule the camera shows up without a serial number and cannot be opened (GC_ERR_ACCESS_DENIED). The second script raises the kernel's USB buffer memory (usbfs_memory_mb): the default 16 MB is less than one frame of this camera, and frames then arrive incomplete — caelum warns about it in the log when it opens the camera.

3. The Python bindings ​

ids_peak and ids_peak_ipl are on PyPI for x86-64 and aarch64. The installer takes care of them when asked for this backend:

bash
curl -fsSL https://github.com/roman-dvorak/caelum/releases/latest/download/install.sh | sudo bash -s -- --camera ids_peak

Web updates and re-runs of the installer keep them. In a development checkout: uv sync --extra ids.

Then select the camera, on the web UI's Camera page or in config.json:

json
{
  "camera": {
    "backend": "ids_peak",
    "sensor_id": "auto"
  }
}

sensor_id is the camera's serial number; "auto" (or the default "cam0") takes the first IDS camera found. camera.resolution is not used — the camera's full frame is.

Only one program can have the camera open: close IDS peak Cockpit before starting caelum.

Testing the installation ​

With the caelum service stopped, this opens the camera exactly as the service would, prints what it offers and takes test frames:

bash
sudo -u caelum /opt/caelum/current/venv/bin/python -m caelum.cameras.ids_peak_backend --exposure 10 --count 2 --save /tmp/ids-test.jpg

It reports the exposure and gain ranges, the sensor mode each frame was taken in, the raw data's minimum/median/maximum, and where the time went (start, frame, copy, stop, develop).

How the camera is driven ​

Two sensor modes, one exposure range ​

The camera's 2 s exposure limit is a limit of its default sensor mode. Longer exposures need the factory user set LongExposure, which in turn cannot go below 1 s:

DefaultLongExposure
Exposure55 µs – 2 s1 s – 120 s

The backend offers the whole range and loads the user set an exposure needs. Between 1 and 2 s, where both would do, it stays in the mode it is in, so an exposure hovering there at dusk does not reload a user set every frame. Loading a user set resets every other setting; the backend sets them again (12-bit raw format, analogue gain, software trigger).

One acquisition per frame ​

Two things about this camera are not in its documentation:

  • Exposure and gain written while the acquisition runs only show one frame later; the first frame after an acquisition start has them.
  • The software trigger does not start an exposure. The sensor exposes in a continuous cycle as long as the exposure time, and the trigger (its only type is ReadOutStart) releases the read-out of the next cycle to finish.

So caelum captures the same way it does with a Raspberry Pi camera: the camera is stopped between captures, and every capture starts the acquisition, takes exactly one frame and stops again. The exposure then begins when the capture grid asks for it, at exactly the exposure and gain just set. The price is about one second per capture on top of the exposure — which also caps a live view at roughly one frame per second.

A frame's time is the moment it arrived minus its exposure (host clock); the camera reports nothing better.

Raw data, colour and white balance ​

The frames are the sensor's Bayer mosaic and nothing else. The raw data is stored as it is — 12-bit DNG, like a Raspberry Pi camera's — and the RGB frame for previews, timelapses and everything else is developed on the host: black level, white balance, sRGB curve, bilinear demosaic. This takes a few tenths of a second on a Raspberry Pi 4.

White balance is always the fixed pair of gains from the camera settings (White balance page), applied in that development and written to the DNG as its as-shot neutral; the raw data is not scaled by it. There is no auto white balance. No colour matrix is applied yet, so colours are less saturated than from a Raspberry Pi camera.

Writing DNGs needs PiDNG as Raspberry Pi OS packages it (python3-pidng, which the installer adds). On other distributions the frames are captured and processed all the same, but no DNG is written.

Not supported ​

  • The sensor's ClearHDR mode (two gains read out interleaved in one buffer).
  • Binning, regions of interest, and GigE-specific setup (packet size, IP configuration) — the camera's defaults are used.

caelum is developed and maintained by AstroMeters ·