libcamera enablement - aaronwmorris/indi-allsky GitHub Wiki

Modules

Module Sensor Rating Notes
Camera Module v1 ov5647 B Max exposure: 6s
Camera Module v2 imx219 B Max exposure: 11s
HQ Camera imx477 A
imx378 imx378 A Virtually identical to imx477
imx519 imx519 A
Hawkeye 64MP ? A Processing RAW/DNG bin1 data is slow on SBCs. RAW frames are 122MB.
imx290 imx290 Untested
imx462 imx462 A Fixed in Raspberry Pi OS 12 bookworm Long exposures broken with AWB disabled (fix proposed)
Camera Module v3 imx708 A
GS Camera Module imx296 A

Instructions

Please read the instructions on the Waveshare site

Manual instructions

Camera auto-detection may not detect the camera. You may need to manual load the overlay for your camera.

IMX477

Add to /boot/config.txt

dtoverlay=imx477
# imx477 requires minimum 32MB of GPU memory
#gpu_mem=32

IMX378

Add to /boot/config.txt

dtoverlay=imx378
# imx378 requires minimum 32MB of GPU memory
#gpu_mem=32

IMX462

Add to /boot/config.txt

dtoverlay=imx462,clock-frequency=74250000
# imx462 requires minimum 32MB of GPU memory
#gpu_mem=32

IMX519

Add to /boot/config.txt

dtoverlay=imx519
# imx519 requires minimum 32MB of GPU memory
#gpu_mem=32

IMX296 (Global Shutter)

dtoverlay=imx296
# imx296 requires minimum 32MB of GPU memory
#gpu_mem=32

64mp Hawk-eye

dtoverlay=arducam-64mp
gpu_mem=128

Customizations

The command used to generate images with libcamera-still may be customized.

https://www.raspberrypi.com/documentation/computers/camera_software.html

Focusing

Focusing will only work with camera modules with auto-focuser capability like the camera module 3

--autofocus-mode manual --lens-position 7.1
Moves the lens to a fixed focal distance, normally given in dioptres (units of 1 / distance in metres).

    0.0 will move the lens to the "infinity" position

    Any other number: move the lens to the 1 / number position, so the value 2 would focus at approximately 0.5m

    default - move the lens to a default position which corresponds to the hyperfocal position of the lens.

Binning

IMX477 and IMX378

Bin2 mode (half resolution). This is useful with SoCs with lower memory resources like Raspberry Pi 3.

--mode 2028:1520

Bin4 mode

--mode 1014:760

# cropped
--mode 1332:990:10

Alternate tuning file

July 2023 update. The location of the tuning files has changed.

Raspberry Pi 5

--tuning-file /usr/share/libcamera/ipa/rpi/pisp/camera.json

Raspberry Pi 3-4, Zero

--tuning-file /usr/share/libcamera/ipa/rpi/vc4/camera.json

Old location

--tuning-file /usr/share/libcamera/ipa/raspberrypi/camera.json

Manual size adjustment

--width and --height only change the output image size in software, but it does not change the sensor parameters.

--width 2028 --height 1520

64mp Hawk-eye

Bin2 (16mp)

--mode 4624:3472

Bin4 (4mp)

--mode 2312:1736